Sunday, September 14, 2014

Re: static files in Django 1.7 ; Anything was change?

What are you using to serve static files? You normally setup your server e.g. Nginx to take care of this. 

Here's an example of Nginx setup file which serves static files from /webapps/hello_django/static/:

server {
 
    listen   80;
    server_name example.com;
 
    client_max_body_size 4G;
 
    access_log /webapps/hello_django/logs/nginx-access.log;
    error_log /webapps/hello_django/logs/nginx-error.log;
 
    location /static/ {
        alias   /webapps/hello_django/static/;
    }
    
    location /media/ {
        alias   /webapps/hello_django/media/;
    }
    ...

That was taken from this awesome article on deploying Django http://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/

On 15 September 2014 11:02, Fellipe Henrique <fellipeh@gmail.com> wrote:
Hi everybody!

I have my old project in Django 1.6, and works fine in development... when DEBUG=True.. but when I update to 1.7, stop to serving static files.

Here is my files:


What I missed?

Thanks, 

regards,
Fellipe H.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8690ea0f-35d9-49f2-b4e4-34bb80bdeb28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHqTbjkCnTcp%2Bc9j06aqC8EUTNp1nbR5ePiXtvnc%3D6bdaSsjKA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment