  string literals. A little more work is required in order to pass dynamic
  content (a template variable) to a template tag as an argument.
  
  While the previous examples have formatted the current time into a string and
  returned the string, suppose you wanted to pass in a ``DateTimeField`` from an
  object and have the template tag format that date-time:
  
  .. code-block:: html+django
  
      <p>This post was last updated at {% format_time blog_entry.date_updated "%Y-%m-%d %I:%M %p" %}.</p>
  
 
</s> remove convert an object to its string value before being passed to your function::
 </s> add convert an object to its string value before being passed to your function:

.. code-block:: python </s> remove object::
 </s> add object:

.. code-block:: python </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 tag is used inside a ``{% autoescape off %}`` block.
 </s> add tag is used inside a :ttag:`{% autoescape off %}<autoescape>` block. </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
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:
  string literals. A little more work is required in order to pass dynamic
  content (a template variable) to a template tag as an argument.
  
  While the previous examples have formatted the current time into a string and
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:
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:
  
  .. code-block:: html+django
  
      <p>This post was last updated at {% format_time blog_entry.date_updated "%Y-%m-%d %I:%M %p" %}.</p>
  
keep keep keep keep replace 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