#23017: Custom Managers
------------------------------+----------------------
Reporter: rbatukaev@… | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 1.7-rc-1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+----------------------
When I do not define any managers, I get no errors. However, when I do the
following:
{{{
class User(AbstractUser):
# some fields
objects = model.Manager()
hstore_manager = hstore.HStoreManager()
}}}
I get
{{{
AttributeError at'Manager' object has no attribute 'get_by_natural_key'
}}}
There is something wrong with /django/contrib/auth/backends.py in
authenticate method on this line:
{{{
user = UserModel._default_manager.get_by_natural_key(username)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23017>
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/063.68336377aed107e86760c9fc5f3a2393%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.