Re: username > 30 characters?

2007-03-28 Thread John Lee
I finally realized that simply inheriting a model will not work like I expected. For example: from django.core import validators from django.contrib.auth.models import User as OldUser from django.db import models class User(OldUser): def __init__(self, *args, **kwargs): super(User,

Re: username > 30 characters?

2007-03-26 Thread Vasily Sulatskov
> It does work. However the "email" field of User should be set to > "blank=False" and "unique=True" if we really want to use email as the > unique userid. How can we override the default field definition of > User.email? You can add unique constraint on email column on database level, Django w

Re: username > 30 characters?

2007-03-26 Thread Malcolm Tredinnick
On Mon, 2007-03-26 at 16:25 +, John Lee wrote: > It does work. However the "email" field of User should be set to > "blank=False" and "unique=True" if we really want to use email as the > unique userid. How can we override the default field definition of > User.email? You cannot override an

Re: username > 30 characters?

2007-03-26 Thread John Lee
It does work. However the "email" field of User should be set to "blank=False" and "unique=True" if we really want to use email as the unique userid. How can we override the default field definition of User.email? I tried something like this: from django.contrib.auth.models import User as OldU

Re: username > 30 characters?

2007-02-04 Thread Vasily Sulatskov
Create your own authentication backend that uses emails instead of usernames. Something like: from django.contrib.auth.models import User class BasicBackend: def get_user(self, user_id): try: return User.objects.get(pk=user_id) except User.DoesNotExist:

username > 30 characters?

2007-02-04 Thread [EMAIL PROTECTED]
I'm re-engineering an existing directory application to use Django. The application uses email addresses as the primary unique userid. My understanding is that to map this to the Django User model this needs to become the username. Unfortunately email addresses are often longer than 30 charact