Hi,

I have three cascading select input fields. I data is different, but for 
example: state, city and street. They
are all ModelChoiceFields.

With jquery and view returning json, it is very easy to fill "city" if you select 
"state".

But if the form gets submitted, and only "state" and "city" are filled, I want 
to display
the form again.

Up to now, I almost never use request.GET or request.POST and always use 
form.cleaned_data.

But here you need to peek into request.POST, since I want to fill "state" 
before the form gets cleaned.

Not impossible, but not nice since I need to support form prefixes, too.


In forms.py there is _raw_value():
 Returns the raw_value for a particular field name. This is just a
 convenient wrapper around widget.value_from_datadict.

How do you handle "peeking into the request-data"? I think _raw_value() should 
be in the public API.

  Thomas




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