mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Use str.isupper() to test if a string is uppercased.
This commit is contained in:
		| @@ -119,7 +119,7 @@ class Settings(BaseSettings): | |||||||
|     def __init__(self, settings_module): |     def __init__(self, settings_module): | ||||||
|         # update this dict from global settings (but only for ALL_CAPS settings) |         # update this dict from global settings (but only for ALL_CAPS settings) | ||||||
|         for setting in dir(global_settings): |         for setting in dir(global_settings): | ||||||
|             if setting == setting.upper(): |             if setting.isupper(): | ||||||
|                 setattr(self, setting, getattr(global_settings, setting)) |                 setattr(self, setting, getattr(global_settings, setting)) | ||||||
|  |  | ||||||
|         # store the settings module in case someone later cares |         # store the settings module in case someone later cares | ||||||
| @@ -136,7 +136,7 @@ class Settings(BaseSettings): | |||||||
|         tuple_settings = ("INSTALLED_APPS", "TEMPLATE_DIRS") |         tuple_settings = ("INSTALLED_APPS", "TEMPLATE_DIRS") | ||||||
|  |  | ||||||
|         for setting in dir(mod): |         for setting in dir(mod): | ||||||
|             if setting == setting.upper(): |             if setting.isupper(): | ||||||
|                 setting_value = getattr(mod, setting) |                 setting_value = getattr(mod, setting) | ||||||
|  |  | ||||||
|                 if (setting in tuple_settings and |                 if (setting in tuple_settings and | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user