Hi,

It's a while since I've used django and I have a little problem with a
new form.
The user has to do the same thing twice, which is a bit awkward...

First I go to the page with a normal href.

[07/Apr/2011 11:00:29] "GET /request/ HTTP/1.1" 200 2055

After that, I've a page where the user has to made a choice

forms.py
------------
(choice = forms.ChoiceField(choices=REQUEST_CHOICES)

views.py (relevant part)
---------------------------------
 if request.method == 'POST':
        form = ReqStartForm(request.POST)
        if form.is_valid():
            choice = form.cleaned_data['choice']
...
            if choice == "O":
                return HttpResponseRedirect('/request/other/')
    else:
        form = ReqStartForm()
    return render_to_response('form.html', {'form': form },
context_instance=RequestContext(request))


[07/Apr/2011 11:03:23] "POST /request/ HTTP/1.1" 302
0                       <--
[07/Apr/2011 11:03:23] "GET /request/other/ HTTP/1.1" 200 2055

After the user submits for the second time, the form forwards
successfully

[07/Apr/2011 11:07:39] "POST /request/other/ HTTP/1.1" 200 2007


What am I doing wrong?



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to