views:

66

answers:

1

I am planning to do email-registration-activation on my site which will be launched very soon. I have just started looking at django-registration and I am open to other email-registration-activation system available on django.

My only requirement is that for my site, I don't actually use usernames. Rather, user logs in with their emails and passwords. I want to get an expert's opinion how to modify django-registration cleanly and safely for this purpose.

If there are easier solutions which are scalable, feel free to post up here.

+2  A: 

We used django-registration with a custom backend, where we overwrote (or defined) the clean method of the registration form:

def clean():
    ...
    # use the email as the username 
    if 'email' in self.cleaned_data:
        self.cleaned_data['username'] = self.cleaned_data['email']

There are other ways:

Note that by default, usernames can be only 30 chars long. You'll need a hack for that, too:

The MYYN
Choices choices. +1.
Manoj Govindan
Lot of information is good, but choices are bad -
The MYYN