I use the django-registration module, but this is a django/python question.
In a custom view:
def register(self, request, **cleaned_data):
firstname, lastname, email, password = cleaned_data['firstname'], cleaned_data['lastname'], cleaned_data['email'], cleaned_data['password']
if Site._meta.installed:
site = Site.objects.get_current()
else:
site = RequestSite(request)
new_user = RegistrationProfile.objects.create_inactive_user(email, email,
password, firstname,
lastname, site)
signals.user_registered.send(sender=self.__class__,
user=new_user,
request=request)
return new_user
And when I send my form, I get this error:
TypeError at /accounts/register/
create_inactive_user() takes at most 6 arguments (7 given)
pointing at my create_inactive_user(email, email, password, firstname, lastname, site) ... that have 6 arguments!!!
I tried with hard-coded values, but I get the same message.
Judging by the code, that create method isn't expecting a first name and last name argument - self will get passed implicitly, but it wants you to pass it 5 variables - username, email, password, site, and an optional send_email.
You're giving it too many (and incorrect) arguments :)