Ticket #8139: r8223-fix-template-typos.patch

File r8223-fix-template-typos.patch, 2.2 KB (added by Adam Vandenberg, 16 years ago)

Fixes some emphasis/quotes/code styles.

  • docs/templates_python.txt

     
    882882how the compilation works and how the rendering works.
    883883
    884884When Django compiles a template, it splits the raw template text into
    885 ''nodes''. Each node is an instance of ``django.template.Node`` and has
     885"nodes". Each node is an instance of ``django.template.Node`` and has
    886886a ``render()`` method. A compiled template is, simply, a list of ``Node``
    887887objects. When you call ``render()`` on a compiled template object, the template
    888888calls ``render()`` on each ``Node`` in its node list, with the given context.
     
    943943    * The ``TemplateSyntaxError`` exceptions use the ``tag_name`` variable.
    944944      Don't hard-code the tag's name in your error messages, because that
    945945      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 no
     946      will *always* be the name of your tag -- even when the tag has no
    947947      arguments.
    948948
    949949    * The function returns a ``CurrentTimeNode`` with everything the node needs
     
    13751375        def render(self, context):
    13761376            return ''
    13771377
    1378 ``parser.parse()`` takes a tuple of names of block tags ''to parse until''. It
     1378``parser.parse()`` takes a tuple of names of block tags *to parse until*. It
    13791379returns an instance of ``django.template.NodeList``, which is a list of
    1380 all ``Node`` objects that the parser encountered ''before'' it encountered
     1380all ``Node`` objects that the parser encountered *before* it encountered
    13811381any of the tags named in the tuple.
    13821382
    13831383In ``"nodelist = parser.parse(('endcomment',))"`` in the above example,
     
    14561456``TEMPLATE_DIRS`` (if you're going to use template loaders),
    14571457``DEFAULT_CHARSET`` (although the default of ``utf-8`` is probably fine) and
    14581458``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_``
    14601460is of obvious interest.
    14611461
    14621462.. _settings file: ../settings/#using-settings-without-the-django-settings-module-environment-variable
Back to Top