Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use str.isupper() to test if a string is uppercased.
  • Loading branch information
bmispelon committed Nov 26, 2013
1 parent 16d73d7 commit 9d6c48a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/conf/__init__.py
Expand Up @@ -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
Expand All @@ -136,7 +136,7 @@ def __init__(self, settings_module):
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
Expand Down

0 comments on commit 9d6c48a

Please sign in to comment.