diff options
| author | Baptiste Mispelon <bmispelon@gmail.com> | 2013-11-26 14:07:07 +0100 |
|---|---|---|
| committer | Baptiste Mispelon <bmispelon@gmail.com> | 2013-11-26 14:08:05 +0100 |
| commit | 9d6c48aeb02320fd33b4314928c4a3bcfc49f667 (patch) | |
| tree | c9cbaa8cf3c308d5471883aa3057c3bb093e8829 | |
| parent | 16d73d7416a7902703ee8022f093667f7ac9ef5b (diff) | |
Use str.isupper() to test if a string is uppercased.
| -rw-r--r-- | django/conf/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/conf/__init__.py b/django/conf/__init__.py index 5245ff9e25..37982e76ad 100644 --- a/django/conf/__init__.py +++ b/django/conf/__init__.py @@ -119,7 +119,7 @@ class Settings(BaseSettings): def __init__(self, settings_module): # update this dict from global settings (but only for ALL_CAPS settings) for setting in dir(global_settings): - if setting == setting.upper(): + if setting.isupper(): setattr(self, setting, getattr(global_settings, setting)) # store the settings module in case someone later cares @@ -136,7 +136,7 @@ class Settings(BaseSettings): tuple_settings = ("INSTALLED_APPS", "TEMPLATE_DIRS") for setting in dir(mod): - if setting == setting.upper(): + if setting.isupper(): setting_value = getattr(mod, setting) if (setting in tuple_settings and |
