I am trying to use the "simple" backend in django-registration 0.8, but my call to register yields the error "register() takes at least 2 arguments (2 given)" when I go to /accounts/register (as well as at /register)
My code is below.
from django.conf.urls import patterns, include, url
from registration.views import register
urlpatterns = patterns('',
url(r'^$', 'app.views.home'),
url(r'/accounts', include('registration.backends.simple.urls')),
url(r'register', 'registration.views.register', {'success_url':''}),
)
You haven't passed the correct two parameters. The register
view requires two args: request
and backend
. Everything else (all the kwargs) are optional. Django automatically passes request
and you passed in the success_url
kwarg, so that's 2, but you're missing backend
.