1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #18651 -- Enabled optional assignments for simple_tag().

This commit is contained in:
Preston Timmons
2015-01-16 17:34:32 -06:00
committed by Tim Graham
parent 8adc59038c
commit cd4282816d
6 changed files with 130 additions and 319 deletions

View File

@@ -137,7 +137,9 @@ Signals
Templates
^^^^^^^^^
* ...
* Template tags created with the :meth:`~django.template.Library.simple_tag`
helper can now store results in a template variable by using the ``as``
argument.
Requests and Responses
^^^^^^^^^^^^^^^^^^^^^^
@@ -194,6 +196,15 @@ Miscellaneous
Features deprecated in 1.9
==========================
``assignment_tag()``
~~~~~~~~~~~~~~~~~~~~
Django 1.4 added the ``assignment_tag`` helper to ease the creation of
template tags that store results in a template variable. The
:meth:`~django.template.Library.simple_tag` helper has gained this same
ability, making the ``assignment_tag`` obsolete. Tags that use
``assignment_tag`` should be updated to use ``simple_tag``.
Miscellaneous
~~~~~~~~~~~~~