Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #18625 -- Removed old-style use of url tag

from the documentation.
  • Loading branch information...
commit fb46f243b4c48ab42ed2f33a2636f7c33f5861a9 1 parent c57abd3
Aymeric Augustin authored
2  docs/ref/contrib/comments/index.txt
@@ -250,7 +250,7 @@ Redirecting after the comment post
250 250
 To specify the URL you want to redirect to after the comment has been posted,
251 251
 you can include a hidden form input called ``next`` in your comment form. For example::
252 252
 
253  
-    <input type="hidden" name="next" value="{% url my_comment_was_posted %}" />
  253
+    <input type="hidden" name="next" value="{% url 'my_comment_was_posted' %}" />
254 254
 
255 255
 .. _notes-on-the-comment-form:
256 256
 
4  docs/topics/http/urls.txt
@@ -704,8 +704,8 @@ target each pattern individually by using its name:
704 704
 
705 705
 .. code-block:: html+django
706 706
 
707  
-    {% url arch-summary 1945 %}
708  
-    {% url full-archive 2007 %}
  707
+    {% url 'arch-summary' 1945 %}
  708
+    {% url 'full-archive' 2007 %}
709 709
 
710 710
 Even though both URL patterns refer to the ``archive`` view here, using the
711 711
 ``name`` parameter to ``url()`` allows you to tell them apart in templates.
6  docs/topics/i18n/translation.txt
@@ -596,7 +596,7 @@ apply.
596 596
 Reverse URL lookups cannot be carried out within the ``blocktrans`` and should
597 597
 be retrieved (and stored) beforehand::
598 598
 
599  
-    {% url path.to.view arg arg2 as the_url %}
  599
+    {% url 'path.to.view' arg arg2 as the_url %}
600 600
     {% blocktrans %}
601 601
     This is a URL: {{ the_url }}
602 602
     {% endblocktrans %}
@@ -790,7 +790,7 @@ To use the catalog, just pull in the dynamically generated script like this:
790 790
 
791 791
 .. code-block:: html+django
792 792
 
793  
-    <script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script>
  793
+    <script type="text/javascript" src="{% url 'django.views.i18n.javascript_catalog' %}"></script>
794 794
 
795 795
 This uses reverse URL lookup to find the URL of the JavaScript catalog view.
796 796
 When the catalog is loaded, your JavaScript code can use the standard
@@ -992,7 +992,7 @@ template tag. It enables the given language in the enclosed template section:
992 992
     {% trans "View this category in:" %}
993 993
     {% for lang_code, lang_name in languages %}
994 994
         {% language lang_code %}
995  
-        <a href="{% url category slug=category.slug %}">{{ lang_name }}</a>
  995
+        <a href="{% url 'category' slug=category.slug %}">{{ lang_name }}</a>
996 996
         {% endlanguage %}
997 997
     {% endfor %}
998 998
 

0 notes on commit fb46f24

Please sign in to comment.
Something went wrong with that request. Please try again.