Ticket #8139: r8223-fix-template-typos.patch
File r8223-fix-template-typos.patch, 2.2 KB (added by , 16 years ago) |
---|
-
docs/templates_python.txt
882 882 how the compilation works and how the rendering works. 883 883 884 884 When Django compiles a template, it splits the raw template text into 885 ''nodes''. Each node is an instance of ``django.template.Node`` and has885 "nodes". Each node is an instance of ``django.template.Node`` and has 886 886 a ``render()`` method. A compiled template is, simply, a list of ``Node`` 887 887 objects. When you call ``render()`` on a compiled template object, the template 888 888 calls ``render()`` on each ``Node`` in its node list, with the given context. … … 943 943 * The ``TemplateSyntaxError`` exceptions use the ``tag_name`` variable. 944 944 Don't hard-code the tag's name in your error messages, because that 945 945 couples the tag's name to your function. ``token.contents.split()[0]`` 946 will ''always''be the name of your tag -- even when the tag has no946 will *always* be the name of your tag -- even when the tag has no 947 947 arguments. 948 948 949 949 * The function returns a ``CurrentTimeNode`` with everything the node needs … … 1375 1375 def render(self, context): 1376 1376 return '' 1377 1377 1378 ``parser.parse()`` takes a tuple of names of block tags ''to parse until''. It1378 ``parser.parse()`` takes a tuple of names of block tags *to parse until*. It 1379 1379 returns an instance of ``django.template.NodeList``, which is a list of 1380 all ``Node`` objects that the parser encountered ''before''it encountered1380 all ``Node`` objects that the parser encountered *before* it encountered 1381 1381 any of the tags named in the tuple. 1382 1382 1383 1383 In ``"nodelist = parser.parse(('endcomment',))"`` in the above example, … … 1456 1456 ``TEMPLATE_DIRS`` (if you're going to use template loaders), 1457 1457 ``DEFAULT_CHARSET`` (although the default of ``utf-8`` is probably fine) and 1458 1458 ``TEMPLATE_DEBUG``. All available settings are described in the 1459 `settings documentation`_, and any setting starting with *TEMPLATE_*1459 `settings documentation`_, and any setting starting with ``TEMPLATE_`` 1460 1460 is of obvious interest. 1461 1461 1462 1462 .. _settings file: ../settings/#using-settings-without-the-django-settings-module-environment-variable