orf / django-debug-toolbar-template-timings

A django-debug-toolbar panel that displays template rendering times for your Django application
https://pypi.python.org/pypi/django-debug-toolbar-template-timings
MIT License
297 stars 28 forks source link

self.name is None #14

Closed fizista closed 11 years ago

fizista commented 11 years ago

In line 66 "TemplateTimings.py" [name_self = name (self)] when self.name = None, we get the following error:

  File "/home/wojciech/AptanaWorkspace/django-debug-toolbar-template-timings/template_timings_panel/panels/TemplateTimings.py", line 72, in timing_hook
    if name_self not in results.timings[key] and should_add(name_self):
  File "/home/wojciech/AptanaWorkspace/django-debug-toolbar-template-timings/template_timings_panel/panels/TemplateTimings.py", line 122, in <lambda>
    for pattern in TEMPLATE_TIMINGS_SETTINGS["IGNORED_TEMPLATES"]]))
  File "/home/wojciech/.pyenv/versions/2.7.5/lib/python2.7/re.py", line 137, in match
    return _compile(pattern, flags).match(string)
TypeError: expected string or buffer

This patch fixes this problem.

orf commented 11 years ago

Thanks for this! Merged and pushed to pypi