Kaydet (Commit) e65c0cca authored tarafından Henk Vos's avatar Henk Vos Kaydeden (comit) Tim Graham

Fixed #22071 -- Added a warning regarding override_settings and aliasing.

Thanks EvilDMP for the suggestion.
üst e8161980
...@@ -1181,6 +1181,10 @@ The decorator can also be applied to test case classes:: ...@@ -1181,6 +1181,10 @@ The decorator can also be applied to test case classes::
the session backend in a test that uses cached sessions and overrides the session backend in a test that uses cached sessions and overrides
:setting:`CACHES`. :setting:`CACHES`.
Finally, avoid aliasing your settings as module-level constants as
``override_settings()`` won't work on such values since they are
only evaluated the first time the module is imported.
You can also simulate the absence of a setting by deleting it after settings You can also simulate the absence of a setting by deleting it after settings
have been overridden, like this:: have been overridden, like this::
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment