Skip to content

Commit

Permalink
Fixed #18625 -- Removed old-style use of url tag
Browse files Browse the repository at this point in the history
from the documentation.
  • Loading branch information
aaugustin committed Jul 15, 2012
1 parent c57abd3 commit fb46f24
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/ref/contrib/comments/index.txt
Expand Up @@ -250,7 +250,7 @@ Redirecting after the comment post
To specify the URL you want to redirect to after the comment has been posted,
you can include a hidden form input called ``next`` in your comment form. For example::

<input type="hidden" name="next" value="{% url my_comment_was_posted %}" />
<input type="hidden" name="next" value="{% url 'my_comment_was_posted' %}" />

.. _notes-on-the-comment-form:

Expand Down
4 changes: 2 additions & 2 deletions docs/topics/http/urls.txt
Expand Up @@ -704,8 +704,8 @@ target each pattern individually by using its name:

.. code-block:: html+django

{% url arch-summary 1945 %}
{% url full-archive 2007 %}
{% url 'arch-summary' 1945 %}
{% url 'full-archive' 2007 %}

Even though both URL patterns refer to the ``archive`` view here, using the
``name`` parameter to ``url()`` allows you to tell them apart in templates.
Expand Down
6 changes: 3 additions & 3 deletions docs/topics/i18n/translation.txt
Expand Up @@ -596,7 +596,7 @@ 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 %}
{% url 'path.to.view' arg arg2 as the_url %}
{% blocktrans %}
This is a URL: {{ the_url }}
{% endblocktrans %}
Expand Down Expand Up @@ -790,7 +790,7 @@ To use the catalog, just pull in the dynamically generated script like this:

.. code-block:: html+django

<script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script>
<script type="text/javascript" src="{% url 'django.views.i18n.javascript_catalog' %}"></script>

This uses reverse URL lookup to find the URL of the JavaScript catalog view.
When the catalog is loaded, your JavaScript code can use the standard
Expand Down Expand Up @@ -992,7 +992,7 @@ template tag. It enables the given language in the enclosed template section:
{% trans "View this category in:" %}
{% for lang_code, lang_name in languages %}
{% language lang_code %}
<a href="{% url category slug=category.slug %}">{{ lang_name }}</a>
<a href="{% url 'category' slug=category.slug %}">{{ lang_name }}</a>
{% endlanguage %}
{% endfor %}

Expand Down

0 comments on commit fb46f24

Please sign in to comment.