def createUserSuccess(request): successForm = UserRegistrationForm(request.POST) if successForm.is_valid(): request.session['userName']=request.POST.get("username") render_to_response("UserCreationSuccess.html",{"form":successForm}) else: render_to_response("Welcome.html")
def createUserNew(request): regForm = UserRegistrationForm(request.POST) print regForm if regForm.is_valid(): if regForm.error_messages: print "before createNewUser.html" regForm.save() print "after save" return render_to_response('UserCreationSuccess.html',{"form":regForm},context_instance=RequestContext(request)) else: print "before save" regForm.save() print "before Login.html" return render_to_response("login.html",context_instance=RequestContext(request)) else: print "before createNewUser.html1" return render_to_response('CreateNewUser.html',{"form":regForm},context_instance=RequestContext(request))