Fix debug-toolbar with jinja

This commit is contained in:
2017-02-26 17:00:09 +01:00
parent 7d99f02a4d
commit b02d72eab4
2 changed files with 22 additions and 0 deletions

8
sith/toolbar_debug.py Normal file
View File

@ -0,0 +1,8 @@
from debug_toolbar.panels.templates import TemplatesPanel as BaseTemplatesPanel
class TemplatesPanel(BaseTemplatesPanel):
def generate_stats(self, *args):
template = self.templates[0]['template']
if not hasattr(template, 'engine') and hasattr(template, 'backend'):
template.engine = template.backend
return super().generate_stats(*args)