X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/596ad981f61660468f9135255048754ccd7627fb..82c542156fa674e9630f78363d4bb745594d5d8c:/templatetags/nodes.py diff --git a/templatetags/nodes.py b/templatetags/nodes.py index 338ac2d..73492d4 100644 --- a/templatetags/nodes.py +++ b/templatetags/nodes.py @@ -51,7 +51,9 @@ class NodeURLNode(template.Node): subpath = reverse(view_name, urlconf=node.view, args=args, kwargs=kwargs) except NoReverseMatch: if self.as_var is None: - raise + if settings.TEMPLATE_DEBUG: + raise + return settings.TEMPLATE_STRING_IF_INVALID else: if subpath[0] == '/': subpath = subpath[1:] @@ -68,7 +70,7 @@ class NodeURLNode(template.Node): @register.tag(name='node_url') def do_node_url(parser, token): """ - {% node_url [for ] [as ] [as ] %} {% node_url with [for ] [as ] %} {% node_url [ [ ...] ] [for ] [as ] %} {% node_url [= [= ...] ] [for ] [as ]%}