  
  If we had neglected to pass in the current ``context.autoescape`` value to our
  new ``Context`` in this example, the results would have *always* been
  automatically escaped, which may not be the desired behavior if the template
  tag is used inside a ``{% autoescape off %}`` block.
  
  .. _template_tag_thread_safety:
  
  Thread-safety considerations
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
</s> remove     given template, so we need to be careful not to clobber another node's state
    information. The easiest way to do this is to always use ``self`` as the key
    into ``render_context``. If you're keeping track of several state variables,
    make ``render_context[self]`` a dictionary.
 </s> add     given template, so we need to be careful not to clobber another node's
    state information. The easiest way to do this is to always use ``self`` as
    the key into ``render_context``. If you're keeping track of several state
    variables, make ``render_context[self]`` a dictionary. </s> remove returned the string, suppose you wanted to pass in a ``DateTimeField`` from an
object and have the template tag format that date-time:
 </s> add returned the string, suppose you wanted to pass in a
:class:`~django.db.models.DateTimeField` from an object and have the template
tag format that date-time: </s> remove        For example, suppose you have a filter that adds the string ``xx`` to the
       end of any input. Since this introduces no dangerous HTML characters to
       the result (aside from any that were already present), you should mark
       your filter with ``is_safe``::
 </s> add        For example, suppose you have a filter that adds the string ``xx`` to
       the end of any input. Since this introduces no dangerous HTML characters
       to the result (aside from any that were already present), you should
       mark your filter with ``is_safe``:

       .. code-block:: python </s> remove back to the main page. Here's what the Python function would look like::
 </s> add back to the main page. Here's what the Python function would look like:

.. code-block:: python </s> remove available to your templates using the ``{% load %}`` tag.
 </s> add available to your templates using the :ttag:`{% load %}<load>` tag.
tag is used inside a :ttag:`{% autoescape off %}<autoescape>` block.
  
  If we had neglected to pass in the current ``context.autoescape`` value to our
  new ``Context`` in this example, the results would have *always* been
  automatically escaped, which may not be the desired behavior if the template
tag is used inside a :ttag:`{% autoescape off %}<autoescape>` block.
  
  .. _template_tag_thread_safety:
  
  Thread-safety considerations
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
keep keep keep keep replace keep keep keep keep keep
 Brushed up the custom template tag 'howto' guide by moving the assignment_tag doc to a more appropriate place (i.e. under the "Setting a variable in the context" section), adding cross references, fixing a few minor inaccuracies and doing a little PEP8 cleanup.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16909 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
docs/howto/custom-template-tags.txt