#16283: my application project.auth takes models from django.contrib.auth
--------------------------------------+------------------------------
               Reporter:  TheRoSS     |          Owner:  nobody
                   Type:  Bug         |         Status:  closed
              Milestone:              |      Component:  contrib.auth
                Version:  1.3         |       Severity:  Normal
             Resolution:  invalid     |       Keywords:
           Triage Stage:  Unreviewed  |      Has patch:  0
    Needs documentation:  0           |    Needs tests:  0
Patch needs improvement:  0           |  Easy pickings:  0
                  UI/UX:  0           |
--------------------------------------+------------------------------
Changes (by aaugustin):

 * status:  reopened => closed
 * resolution:   => invalid


Comment:

 **tl;dr** don't call your app "auth" :)

 ----

 You have `django.contrib.auth.middleware.AuthenticationMiddleware` in
 `MIDDLEWARE_CLASSES`.

 By default, this will use `django.contrib.auth.backends.ModelBackend` as
 an authentication backend
 (https://docs.djangoproject.com/en/dev/ref/settings/#authentication-
 backends).

 This backend imports `django.contrib.auth.models`
 
(https://code.djangoproject.com/browser/django/trunk/django/contrib/auth/backends.py)

 Thus, even if you haven't declared `django.contrib.auth` in
 `INSTALLED_APPS`, it gets registered in the application cache, creating a
 conflict with your app.

 I hope this helps!

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16283#comment:4>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to