Fixed #5187 -- Minor doc tweaks. Thanks, Daniel Hahler.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2007-08-18 05:43:38 +00:00
parent d743ccbc4b
commit 3b9b87792a
4 changed files with 9 additions and 9 deletions

View File

@ -676,16 +676,16 @@ def do_if(parser, token):
tag, because the order of logic would be ambigous. For example,
this is invalid::
{% if athlete_list and coach_list or cheerleader_list %}
{% if athlete_list and coach_list or cheerleader_list %}
If you need to combine and and or to do advanced logic, just use
If you need to combine ``and`` and ``or`` to do advanced logic, just use
nested if tags. For example:
{% if athlete_list %}
{% if coach_list or cheerleader_list %}
We have athletes, and either coaches or cheerleaders!
{% if athlete_list %}
{% if coach_list or cheerleader_list %}
We have athletes, and either coaches or cheerleaders!
{% endif %}
{% endif %}
{% endif %}
"""
bits = token.contents.split()
del bits[0]

View File

@ -140,7 +140,7 @@ def do_extends(parser, token):
This tag may be used in two ways: ``{% extends "base" %}`` (with quotes)
uses the literal value "base" as the name of the parent template to extend,
or ``{% extends variable %}`` uses the value of ``variable`` as either the
name of the parent template to extend (if it evaluates to a string,) or as
name of the parent template to extend (if it evaluates to a string) or as
the parent tempate itelf (if it evaluates to a Template object).
"""
bits = token.contents.split()

View File

@ -286,7 +286,7 @@ Please follow these coding standards when writing code for inclusion in Django:
* Mark all strings for internationalization; see the `i18n documentation`_
for details.
* In docstrings, use "action words," like so::
* In docstrings, use "action words" such as::
def foo():
"""

View File

@ -277,7 +277,7 @@ Subclassing Context: RequestContext
Django comes with a special ``Context`` class,
``django.template.RequestContext``, that acts slightly differently than
the normal ``django.template.Context``. The first difference is that takes
the normal ``django.template.Context``. The first difference is that it takes
an `HttpRequest object`_ as its first argument. For example::
c = RequestContext(request, {