Index: docs/templates_python.txt
===================================================================
--- docs/templates_python.txt	(revision 3711)
+++ docs/templates_python.txt	(working copy)
@@ -750,6 +750,66 @@
 If you leave off the ``name`` argument, as in the second example above, Django
 will use the function's name as the tag name.
 
+Passing object values to the tag using 'resolve_variable'
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Although you can pass any number of arguments to a template tag using ``token.split_contents()``
+to unpack the arguments as illustrated above, ``token.split_contents()`` only unpacks the arguments 
+sent to the tag as string literals.  This makes it difficult to pass dynamic content 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::
+
+    <p>This post was last updated at {% format_time blog_entry.date_updated "%Y-%m-%d %I:%M %p" %}.</p>
+
+Initially, ``token.split_contents()`` will return three values:
+
+    1. The tag name ``format_time``
+    2. The string "blog_entry.date_updated", NOT the contents of the ``date_updated`` property
+       of the ``blog_entry`` object
+    3. The formatting string "%Y-%m-%d %I:%M %p"
+
+Now our 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.
+            tag_name, date_to_format, format_string = token.split_contents()
+        except ValueError:
+            raise template.TemplateSyntaxError, "%r tag requires exactly two arguments" % token.contents[0]
+        if not (format_string[0] == format_string[-1] and format_string[0] in ('"', "'")):
+            raise template.TemplateSyntaxError, "%r tag's argument should be in quotes" % tag_name
+        return FormatTimeNode(date_to_format, format_string[1:-1])
+
+Next we have to change the renderer to format the actual contents of the ``date_updated`` property 
+of the ``blog_entry`` object, not the string literal "blog_entry.date_updated" which will throw an
+exception.  This can be accomplished by using the ``resolve_variable`` function in 
+``django.template``.  We have to pass ``resolve_variable`` both the variable name as well as the 
+current context, available in the ``render`` method::
+
+    from django import template
+    from django.template import resolve_variable
+    import datetime
+    class FormatTimeNode(template.Node):
+        def __init__(self, date_to_format, format_string):
+            self.date_to_format = date_to_format
+            self.format_string = format_string
+        def render(self, context):
+            try:
+                actual_date = resolve_variable(self.date_to_format, context)
+                return actual_date.strftime(self.format_string)
+            except VariableDoesNotExist:
+                return ''
+
+``resolve_variable`` will try to resolve ``blog_entry.date_updated`` and then format it
+accordingly.
+
+Notes:
+
+    * ``resolve_variable`` will throw a ``VariableDoesNotExist`` exception if it cannot
+      resolve the string passed to it in the current context of the page.
+
 Shortcut for simple tags
 ~~~~~~~~~~~~~~~~~~~~~~~~
 
