Dear all, I currently want to have a registration system. For that matter I will be using the existing django.contrib.auth.models.User.
So I created a form object as such: class RegisterForm(ModelForm): class Meta: model = User And the view: def form(request): if request.method == 'POST': # If the form has been submitted... form = RegisterForm(request.POST) # A form bound to the POST data if form.is_valid(): # All validation rules pass # Process the data in form.cleaned_data new_member = form.save() return HttpResponseRedirect('/register/thanks/') # Redirect after POST else: form = RegisterForm() # An unbound form return render_to_response('register/form.html', { 'form': form, }) But unfortunately I can not save the User object into database. But, if I create my own User object and use that instead, I have no problem saving it into the database. Is there any specific behaviour on django.contrib.auth.models.User that I must look out. Thank you very much in advance -- If you can't believe in God the chances are your God is too small. Read my blog: http://joshuajava.wordpress.com/ Follow me on twitter: http://twitter.com/jpartogi --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---