Re: overwrite User model

2009-08-05 Thread Malcolm Tredinnick

On Wed, 2009-08-05 at 01:43 -0700, Shuge Lee wrote:
> django.contrib.auth.models.User
> 
> I don't like models.User, but I like Admin view, and I will keep admin
> view in my application.
> 
> How to overwirte models.User

You can't. Django relies on the existing User model.

There are *plenty* of threads on this list that discuss how to use email
addresses for login for user-exposed forms. One that was active less
than 24 hours ago, even. Perhaps you might want to have a browse of
those to find alternate solutions to your problem.

Regards,
Malcolm



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



overwrite User model

2009-08-05 Thread Shuge Lee

django.contrib.auth.models.User

I don't like models.User, but I like Admin view, and I will keep admin
view in my application.

How to overwirte models.User

Make it just look like following

class ShugeUser(User)
username = EmailField(uniqute=True, verbose_name='EMail as your
username', ...)
email = CharField(verbose_name='Nickname, ...)

User = ShugeUser


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