diff options
| author | Chris Beaven <smileychris@gmail.com> | 2010-12-18 02:50:26 +0000 |
|---|---|---|
| committer | Chris Beaven <smileychris@gmail.com> | 2010-12-18 02:50:26 +0000 |
| commit | 3ae9117c467f9fabed8736949dee209d40293b8d (patch) | |
| tree | c59d631524d472dc2c4d85fa925648544836e5a2 /docs/topics/forms | |
| parent | 99742d8d73c3cc64014b5831c84c17928628c3f9 (diff) | |
Fixes #7817 and #9456.
- The include tag now has a 'with' option to include to provide extra context
vairables to the included template.
- The include tag now has an 'only' option to exclude the current context
when rendering the included template.
- The with tag now accepts multiple variable assignments.
- The with, include and blocktrans tags now use a new keyword argument format
for variable assignments (e.g. `{% with foo=1 bar=2 %}`).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14922 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/topics/forms')
| -rw-r--r-- | docs/topics/forms/index.txt | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/docs/topics/forms/index.txt b/docs/topics/forms/index.txt index 30b09c00a9..fc19ff63ef 100644 --- a/docs/topics/forms/index.txt +++ b/docs/topics/forms/index.txt @@ -371,12 +371,11 @@ using the :ttag:`include` tag to reuse it in other templates:: {% endfor %} If the form object passed to a template has a different name within the -context, you can alias it using the :ttag:`with` tag:: +context, you can alias it using the ``with`` argument of the :ttag:`include` +tag:: <form action="/comments/add/" method="post"> - {% with comment_form as form %} - {% include "form_snippet.html" %} - {% endwith %} + {% include "form_snippet.html" with form=comment_form %} <p><input type="submit" value="Submit comment" /></p> </form> |
