Commit 235f29fa authored by Timo Graham's avatar Timo Graham
Browse files

[1.2.X] Fixed #13961 - note that reverse URL lookups can't be done within a...

[1.2.X] Fixed #13961 - note that reverse URL lookups can't be done within a blocktrans tag. Thanks garrison for the report and richardb and zerok for work on the patch.

Backport of r15100 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15101 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 6ace3a93
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -417,6 +417,14 @@ construct is internally converted to an ``ungettext`` call. This means the
same :ref:`notes regarding ungettext variables <pluralization-var-notes>`
apply.

Reverse URL lookups cannot be carried out within the ``blocktrans`` and should
be retrieved (and stored) beforehand::

    {% url path.to.view arg arg2 as the_url %}
    {% blocktrans %}
    This is a URL: {{ the_url }}
    {% endblocktrans %}

.. _template-translation-vars:

Other tags