django-registration Require a unique email address for registration

Everyone uses django-registration for... registration... however.. you may get this error:

TypeError at /accounts/register/ register() takes at least 2 non-keyword arguments (1 given)

Here's what your should look like for the /accounts/register/ url:

from django.conf.urls.defaults import *
from registration.forms import RegistrationFormUniqueEmail

urlpatterns = patterns('',
     (r'^accounts/register/', 'registration.views.register', {'form_class':RegistrationFormUniqueEmail,'backend':'registration.backends.default.DefaultBackend' }),
Tagged as django , django-registration registration
Written by Andrew Konkol on July 20th, 2011


Log in with Twitter, Google, Facebook, LinkedIn to leave a comment.