Moved the EventQuerySet to its own class instead of nesting it in the Event model.
[philo.git] / templatetags / nodes.py
index 9721ec4..5ae507d 100644 (file)
@@ -51,12 +51,11 @@ 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:]
-                               
-                               url = node.get_absolute_url() + subpath
+                               url = node.construct_url(subpath)
                
                if self.as_var:
                        context[self.as_var] = url