#27360: Make it easier to track down the offending models for AlreadyRegistered
     Reporter:  Ed Morley      |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  contrib.admin  |    Version:  1.8
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
 I've just updated 20+ packages locally in a project's requirements file,
 one of which has caused:

 [2016-10-18 15:00:18,667] ERROR [django.request:256] Internal Server
 Error: /browserid/csrf/
 Traceback (most recent call last):
   File "/home/vagrant/venv/local/lib/python2.7/site-
 packages/django/core/handlers/base.py", line 223, in get_response
     response = middleware_method(request, response)
   File "/home/vagrant/venv/local/lib/python2.7/site-
 packages/debug_toolbar/middleware.py", line 129, in process_response
     panel.generate_stats(request, response)
   File "/home/vagrant/venv/local/lib/python2.7/site-
 packages/debug_toolbar/panels/request.py", line 41, in generate_stats
     match = resolve(request.path)
   File "/home/vagrant/venv/local/lib/python2.7/site-
 packages/django/core/urlresolvers.py", line 521, in resolve
     return get_resolver(urlconf).resolve(path)
   File "/home/vagrant/venv/local/lib/python2.7/site-
 packages/django/core/urlresolvers.py", line 365, in resolve
     for pattern in self.url_patterns:
   File "/home/vagrant/venv/local/lib/python2.7/site-
 packages/django/core/urlresolvers.py", line 401, in url_patterns
     patterns = getattr(self.urlconf_module, "urlpatterns",
   File "/home/vagrant/venv/local/lib/python2.7/site-
 packages/django/core/urlresolvers.py", line 395, in urlconf_module
     self._urlconf_module = import_module(self.urlconf_name)
   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in
   File "/home/vagrant/treeherder/treeherder/config/urls.py", line 12, in
   File "/home/vagrant/venv/local/lib/python2.7/site-
 packages/django_browserid/admin.py", line 39, in copy_registry
     self.register(model, modeladmin.__class__)
   File "/home/vagrant/venv/local/lib/python2.7/site-
 packages/django/contrib/admin/sites.py", line 90, in register
     raise AlreadyRegistered('The model %s is already registered' %
 AlreadyRegistered: The model Site is already registered

 This model isn't defined in the project's own models so in this particular
 case it must be django-browserid now clashing with one of the packages
 that was updated.

 Rather than having to bisect, it would be much more helpful if this
 exception gave more details about the already-registered model, so I know
 which package/app is clashing with the later app's attempts to re-register

Ticket URL: <https://code.djangoproject.com/ticket/27360>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to