On Mar 14, 12:08 am, ihome <ihomest...@gmail.com> wrote:
> Hi,
>
> I am using the latest django development version and have some problem
> with the render_to_response to render a template. Here is a short
> snippet:
>
> return render_to_response('index.html', {
> 'form': form,
> 'ops' : ops,
> })
>
> form comes from a newly defined data form inherited from forms.Form.
> For one line in my template index.html:
>
> <input name="v" type="text" value="{{ form.v }}" />
>
> The rendered html page looks like:
>
> <input name="v" type="text" value="<input type="text" name="p"
> value="100" id="id_p" />" />
One typo: it is generated as:
<input name="v" type="text" value="<input type="text" name="v"
value="100" id="id_v" />" />
which is not what I expect the code to behave. Any idea of what is
wrong?
>
> Not sure why the render_to_response want to generate a whole <input
> type="text" name="p" value="100" id="id_p" /> for my {{ form.v }}
>
> Do I miss anything here? I do not want this pre-defined behaviour. Is
> there a way to turn it off. For ops dict type, everything works as
> expected.
>
> Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---