I’ve some problem with deployment my application to production server. If I’ve set in settings.py
DEBUG = True
TEMPLATE_DEBUG = DEBUG
then everything works ok, but if I change settings to:
DEBUG = False
TEMPLATE_DEBUG = DEBUG
then my app is broken. I don’t see static files (js, css, …) and in admin panel I’m not able to add/edit my registered models.
Do you have any advices how can I resolve this issue?
My envoirment:
- Python 2.7.3
- Django 1.4.1
- Nginx 1.2.3
- uwsgi 1.3
You should read: Serving static files in production.
At least it sounds like you are relying on the helper view
staticfiles_urlpatterns()from contrib.staticfiles which is only intended for development: