diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-31 17:25:57 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-31 18:04:54 +0100 |
| commit | 63137a8304d4387132e749c97aad1049526f601c (patch) | |
| tree | 5d7be83894c596f8fa7cd082f2f8229950f3d342 /django/apps | |
| parent | c40209dcc09f19524fb85251f39a4051491bbec0 (diff) | |
Enforced unicity of app labels.
Fixed #21679.
Diffstat (limited to 'django/apps')
| -rw-r--r-- | django/apps/registry.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/django/apps/registry.py b/django/apps/registry.py index 7ff1c6625d..3cd6d480f1 100644 --- a/django/apps/registry.py +++ b/django/apps/registry.py @@ -79,7 +79,11 @@ class Apps(object): app_config = entry else: app_config = AppConfig.create(entry) - # TODO: check for duplicate app labels here (#21679). + if app_config.label in self.app_configs: + raise ImproperlyConfigured( + "Application labels aren't unique, " + "duplicates: %s" % app_config.label) + self.app_configs[app_config.label] = app_config # Check for duplicate app names. |
