#16064: auth's User model should be fully customizable - another way of
providing
additional information about users
-------------------------------------------------+-------------------------
Reporter: fas | Owner: nobody
Type: New feature | Status: new
Milestone: | Component:
Version: 1.3 | contrib.auth
Keywords: user email login authentication | Severity: Normal
backend profile | Triage Stage:
Has patch: 0 | Unreviewed
| Easy pickings: 0
-------------------------------------------------+-------------------------
The current way of adding additional user information is to create a user
profile model:
http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-
information-about-users
The way this is handled now is very unsatisfying. It makes not much sense
to have the fields of the User model fixed/dictated by Django and to have
to create a related model to store additional user information. Having
multiple tables for basic user information is not the usual way of storing
user information and would not be done if it were not for the restriction
that Django has.
Another issue new Django users face often: if they want the users to login
via e-mail address and not via username, they hit a wall. Custom
authentication backends that can be found are all defective, mainly due to
the fact that the email field is not declared unique. Monkey patching it
is not a great option.
I propose the following solution:
If settings.AUTH_USER_MODEL is defined, this model should be used instead
of auth.models.User. This model should inherit from auth.models.User.
This way, one can define all relevant fields to the application (instead
of having them in a separate related model) and also redefine the email
field to be unique if one wishes to do so.
I think this would be a vastly superior way of adding additional user
information.
If settings.AUTH_USER_MODEL is not defined, everything can work as before.
I think this would improve Django's auth contrib module significantly.
What do you think?
--
Ticket URL: <https://code.djangoproject.com/ticket/16064>
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 this group at
http://groups.google.com/group/django-updates?hl=en.