| 112 | |
| 113 | # load settings from apps if not already existing in project settings |
| 114 | for app in self.INSTALLED_APPS: |
| 115 | try: |
| 116 | app_settings = __import__("%s.settings" % app, {}, {}, ['']) |
| 117 | for setting in dir(app_settings): |
| 118 | existing = getattr(self, setting, None) |
| 119 | if setting == setting.upper() and existing is None: |
| 120 | setting_value = getattr(app_settings, setting) |
| 121 | if setting in tuple_settings and type(setting_value) == str: |
| 122 | setting_value = (setting_value,) # In case the user forgot the comma. |
| 123 | setattr(self, setting, setting_value) |
| 124 | except ImportError: |
| 125 | pass |