1
0
mirror of https://github.com/django/django.git synced 2025-10-25 22:56:12 +00:00

Enforced unicity of app labels.

Fixed #21679.
This commit is contained in:
Aymeric Augustin
2013-12-31 17:25:57 +01:00
parent c40209dcc0
commit 63137a8304
4 changed files with 36 additions and 8 deletions

View File

@@ -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.