def register(request): if request.method == 'POST': uf = UserForm(request.POST) if uf.is_valid(): username = uf.cleaned_data['username'] password = uf.cleaned_data['password'] email = uf.cleaned_data['email'] user = UserFile() user.username = username user.password = password user.email = email user.save() return render_to_response('success.html',{'username':username}) else: uf = UserForm() return render_to_response('register.html',{'uf':uf})