Called to manually configure the settings. The 'default_settings' parameter sets where to retrieve any unspecified values from (its argument must support attribute access (__getattr__)).
(self, default_settings=global_settings, **options)
| 186 | return attrs |
| 187 | |
| 188 | def configure(self, default_settings=global_settings, **options): |
| 189 | """ |
| 190 | Called to manually configure the settings. The 'default_settings' |
| 191 | parameter sets where to retrieve any unspecified values from (its |
| 192 | argument must support attribute access (__getattr__)). |
| 193 | """ |
| 194 | if self._wrapped is not empty: |
| 195 | raise RuntimeError("Settings already configured.") |
| 196 | |
| 197 | # RemovedInDjango70Warning. |
| 198 | _check_email_settings_conflicts(options.keys()) |
| 199 | |
| 200 | holder = UserSettingsHolder(default_settings) |
| 201 | for name, value in options.items(): |
| 202 | if not name.isupper(): |
| 203 | raise TypeError("Setting %r must be uppercase." % name) |
| 204 | setattr(holder, name, value) |
| 205 | self._wrapped = holder |
| 206 | |
| 207 | @staticmethod |
| 208 | def _add_script_prefix(value): |