diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py index bd21212ff63..11cd04653fe 100644 --- a/django/template/defaulttags.py +++ b/django/template/defaulttags.py @@ -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] diff --git a/django/template/loader_tags.py b/django/template/loader_tags.py index 4439e0b010d..19f368711c7 100644 --- a/django/template/loader_tags.py +++ b/django/template/loader_tags.py @@ -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() diff --git a/docs/contributing.txt b/docs/contributing.txt index cce54fa4856..b0df62fe998 100644 --- a/docs/contributing.txt +++ b/docs/contributing.txt @@ -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(): """ diff --git a/docs/templates_python.txt b/docs/templates_python.txt index 117656762f9..261eaedf744 100644 --- a/docs/templates_python.txt +++ b/docs/templates_python.txt @@ -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, {