In DEBUG mode, the Django development server processes static files for you. However, this is not suitable for production, as it is much more inefficient than a real server. See here .
File service
In addition to these configuration steps, you will also need to execute static files.
During development, if you use django.contrib.staticfiles, this will be done automatically by the launch server when DEBUG is set to True (see django.contrib.staticfiles.views.serve ()).
This method is extremely inefficient and probably unsafe, therefore it is unsuitable for production.
See Deploying Static Files for the Right Strategies for Serving Static Files in Production Environments.
Check here to learn how to handle static files during production.
EDIT: Add the following to answer @alejoss's question about viewing error pages with DEBUG = True.
I added something like the following to my urls.py root file:
if settings.DEBUG: urlpatterns += patterns( '', url(r'^400/$', TemplateView.as_view(template_name='400.html')), url(r'^403/$', TemplateView.as_view(template_name='403.html')), url(r'^404/$', 'django.views.defaults.page_not_found'), url(r'^500/$', 'django.views.defaults.server_error'), )
You may need to change a bit (for example, pages 400 and 403 , you may need to edit if the names of your templates are different). Basically, this allows you to visit http://localhost/400 to see a page with 400 error, http://localhost/403 to see a page with 403 error, etc.