Thursday, July 5, 2012

Re: insert html into a form from Django code (not template)

On 5-7-2012 16:48, angelika wrote:
> Only a few of the fields need to be repeated in the form, not the entire
> form.

Right, so split out the repeated fields in a separate form. Remember
that the form tag and submit button is not part of the form object. If
these repeated fields are many-to-many relationships of a model, then
look at inline formsets:
<https://docs.djangoproject.com/en/1.4/topics/forms/modelforms/#inline-formsets>

--
Melvyn Sopacua


--
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 http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment