From 235f29fa374d5b1aa6eaa4aa48a30f40bfbe5957 Mon Sep 17 00:00:00 2001 From: Timo Graham Date: Wed, 29 Dec 2010 14:23:10 +0000 Subject: [PATCH] [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 --- docs/topics/i18n/internationalization.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/topics/i18n/internationalization.txt b/docs/topics/i18n/internationalization.txt index b6847ea241..6f3b48b687 100644 --- a/docs/topics/i18n/internationalization.txt +++ b/docs/topics/i18n/internationalization.txt @@ -417,6 +417,14 @@ construct is internally converted to an ``ungettext`` call. This means the same :ref:`notes regarding ungettext variables ` 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