mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Fixed #12508 - Added ability to dynamically add inlines in the admin app.
Refs #13. Also introduces an ``empty_form`` attribute on formsets to make it easier to implement dynamic forms. Many thanks to Zain Memon for the initial patch from his Summer of Code 2009 project, Stanislaus Madueke for his django-dynamic-formset app and all the other people helping out. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12297 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
df82175c17
commit
c14937cf7a
19 changed files with 6505 additions and 38 deletions
|
|
@ -238,6 +238,13 @@ data.
|
|||
<li>Choice: <input type="text" name="choices-3-choice" /></li>
|
||||
<li>Votes: <input type="text" name="choices-3-votes" /></li>
|
||||
|
||||
Make sure retrieving an empty form works, and it shows up in the form list
|
||||
|
||||
>>> formset.empty_form.empty_permitted
|
||||
True
|
||||
>>> print formset.empty_form.as_ul()
|
||||
<li>Choice: <input type="text" name="choices-__prefix__-choice" /></li>
|
||||
<li>Votes: <input type="text" name="choices-__prefix__-votes" /></li>
|
||||
|
||||
# FormSets with deletion ######################################################
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue