I'm seeking advice on how to ensure my form data in hidden
fields is
the same after the user has posted the form.
I've got a form instance containing my data and rendered
this to html
with the data in hidden fields. My Post then takes this data
and
stores it to a database. I'm passing it in hidden fields to
avoid
additional database queries and I'm not using the session
key because
the number of items is variable and could be 20 or more and
session
keys may get confusing.
I'd like to hash the Form instance before the data is posted
and then
check with a hash of the data returned by the Post event.
At the moment the hash I generate form the Form before
posting gives
me a different result from the posted data and I'm wondering
whether
the order of the fields is being affected in the post.
Anyone done this successfully and can offer some pointers?
I'm also struggling to come up with a decent way to do the
comparison
of the hash versions of the form between the two parts of
the view
(creating the form instance and post data). i.e. what is the
best way
to pass the pre data hash (this could be one for a session
key).
Any advice welcome.
--~--~---------~--~----~------------~-------~--~----~
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-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|