#19185: AUTH_USER_MODEL and GeoManager
-------------------------------------+-------------------------------------
Reporter: email.max.bucher@… | Owner: nobody
Type: Uncategorized | Status: closed
Component: Database layer | Version:
(models, ORM) | Resolution:
Severity: Release blocker | worksforme
Keywords: AUTH_USER_MODEL | Triage Stage:
GeoManager | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by ptone):
* status: new => closed
* resolution: => worksforme
Comment:
Custom user objects require a custom manager that inherits from at least
django.contrib.auth.models.BaseUserManager, which defines the
get_by_natural_key method
There are a minimum set of documented requirements for a manager of User
objects, and GeoManager does not meet that set.
Because the GeoManager defines a completely non-conflicting set of methods
- you should be able to define your manager as:
{{{class MyCustomGeoUserManager(BaseUserManager, GeoManager):}}}
and then defining create_user and create_superuser on
MyCustomGeoUserManager per the docs
--
Ticket URL: <https://code.djangoproject.com/ticket/19185#comment:2>
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.