1
0
mirror of https://github.com/django/django.git synced 2025-08-31 14:19:13 +00:00

Fixed some docstrings that were raising Sphinx warnings when running the admindocs tests.

This commit is contained in:
Julien Phalip 2013-02-24 12:03:24 -08:00
parent b88bf9f125
commit 438ce4ec55

View File

@ -23,13 +23,13 @@ def cycle(parser, token):
By default all strings are escaped. By default all strings are escaped.
If you want to disable auto-escaping of variables you can use: If you want to disable auto-escaping of variables you can use::
{% autoescape off %} {% autoescape off %}
{% cycle var1 var2 var3 as somecycle %} {% cycle var1 var2 var3 as somecycle %}
{% autoescape %} {% autoescape %}
Or if only some variables should be escaped, you can use: Or if only some variables should be escaped, you can use::
{% cycle var1 var2|safe var3|safe as somecycle %} {% cycle var1 var2|safe var3|safe as somecycle %}
""" """
@ -41,23 +41,23 @@ def firstof(parser, token):
""" """
This is the future version of `firstof` with auto-escaping. This is the future version of `firstof` with auto-escaping.
This is equivalent to: This is equivalent to::
{% if var1 %} {% if var1 %}
{{ var1 }} {{ var1 }}
{% elif var2 %} {% elif var2 %}
{{ var2 }} {{ var2 }}
{% elif var3 %} {% elif var3 %}
{{ var3 }} {{ var3 }}
{% endif %} {% endif %}
If you want to disable auto-escaping of variables you can use: If you want to disable auto-escaping of variables you can use::
{% autoescape off %} {% autoescape off %}
{% firstof var1 var2 var3 "<strong>fallback value</strong>" %} {% firstof var1 var2 var3 "<strong>fallback value</strong>" %}
{% autoescape %} {% autoescape %}
Or if only some variables should be escaped, you can use: Or if only some variables should be escaped, you can use::
{% firstof var1 var2|safe var3 "<strong>fallback value</strong>"|safe %} {% firstof var1 var2|safe var3 "<strong>fallback value</strong>"|safe %}