Re: Authenticate User with Django 1.5

2012-12-16 Thread Russell Keith-Magee
On Sun, Dec 16, 2012 at 9:12 AM, Ian Foote wrote: > On 15/12/12 11:18, sebastien.mor...@gmail.com wrote: > >> I've a custum user model which looks like : >> >> class User(AbstractBaseUser): >> email = models.EmailField(unique=True) >> activation_key =

Re: Authenticate User with Django 1.5

2012-12-16 Thread Tom Christie
> A custom authentication backend isn't required; the ModelBackend should adapt to any well-defined User model. Thanks Russ, I hadn't realized the ModelBackend tied in nicely with those changes. > Have you tried changing USERNAME_FIELD to 'email'? +1, looks like that's the OP's issue. On

Re: Authenticate User with Django 1.5

2012-12-15 Thread Ian Foote
On 15/12/12 11:18, sebastien.mor...@gmail.com wrote: Hi, i've an authenticate problem with Django 1.5 All informations are herehttp://stackoverflow.com/questions/13883539/authenticate-with-django-1-5 but i'll resume the situation : I've a custum user model which looks like : class

Re: Authenticate User with Django 1.5

2012-12-15 Thread Russell Keith-Magee
On Sat, Dec 15, 2012 at 7:18 PM, wrote: > Hi, i've an authenticate problem with Django 1.5 > All informations are here > http://stackoverflow.com/questions/13883539/authenticate-with-django-1-5but > i'll resume the situation : > > I've a custum user model which looks

Re: Authenticate User with Django 1.5

2012-12-15 Thread Russell Keith-Magee
Hi Tom, You've missed an important detail here: he's talking about Django 1.5 and a custom User model. A custom authentication backend isn't required; the ModelBackend should adapt to any well-defined User model. Yours, Russ Magee %-) On Sun, Dec 16, 2012 at 6:33 AM, Tom Christie

Authenticate User with Django 1.5

2012-12-15 Thread Tom Christie
I believe you'll need a custom authentication backend to tie in with your user model. Take a look at the docs here: https://docs.djangoproject.com/en/dev/ref/authbackends/ Here's an example of an auth backend that takes email/password instead of username/password:

Authenticate User with Django 1.5

2012-12-15 Thread sebastien . morele
Hi, i've an authenticate problem with Django 1.5 All informations are here http://stackoverflow.com/questions/13883539/authenticate-with-django-1-5but i'll resume the situation : I've a custum user model which looks like : class User(AbstractBaseUser): email = models.EmailField(unique=True)