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:
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:
This will only work if DEBUG is True.
That's because this view is grossly inefficient and probably insecure. This is only intended for local development, and should never be used in production.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With