I’m preparing to deploy my Django app and I noticed that when I change the ‘DEBUG’ setting to False, all references to static files (i.e., JavaScript, CSS, etc..) result in HTTP 500 errors.
Any idea what’s causing that issue (and how to fix it)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would highly recommend letting your web server handle the static requests, without getting to Django. In my
urls.py, I only add the static request handler when debug is set to True.Technically, Django serving the static works fine though. Definitely read the short docs page, http://docs.djangoproject.com/en/dev/howto/static-files/. You’ll want to use an entry like this in
urls.py