Just to add my $0.02 cents to this, I too would like a better way to 
extend django.contrib.auth.models.User than the current approach.  The 
two biggest "problems" that I have are:

* Everything depends on django.contrib.auth.models.User -- which means 
that while you could swap out your authenticator you still basically 
have to go and rip apart everybody's applications to support your user 
object.
* To the above point, it also means that to construct your own User 
object means you can't use contrib.admin since it depends on the User 
object.

What would be really nice is to have something like:
    django.auth.interface.User

Which in turn would instantiate something from settings.USER_MODEL 
(default contrib.auth.modes) this might mean you could subsume 
AUTH_PROFILE_MODULE into the USER_INSTANCE for most developers.  Up shot 
is that I can now still use public applications and the admin system, 
but now somebody can just create a "facebook.models.User" class that 
mirrors using facebook as the authenticator and get everything for free...

--koblas

Dana wrote:
> Hello All,
>
> I am looking to create a user model that extends the Auth "User"
> model, like how James Bennett outlines in his article "Extending the
> User Model" [1] by creating a FK to the "User" model and everything is
> going fine other than one issue.
>
> I would like to make "email" become the unique field and not need
> "username" when creating user accounts. Now, I don't mind using
> username for the Django admin, but for my own user section on the
> front end I want people creating accounts/logging in using an email. I
> am wondering if there is any clear way of doing this without having to
> roll my own auth app?
>
> I played with the idea of having my "save()" function create a random
> username when saving but that is obviously an ugly solution. Is there
> an easier way to do this that I am overlooking?
>
> Thanks for all your time!
> Dana W
>
> [1] http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/
> >
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to