diff options
| author | Jannis Leidel <jannis@leidel.info> | 2010-01-26 15:02:53 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2010-01-26 15:02:53 +0000 |
| commit | c14937cf7a1e8c25702e89485cc2dd33aa0d3a16 (patch) | |
| tree | 41894e28b3b2ba2e5c0c8adfea919f2553835644 /tests/regressiontests/forms | |
| parent | df82175c17667b76ac968e059583f795b8909526 (diff) | |
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
Diffstat (limited to 'tests/regressiontests/forms')
| -rw-r--r-- | tests/regressiontests/forms/formsets.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/regressiontests/forms/formsets.py b/tests/regressiontests/forms/formsets.py index dd2b188fd2..7999710ec1 100644 --- a/tests/regressiontests/forms/formsets.py +++ b/tests/regressiontests/forms/formsets.py @@ -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 ###################################################### |
