0

Hello everybody and thanks in advance for the helpers!

I have created a django project and I want to run it on the server in production mode.

I have set the setting.py DEBUG = False and suddenly some of my CSS files got "missing". Some of the pages, and those pages viewed without style but other pages where viewed properly, although all of my html pages have the same css link. I did my research and found out that when I changed the DEBUG to False django don't handle my static files any more.

Is there any guide for noobies in the servers and web area? Can someone tell me what am I doing wrong ?

cor
  • 3,323
  • 25
  • 46
Shalom Balulu
  • 379
  • 1
  • 9
  • 20
  • 2
    Please, read this article about [deploying static files](https://docs.djangoproject.com/en/dev/howto/static-files/deployment/) – Serhii Holinei Sep 04 '14 at 12:49
  • 1
    Django doesn't handle your static files when `DEBUG` is set to `False` because it's a bad idea to let django handle the static files in general (it's just easier when developing). You want to serve the files through the server itself (and use a CDN wherever possible). – yuvi Sep 04 '14 at 13:10
  • in production you have to set static root and all – Raja Simon Sep 04 '14 at 14:18

0 Answers0