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

Ensure default _get_timings() provides a dict instead of None #33

Closed bryanhelmig closed 6 years ago

bryanhelmig commented 6 years ago

This fixes 'NoneType' object is not iterable which can happen if you return HTML directly without building a template.

orf commented 6 years ago

Thanks! I will push a new release this weekend. I wasn't aware anyone was still actively using this!

galeo commented 6 years ago

This pull request may lead to AttributeError: 'dict' object has no attribute 'default_factory'.

Here is the context:

.../template_timings_panel/panels/TemplateTimings.py", line 246, in process_response
    timings.default_factory = None