1. write a  new User  Model, it like  django.contrib.auth.models.User
2. write a new backend , like django.contrib.auth.backends.ModelBackend
3. modify settings.py , add
AUTHENTICATION_BACKENDS=('myproject.myapp.backends.MyBackend' ,)

http://docs.djangoproject.com/en/dev/topics/auth/#authentication-backends


On Mon, Nov 9, 2009 at 2:46 PM, Sri <sri.pan...@gmail.com> wrote:

>
> Folks,
>
>   Thought I might put it out there.  I mean technically this is not
> limited to django.  I need to extend the
> django.contrib.auth.models.User class (adding an extra field, making
> the email field unique and increasing the length of the username
> field).
>
> Now what are your thoughts on doing this?  Changes are clearly very
> small and extending what is there so they will not break the existing
> classes and apps (or other django apps out there) so I dont mind
> putting these changes to each version of django I use.
>
> I am not happy with doing this but I cant see a way around it.  Adding
> another model class with these extensions just means that existing
> apps wont take advantage of this.  Ideally I would like to see all
> apps and methods out there take the class variable that refers to the
> User model to be used so one could simply pass that in (say in
> settings.py) and it could even default to User model in
> django.contrib.auth.
>
> What are your thoughts?
>
> cheers
> Sri
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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