Changes between Initial Version and Version 1 of Ticket #25034
- Timestamp:
- Jun 28, 2015, 4:04:59 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #25034 – Description
initial v1 5 5 Case 1 is causing some people confusion when attempting to import things in `wsgi.py`, as the import breaks if it comes before `DJANGO_SETTINGS_MODULE` is defined. See for example: [https://github.com/evansd/whitenoise/issues/31#issuecomment-104185649] 6 6 7 This check also seems a bit superfluous as failing to define a default cache backend will trigger an `InvalidCacheBackendError` when attempting to access it. It's not clearthat triggering `ImproperlyConfigured` on import adds much here.7 This check on the contents of `settings.CACHE` seems to me to be superfluous as failing to define a default cache backend will trigger an `InvalidCacheBackendError` anyway when attempting to access it. I don't see that triggering `ImproperlyConfigured` on import adds much here. 8 8 9 Case 2 is bit strange as I can't find anywhere that actually uses this `urls.py` file. Is it possible that it was just left in place and is now redundant?9 Case 2 seems to be entirely redundant as it's only used for defining `urlpatterns` in that file and I can't find anything which uses this or any mention of it in the docs going back to v1.4. If I remove those lines the tests continue to pass, so I hoping this can be safely removed. 10 10 11 11 If we could remove these two cases then we have the simple rule that settings are not to be accessed at import time, and we won't have any subtle import-order requirements.