On 7 February 2011 03:34, gintare <[email protected]> wrote:
> I would like to use only plain html field names
> Reading them is not a problem with request in views.
> How to populate html document back ?
>
>
> I have *.html with lines:
>
>
>  <textarea  cols="10" rows="1" name="LangFROM" value="LangFROM"></
> textarea>
>  <input type="checkbox" checked=True  name="cbnWw" id="cbiWw">
>  <input type="checkbox "  name="cbndateWw" id="cbidateWw">
>
> #in views.py
> item = request.POST.get('cbnWw','')
> #do smth with item
> #now i would like to return item back to html.
> #Normally i should use {{ }} for variable output.
> #IS IT POSSIBLE TO USE HTML SYNTAX  and populate textarea and
> checkboxes
>
>  return render_to_response('x.html',{ 'LangFROMt', 'EN'}, ....
>
>
> ?

Nope, because Django's templating system doesn't know anything about
the template's structure/syntax. The templating system can be used for
more than just HTML (e.g. JSON, XML, CSV etc.).

What's wrong with using the {{ }} templating syntax? The alternative
you're suggesting makes things very confusing - the template will be
getting values from two different places, and what happens if there is
more than one form in the template with the same field name?

> regards,
> gintare
>
> --
> 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.
>
>

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

Reply via email to