﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34712	Prevent misconfiguration of `STORAGES` setting	Bruno Alla	Bruno Alla	"The new `STORAGES` setting added in #26029 is great and super flexible. While trying to migrate Cookiecutter Django to use it [1], I noticed that it's quite easy to break the configuration of one of the storages: if I want to override only one of the 2 default storages (e.g. staticfiles), then I might be tempted to set:

{{{
STORAGES = {
    ""staticfiles"": {""BACKEND"": ""MyCustomStorage""},
}
}}}

Which would raise a `InvalidStorageError` when trying to upload a `FileField` somewhere. AFAIK, nothing warns the user of this misconfiguration until this point.

I think that one might assume that the dictionary defined by the user would be ""merged"" with the default value. I'm assuming that implementing behaviour could be considered too much of breaking change to the behaviour etablished in 4.2, but I think the documentation could outline better the existing behaviour when only one storage is defined by the user.

Another thing that could be maybe be added is a deployment check, to make sure that both `default` and `staticfiles` storages are present in the setting.

[1] https://github.com/cookiecutter/cookiecutter-django/pull/4457"	Cleanup/optimization	closed	contrib.staticfiles	4.2	Normal	fixed			Accepted	1	0	0	1	0	0
