That was a great help thanks. I also used the copy() method on the
request.POST dict and I could redirect to the same view. Cheers.

On Mar 24, 2009 3:43 PM, "Thomas Guettler" <h...@tbz-pariv.de> wrote:


Hi,

my guess: You need to redirect after POST.

if you give request.POST to the Form, it will overwrite the values
from the model with the values from request.POST. If you do a redirect
after POST, the value from the model will be displayed, since POST
is empty after the redirect.

BTW, I often do it like this:

def view(request):
   if request.POST:
       data=request.POST
   else:
       data=None
   form=MyForm(data)

Why do you access 'build_release' in POST? It would be better
the create a Field for it and access form.cleaned_data['build_release']

 HTH,
  Thomas

DarrenM schrieb:
> ...

> elif request.POST['build_release']: > f = BuildForm(request.POST) > ...
--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to