  Registering the tag
  ~~~~~~~~~~~~~~~~~~~
  
  Finally, register the tag with your module's ``Library`` instance, as explained
  in "Writing custom template filters" above. Example::
  
      register.tag('current_time', do_current_time)
  
  The ``tag()`` method takes two arguments:
  
 
</s> remove your ``Library`` instance, to make it available to Django's template language::
 </s> add your ``Library`` instance, to make it available to Django's template language:

.. code-block:: python </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 in a file called ``results.html`` in a directory that's searched by the template
loader, we'd register the tag like this::
 </s> add in a file called ``results.html`` in a directory that's searched by the
template loader, we'd register the tag like this:

.. code-block:: python </s> remove ``autoescape`` that you can use for this purpose. For example::
 </s> add ``autoescape`` that you can use for this purpose. For example:

.. code-block:: python </s> remove         "Converts a string into all lowercase"
 </s> add         """Converts a string into all lowercase"""
in "Writing custom template filters" above. Example:

.. code-block:: python
  Registering the tag
  ~~~~~~~~~~~~~~~~~~~
  
  Finally, register the tag with your module's ``Library`` instance, as explained
in "Writing custom template filters" above. Example:

.. code-block:: python
  
      register.tag('current_time', do_current_time)
  
  The ``tag()`` method takes two arguments:
  
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