Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Decimated 'whilst' in docs/templates_python.txt from [3308]

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3312 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4872e16d1c16b6336260de8a3aff6ac4d240ff83 1 parent 4295dd9
@adrianholovaty adrianholovaty authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 docs/templates_python.txt
View
8 docs/templates_python.txt
@@ -669,9 +669,11 @@ Notes:
* ``token.contents`` is a string of the raw contents of the tag. In our
example, it's ``'current_time "%Y-%m-%d %I:%M %p"'``.
- * The ``token.split_contents()`` method separates the arguments on spaces,
- whilst keeping quoted strings together. The more straightforward
- ``token.contents.split()`` would be as robust.
+ * The ``token.split_contents()`` method separates the arguments on spaces
+ while keeping quoted strings together. The more straightforward
+ ``token.contents.split()`` wouldn't be as robust, as it would naively
+ split on *all* spaces, including those within quoted strings. It's a good
+ idea to always use ``token.split_contents()``.
* This function is responsible for raising
``django.template.TemplateSyntaxError``, with helpful messages, for
Please sign in to comment.
Something went wrong with that request. Please try again.