Ticket #6144: dynamic-url-tag.diff
File dynamic-url-tag.diff, 804 bytes (added by , 17 years ago) |
---|
-
django/template/defaulttags.py
369 369 return reverse(project_name + '.' + self.view_name, 370 370 args=args, kwargs=kwargs) 371 371 except NoReverseMatch: 372 return '' 372 try: 373 from django.template import Variable 374 named_url = Variable(self.view_name).resolve(context) 375 return reverse(named_url, args=args, kwargs=kwargs) 376 except NoReverseMatch: 377 return '' 373 378 374 379 class WidthRatioNode(Node): 375 380 def __init__(self, val_expr, max_expr, max_width):