#23483: Having two dotted app names with the same last part breaks migrations
-----------------------------+--------------------
Reporter: szilveszter | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------
In our Django project we have django.contrib.auth, and our own vendor.auth
app listed in INSTALLED_APPS. After upgrading Django to 1.7 final from
1.7b4, I got the following error message after running migrations (or the
manage.py test command that runs migrations in this example):
{{{
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-
packages/django/core/management/__init__.py", line 385, in
execute_from_command_line
utility.execute()
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-
packages/django/core/management/__init__.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-
packages/django/core/management/commands/test.py", line 50, in
run_from_argv
super(Command, self).run_from_argv(argv)
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-
packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-
packages/django/core/management/commands/test.py", line 71, in execute
super(Command, self).execute(*args, **options)
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-
packages/django/core/management/base.py", line 338, in execute
output = self.handle(*args, **options)
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-
packages/django/core/management/commands/test.py", line 88, in handle
failures = test_runner.run_tests(test_labels)
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-packages/django/test/runner.py",
line 147, in run_tests
old_config = self.setup_databases()
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-packages/django/test/runner.py",
line 109, in setup_databases
return setup_databases(self.verbosity, self.interactive, **kwargs)
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-packages/django/test/runner.py",
line 299, in setup_databases
serialize=connection.settings_dict.get("TEST_SERIALIZE", True),
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-
packages/django/db/backends/creation.py", line 374, in create_test_db
test_flush=True,
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-
packages/django/core/management/__init__.py", line 115, in call_command
return klass.execute(*args, **defaults)
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-
packages/django/core/management/base.py", line 338, in execute
output = self.handle(*args, **options)
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-
packages/django/core/management/commands/migrate.py", line 160, in handle
executor.migrate(targets, plan, fake=options.get("fake", False))
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-
packages/django/db/migrations/executor.py", line 63, in migrate
self.apply_migration(migration, fake=fake)
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-
packages/django/db/migrations/executor.py", line 91, in apply_migration
if self.detect_soft_applied(migration):
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-
packages/django/db/migrations/executor.py", line 135, in
detect_soft_applied
apps = project_state.render()
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-
packages/django/db/migrations/state.py", line 57, in render
self.apps = Apps([AppConfigStub(label) for label in
sorted(self.real_apps + list(app_labels))])
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-packages/django/apps/registry.py",
line 56, in __init__
self.populate(installed_apps)
File "/Users/szilveszter/Prezi/repo/website-
connected/virtualenv/lib/python2.7/site-packages/django/apps/registry.py",
line 89, in populate
"duplicates: %s" % app_config.label)
django.core.exceptions.ImproperlyConfigured: Application labels aren't
unique, duplicates: auth
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23483>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/054.d2eb9b6bcbff1ebd501cef570ed141ef%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.