Hi thanks for your replay,
It is the second situation, I re-write the form.py like this
class RegistrationForm(forms.Form):
........ (other stuff )....
def save(self, profile_callback=None):
new_user =
RegistrationProfile.objects.create_inactive_user(username=self.cleaned_data['username'],
password=self.cleaned_data['password1'],
email=self.cleaned_data['email'],
nickname = self.cleaned_data['nickname'],
country = self.cleaned_data['country'],
province = self.cleaned_data['province'],
city = self.cleaned_data['city'],
gender = self.cleaned_data['gender'],
phone = self.cleaned_data['phone'],
bio = self.cleaned_data['bio'],
profile_callback=profile_callback)
return new_user
and then I changed the models.py in this way.
def create_inactive_user(self, username, password,
email,dob,nickname,country,province,
city,gender,phone,bio,send_email=True,
profile_callback=None):
new_user =
User.objects.create_user(username,last_name,first_name, email,
password)
new_user.is_active = False
new_user.save()
registration_profile = self.create_profile(new_user)
userdetail =
UserDetail(new_user,nickname,dob,country,province,city,gender,phone,bio)
userdetail.save()
if profile_callback is not None:
profile_callback(user=new_user)
but the browser throw the error like this
TypeError at /veryuser/register/
create_inactive_user() takes at least 12 non-keyword arguments (4
given)
thanks
On Jun 13, 5:17 pm, "James Bennett" <
ubernost...@gmail.com> wrote:
> 2008/6/13 Chr1s <
kkndda...@gmail.com>: