summaryrefslogtreecommitdiff
path: root/docs/intro/tutorial03.txt
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-08-18 09:55:13 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-08-18 09:58:42 +0200
commit4da1d0fd65e01abe013e0d5a9174b81c6bbfa677 (patch)
tree501e9ab180b838a80fb1035a18be1020fd168c60 /docs/intro/tutorial03.txt
parent4c934f3921a59c7b3e088f6472b6f6da40848567 (diff)
Added a warning about the {% url %} syntax change
at the point where it bites most beginners. Refs #18787, #18762, #18756, #18723, #18705, #18689 and several duplicates.
Diffstat (limited to 'docs/intro/tutorial03.txt')
-rw-r--r--docs/intro/tutorial03.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/intro/tutorial03.txt b/docs/intro/tutorial03.txt
index d15b2f43ae..6d4fb7eef1 100644
--- a/docs/intro/tutorial03.txt
+++ b/docs/intro/tutorial03.txt
@@ -550,5 +550,16 @@ with the :ttag:`url` template tag:
<li><a href="{% url 'polls.views.detail' poll.id %}">{{ poll.question }}</a></li>
+.. note::
+
+ If ``{% url 'polls.views.detail' poll.id %}`` (with quotes) doesn't work,
+ but ``{% url polls.views.detail poll.id %}`` (without quotes) does, that
+ means you're using a version of Django ≤ 1.4. In this case, add the
+ following declaration at the top of your template:
+
+ .. code-block:: html+django
+
+ {% load url from future %}
+
When you're comfortable with writing views, read :doc:`part 4 of this tutorial
</intro/tutorial04>` to learn about simple form processing and generic views.