INCF / biostar-central

DEPRECATED, please go to upstream on
http://github.com/ialbert/biostar-central
Other
4 stars 4 forks source link

Django 1.6 static files 404 when Debug=False #5

Closed brainstorm closed 10 years ago

brainstorm commented 10 years ago

I'm experiencing this last strange issue, just about ready for neurostars.org beta launch ;)

http://stackoverflow.com/questions/18005574/django-1-5-get-404-on-static-files

@satra, @richstoner, @ialbert.

ialbert commented 10 years ago

A far as I know this is a feature not a bug.

Django wants to absolutely and positively dissuade you to ever serve static files via Django itself. So it even goes to the lengths of turn off serving static files when DEBUG=False

The solution is really simple, serve static content via a different webserver. For that use the collectstatic command on manage.py more details here:

https://docs.djangoproject.com/en/1.6/howto/static-files/deployment/

brainstorm commented 10 years ago

Aha, had no idea about this, thanks so much Istvan, I'll fix that! :+1:

brainstorm commented 10 years ago

Fixed with nginx, a few uwsgi workers and @ialbert suggestion, thanks! Debug mode disabled.

Now I should fix the comments issue...