Hudar wrote:
Hello, I am new to django and still go through the tutorial. Just made
a simple registration form using django and found this error :

http://dpaste.com/168746/

Below are the register function I wrote :

def register(request):
    if request.method == "POST":
        form = UserCreationForm(request.POST)
        if form.is_valid():
            new_user = form.save()
            return render_to_response('index.html', {'message': 'Your
account has saved'})
    else:
        form = UserCreationForm()
        return render_to_response('users/register.html', {
            'form': form,
        })

Looks like your view doesn't return anything when form.is_valid() returns False. That could be the problem.

Ilya

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@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.

Reply via email to