#25034: Remove attempts to access settings at import time --------------------------------------+------------------------------------ Reporter: evansd | Owner: nobody Type: Cleanup/optimization | Status: new Component: Core (Other) | Version: master Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 1 Easy pickings: 0 | UI/UX: 0 --------------------------------------+------------------------------------ Changes (by timgraham):
* needs_better_patch: 0 => 1 * component: Uncategorized => Core (Other) Comment: For `staticfiles`, I also couldn't find any docs of that attribute. We do suggest reference `settings.DEBUG` in urlpatterns though, e.g. {{{ from django.conf import settings from django.contrib.staticfiles import views if settings.DEBUG: urlpatterns += [ url(r'^static/(?P<path>.*)$', views.serve), ] }}} so it may be counterintuitive to make the recommendation. I guess the distinction is Django itself vs. user projects. However, I wonder if we might just ignore the issue here until we improve static serving and make it usable in production as suggested [https://groups.google.com/d/topic /django-developers/N0KbgDeLuUE/discussion on django-developers]. Then we can simply drop `settings.DEBUG` and don't have to worry about backwards compatibility. How about making the `CACHES` exception a system check? -- Ticket URL: <https://code.djangoproject.com/ticket/25034#comment:11> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.04ce4e2b413902a668f9c85ba14b8914%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.