When exceptions are raised, in particular in templates (e.g. with URL tag not matching a view), you get a big chunk of traceback info in the debug summary which is hard to read. Inserting linebreaks helps a lot. Patch attached.
Before:
Caught an exception while rendering: Original Traceback (most recent call last): File "E:\Software\workspace\django\django\template\debug.py", line 71, in render_node result = node.render(context) File "E:\Software\workspace\django-treemenus\trunk\treemenus\templatetags\tree_menu_tags.py", line 46, in render return urlNode.render(context) File "E:\Software\workspace\django\django\template\defaulttags.py", line 369, in render args=args, kwargs=kwargs) File "E:\Software\workspace\django\django\core\urlresolvers.py", line 307, in reverse *args, **kwargs))) File "E:\Software\workspace\django\django\core\urlresolvers.py", line 291, in reverse raise NoReverseMatch NoReverseMatch
After:
Caught an exception while rendering:
Original Traceback (most recent call last):
File "E:\Software\workspace\django\django\template\debug.py", line 71, in render_node
result = node.render(context)
File "E:\Software\workspace\django-treemenus\trunk\treemenus\templatetags\tree_menu_tags.py", line 46, in render
return urlNode.render(context)
File "E:\Software\workspace\django\django\template\defaulttags.py", line 369, in render
args=args, kwargs=kwargs)
File "E:\Software\workspace\django\django\core\urlresolvers.py", line 307, in reverse
*args, **kwargs)))
File "E:\Software\workspace\django\django\core\urlresolvers.py", line 291, in reverse
raise NoReverseMatch
NoReverseMatch