On Feb 8, 6:56 pm, niklasr <[email protected]> wrote:
> I'm looking for template tags or similar that according to http get
> request parameters set the corresponding html form fields. To achieve
> the selection of an html option and populate a textfield according to
> the http request parameters where http get with two parameters should
> prepopulate a textfield and the option selected in my html form /main?
> q=foo&w=2 should set the textfield to 'foo' and the select option 2 to
> state selected. I saw no template tag that directly tests or handles a
> http get parameter but there probably is, for a more direct and
> favorable way than passing the request parameters and testing option
> by option
>  <select>
> ...
> {% ifequal w "2" %}
> <option selected  value="apples">Apples</option>
> {% else %}
> <option value="apples">Apples</option>
>  {% endifequal %}
> ...
> Thank you
> Niklas

This is normally done using Django forms:
http://docs.djangoproject.com/en/dev/topics/forms/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to