      3. The formatting string "%Y-%m-%d %I:%M %p". The return value from
         ``split_contents()`` will include the leading and trailing quotes for
         string literals like this.
  
  Now your tag should begin to look like this::
  
      from django import template
      def do_format_time(parser, token):
          try:
              # split_contents() knows not to split quoted strings.
 
</s> remove     2. The string "blog_entry.date_updated" (without the surrounding quotes).
    3. The formatting string "%Y-%m-%d %I:%M %p". The return value from
 </s> add     2. The string ``"blog_entry.date_updated"`` (without the surrounding
       quotes).
    3. The formatting string ``"%Y-%m-%d %I:%M %p"``. The return value from </s> remove object::
 </s> add object:

.. code-block:: python </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 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 Continuing the above example, we need to define ``CurrentTimeNode``::
 </s> add Continuing the above example, we need to define ``CurrentTimeNode``:

.. code-block:: python
Now your tag should begin to look like this:

.. code-block:: python
      3. The formatting string "%Y-%m-%d %I:%M %p". The return value from
         ``split_contents()`` will include the leading and trailing quotes for
         string literals like this.
  
Now your tag should begin to look like this:

.. code-block:: python
  
      from django import template
      def do_format_time(parser, token):
          try:
              # split_contents() knows not to split quoted strings.
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