Fixed #10107 -- Allowed using mark_safe() as a decorator.

Thanks ArcTanSusan for the initial patch.
This commit is contained in:
Scott Vitale 2016-06-02 15:11:43 -06:00 committed by Tim Graham
parent 5e3f4c2e53
commit be729b6120
5 changed files with 53 additions and 2 deletions

View file

@ -832,6 +832,8 @@ appropriate entities.
Can be called multiple times on a single string.
Can also be used as a decorator.
For building up fragments of HTML, you should normally be using
:func:`django.utils.html.format_html` instead.
@ -846,6 +848,10 @@ appropriate entities.
>>> type(mystr)
<type 'str'>
.. versionchanged:: 1.11
Added support for decorator usage.
.. function:: mark_for_escaping(s)
.. deprecated:: 1.10

View file

@ -202,7 +202,7 @@ Signals
Templates
~~~~~~~~~
* ...
* :meth:`~django.utils.safestring.mark_safe` can now be used as a decorator.
Tests
~~~~~