On Sun, 2007-10-14 at 18:32 -0700, Greg wrote: > Malcolm, > I think I'm finally starting to get somewhere with this. I assigned > my hidden field the initial 0 value > > seen_updates = forms.IntegerField(widget=forms.HiddenInput, initial=0) > > I was thinking that I could just do the following > 'request['seen_updates'] = '1'' in my view and just resend > ContactForm(request.POST). However, I guess I can't assign a value to > a POST element.
This is true. Quoting from http://www.djangoproject.com/documentation/request_response/#attributes : "All attributes except session should be considered read-only." (for an HttpRequest instance). > So does that mean I need to create a data field that > populates my entire form again > > data = {'seen_updates': 1'', > ... 'b_name': request['b_name'], > ... 'b_address': request['b_address'], > ... 'b_city': request['b_city'] > etc....} data = request.POST.copy() is simpler. Then you can alter 'data' as it's just a dictionary (well, it's actually a QueryDict, as documented at http://www.djangoproject.com/documentation/request_response/#querydict-objects but the difference is mostly academic for most uses). Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

