override_settings has no effect on FileSystemStorage()
|Reported by:||Michael van Tellingen||Owned by:||Claude Paroz|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Since FileSystemStorage() copies the value of settings.MEDIA_ROOT to self.location on init. This means that changes to settings.MEDIA_ROOT have no effect.
I think the best solution here is to listen for the settings_changed signal and update the location value if the default value (which is settings.MEDIA_ROOT) is used. Unfortunately this cannot be solved when passing a custom location value based on the MEDIA_ROOT.
Otherwise this should be clearly documented.
I could create the patch if there is interest for this.
Change History (9)
comment:5 Changed 5 years ago by
|Owner:||changed from nobody to Claude Paroz|
|Severity:||Release blocker → Normal|
|Status:||reopened → new|
|Triage Stage:||Unreviewed → Accepted|
|Type:||Uncategorized → Bug|