Changes between Initial Version and Version 1 of Ticket #34829
- Timestamp:
- Sep 11, 2023, 1:07:05 PM (15 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #34829
- Property Resolution → worksforme
- Property Status new → closed
-
Ticket #34829 – Description
initial v1 6 6 7 7 specifically, line 278, which happens to be inside the definition of a class Settings. 8 8 {{{ 9 9 if self.is_overridden("STATICFILES_STORAGE"): 10 10 if self.is_overridden("STORAGES"): … … 12 12 "STATICFILES_STORAGE/STORAGES are mutually exclusive." 13 13 ) 14 }}} 14 15 The assumption seems to be that if both are overridden the dev is using both of them, and hence the error. Because I use white noise, it makes sense that STORAGES has been overridden. But since I have no reference to STATICFILES_STORAGE anywhere, it follows that the default value of global_settings is being inherited in my local settings, thus generating the error. 15 16 {{{ 16 17 django/django/conf/global_settings.py, line 630: 17 18 18 19 STATICFILES_STORAGE = "django.contrib.staticfiles.storage.StaticFilesStorage" 19 20 }}} 20 21 The problem here is that on line 274 of the same file, we have: 21 22 {{{ 22 23 STORAGES = { 23 24 "default": { … … 28 29 }, 29 30 } 30 31 }}} 31 32 Are these constants mutually exclusive for everything ''but'' global_settings? I commented the entire block: 32 33 {{{ 33 34 # if self.is_overridden("STATICFILES_STORAGE"): 34 35 # if self.is_overridden("STORAGES"): … … 37 38 # ) 38 39 # warnings.warn(STATICFILES_STORAGE_DEPRECATED_MSG, RemovedInDjango51Warning) 39 40 }}} 40 41 41 42 And that worked: 43 {{{ 42 44 (chronicle-jltMOQ-O-py3.11) malikarumi@Tetuoan2:~/Projects/lifeandtimes/chronicle$ python manage.py runserver 43 45 Watching for file changes with StatReloader … … 45 47 46 48 System check identified no issues (0 silenced). 49 }}}