Changes between Initial Version and Version 1 of Ticket #34829


Ignore:
Timestamp:
Sep 11, 2023, 1:07:05 PM (12 months ago)
Author:
Mariusz Felisiak
Comment:

Thanks for the report, however it works for me. Perhaps 3rd-party packages defines both settings. Check TicketClosingReasons/UseSupportChannels for ways to get help, folks on support channels can help you debug your issue.

Are these constants mutually exclusive for everything but global_settings?

Exactly.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34829

    • Property Resolutionworksforme
    • Property Status newclosed
  • Ticket #34829 – Description

    initial v1  
    66
    77specifically, line 278, which happens to be inside the definition of a class Settings.
    8 
     8{{{
    99        if self.is_overridden("STATICFILES_STORAGE"):
    1010            if self.is_overridden("STORAGES"):
     
    1212                    "STATICFILES_STORAGE/STORAGES are mutually exclusive."
    1313                )
     14}}}
    1415The 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{{{
    1617django/django/conf/global_settings.py, line 630:
    1718
    1819STATICFILES_STORAGE = "django.contrib.staticfiles.storage.StaticFilesStorage"
    19 
     20}}}
    2021The problem here is that on line 274 of the same file, we have:
    21 
     22{{{
    2223STORAGES = {
    2324    "default": {
     
    2829    },
    2930}
    30 
     31}}}
    3132Are these constants mutually exclusive for everything ''but'' global_settings? I commented the entire block:
    32 
     33{{{
    3334            # if self.is_overridden("STATICFILES_STORAGE"):
    3435            #     if self.is_overridden("STORAGES"):
     
    3738            #         )
    3839            #     warnings.warn(STATICFILES_STORAGE_DEPRECATED_MSG, RemovedInDjango51Warning)
    39 
     40}}}
    4041
    4142And that worked:
     43{{{
    4244        (chronicle-jltMOQ-O-py3.11) malikarumi@Tetuoan2:~/Projects/lifeandtimes/chronicle$ python manage.py runserver
    4345        Watching for file changes with StatReloader
     
    4547       
    4648        System check identified no issues (0 silenced).
     49}}}
Back to Top