diff options
| author | Alasdair Nicol <alasdair@thenicols.net> | 2015-12-03 00:31:09 +0000 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-12-03 10:41:39 -0500 |
| commit | 519cfbb4e8f388664347fcc708e44148148ed6f8 (patch) | |
| tree | ff9909a2293173bdcee260dcd86fc88e7f769121 | |
| parent | 64200c14e0072ba0ffef86da46b2ea82fd1e019a (diff) | |
[1.9.x] Fixed #25851 -- Removed links to deprecated assignment tag docs.
Backport of b6dd0afead80a17d0ac8c3ba35c510afac32a0b8 from master
| -rw-r--r-- | docs/howto/custom-template-tags.txt | 9 | ||||
| -rw-r--r-- | docs/releases/1.4.txt | 14 |
2 files changed, 9 insertions, 14 deletions
diff --git a/docs/howto/custom-template-tags.txt b/docs/howto/custom-template-tags.txt index f44715a14a..5beed7637e 100644 --- a/docs/howto/custom-template-tags.txt +++ b/docs/howto/custom-template-tags.txt @@ -649,8 +649,6 @@ positional arguments. For example: {% my_tag 123 "abcd" book.title warning=message|lower profile=user.profile %} -.. _howto-custom-template-tags-assignment-tags: - Assignment tags ~~~~~~~~~~~~~~~ @@ -1131,10 +1129,9 @@ The difference here is that ``do_current_time()`` grabs the format string and the variable name, passing both to ``CurrentTimeNode3``. Finally, if you only need to have a simple syntax for your custom -context-updating template tag, you might want to consider using the -:ref:`assignment tag <howto-custom-template-tags-assignment-tags>` shortcut -we introduced above. - +context-updating template tag, consider using the +:meth:`~django.template.Library.simple_tag` shortcut, which supports assigning +the tag results to a template variable. Parsing until another block tag ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/releases/1.4.txt b/docs/releases/1.4.txt index 5b63758bbb..63537aaa54 100644 --- a/docs/releases/1.4.txt +++ b/docs/releases/1.4.txt @@ -406,19 +406,17 @@ object generic views. Assignment template tags ~~~~~~~~~~~~~~~~~~~~~~~~ -A new :ref:`assignment_tag<howto-custom-template-tags-assignment-tags>` helper -function was added to ``template.Library`` to ease the creation of template -tags that store data in a specified context variable. +A new ``assignment_tag`` helper function was added to ``template.Library`` to +ease the creation of template tags that store data in a specified context +variable. ``*args`` and ``**kwargs`` support for template tag helper functions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The :ref:`simple_tag<howto-custom-template-tags-simple-tags>`, -:ref:`inclusion_tag <howto-custom-template-tags-inclusion-tags>` and -newly introduced -:ref:`assignment_tag<howto-custom-template-tags-assignment-tags>` template -helper functions may now accept any number of positional or keyword arguments. -For example:: +:ref:`inclusion_tag <howto-custom-template-tags-inclusion-tags>` and newly +introduced ``assignment_tag`` template helper functions may now accept any +number of positional or keyword arguments. For example:: @register.simple_tag def my_tag(a, b, *args, **kwargs): |
