"""
The node template tags are automatically included as builtins if :mod:`philo` is an installed app.
-.. templatetag:: node_url
-
-node_url
---------
-
-The :ttag:`node_url` tag allows access to :meth:`.View.reverse` from a template for a :class:`.Node`. By default, the :class:`.Node` that is used for the call is pulled from the context variable ``node``; however, this can be overridden with the ``[for <node>]`` option.
-
-Usage::
-
- {% node_url [for <node>] [as <var>] %}
- {% node_url with <obj> [for <node>] [as <var>] %}
- {% node_url <view_name> [<arg1> [<arg2> ...] ] [for <node>] [as <var>] %}
- {% node_url <view_name> [<key1>=<value1> [<key2>=<value2> ...] ] [for <node>] [as <var>] %}
-
"""
from django import template
return url
-@register.tag(name='node_url')
-def do_node_url(parser, token):
+@register.tag
+def node_url(parser, token):
"""
- {% node_url [for <node>] [as <var>] %}
- {% node_url with <obj> [for <node>] [as <var>] %}
- {% node_url <view_name> [<arg1> [<arg2> ...] ] [for <node>] [as <var>] %}
- {% node_url <view_name> [<key1>=<value1> [<key2>=<value2> ...] ] [for <node>] [as <var>] %}
+ The :ttag:`node_url` tag allows access to :meth:`.View.reverse` from a template for a :class:`.Node`. By default, the :class:`.Node` that is used for the call is pulled from the context variable ``node``; however, this can be overridden with the ``[for <node>]`` option.
+
+ Usage::
+
+ {% node_url [for <node>] [as <var>] %}
+ {% node_url with <obj> [for <node>] [as <var>] %}
+ {% node_url <view_name> [<arg1> [<arg2> ...] ] [for <node>] [as <var>] %}
+ {% node_url <view_name> [<key1>=<value1> [<key2>=<value2> ...] ] [for <node>] [as <var>] %}
"""
params = token.split_contents()