| 69 | | * #3011 (auth User enhancement) |
| | 69 | * '''Complexity''': High |
| | 70 | |
| | 71 | One of the most class of questions on [http://groups.google.com/group/django-users django-users] surrounds issues of customizing Django's User model: |
| | 72 | * How can I use an email address as a username? |
| | 73 | * I want to use Twitter/OAuth/Facebook to login - why can't I leave the username field empty? |
| | 74 | * How can I make the username field X characters longer/shorter? |
| | 75 | * How can I allow [insert random character] in usernames? |
| | 76 | * How can I have a single "name" field instead of "first_name"/"last_name"? |
| | 77 | |
| | 78 | At present, there is no easy answer to these questions. Use of Django User model is not mandatory, but it is a dependency for a lot of Django applications. It is possible to do some of these customizations, but it's not trivial to do so. |
| | 79 | |
| | 80 | Ticket #3011 describes one approach that has been rejected - the idea of a 'pluggable' User model. However, the general problem remains. |
| | 81 | |
| | 82 | '''Note:''' This isn't a problem with a trivial solution, and it isn't a problem where we will take the first proposal we see. A successful proposal on this project will require extensive discussion on [http://groups.google.com/group/django-developers django-developers]. |
| | 83 | |
| | 84 | Issues to consider: |
| | 85 | * How can we represent the generic idea of a User without reducing the user table to little more than an identifying primary key? |
| | 86 | * How can we differentiate the ideas of identity, permission and authentication? |
| | 87 | * How can we manage the dependencies that exist in contrib.admin (and other parts of Django core and Django.contrib) that rely on the internals of auth.User as currently implemented? |
| | 88 | * How can we roll out a new/modified User model without requiring almost every Django application on the planet to undergo a complex database modification? |
| | 89 | |
| | 90 | See also: |
| | 91 | * Discussions on [http://groups.google.com/group/django-users django-users] when users have asked the "how do I" questions |
| | 92 | * The [source:django/trunk/django/template django.contrib.auth code module] |