The following code is not working properly. Exiting the second override loads the original environ variable value.
ATTR=terminal DJANGO_SETTINGS_MODULE=settings python test.py
class Settings(AppSettings):
attr = StringSetting(default='Hello')
S = Settings()
if __name__ == '__main__':
Settings.check()
print(S.attr) # output: terminal [correct]
with override_settings(ATTR='Override1'):
print(S.attr) # output: Override1 [correct]
with override_settings(ATTR='Override2'):
print(S.attr) # output: Override2 [correct]
print(S.attr) # output: terminal [incorrect] <----
print(S.attr) # output: terminal [correct]
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too