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
296 stars 28 forks source link

Import error when using with latest debug_toolbar #24

Open pcraston opened 8 years ago

pcraston commented 8 years ago
django.core.exceptions.ImproperlyConfigured: Error importing debug panel template_timings_panel.panels.TemplateTimings: "cannot import name Library"
bentappin commented 8 years ago

Works for me. I'm running:

Django==1.8.4
django-debug-toolbar==1.4
django-debug-toolbar-template-timings==0.6.4
orf commented 8 years ago

I think this concerns the Django 1.9 beta, I will investigate later :) Thanks for the report and the follow up :+1:

danpalmer commented 8 years ago

I can confirm, this is happening for me on Django 1.9 RC1. Any update on a fix for this?

jamesbeith commented 8 years ago

I just ran in to this too with the now released Django 1.9

megahoy commented 8 years ago

I have the same issue :( django==1.9 django-debug-toolbar==1.4 django-debug-toolbar-template-timings==0.6.4

orf commented 8 years ago

Sorry for the lack of updates on this, I intended to get some work done after Christmas but then I got the flu quite badly.

I took a look at the code and to be honest I couldn't make heads or tails of it, so I'm going to rip it up and start again. Might be able to support Jinja2 and make it a bit less hacky along the way as well. On 28 Dec 2015 19:57, "Sergey Stribaylo" notifications@github.com wrote:

I have the same issue :( django==1.9 django-debug-toolbar==1.4 django-debug-toolbar-template-timings==0.6.4

— Reply to this email directly or view it on GitHub https://github.com/orf/django-debug-toolbar-template-timings/issues/24#issuecomment-167642226 .

shtalinberg commented 8 years ago

I have the same issue :( django==1.9.2 django-debug-toolbar==1.4 django-debug-toolbar-template-timings==0.6.4

sobolevn commented 8 years ago

Me too.

Django==1.9.2
django-debug-toolbar==1.4
django-debug-toolbar-template-timings==0.6.4
slinkymanbyday commented 8 years ago

I just commented out the following lines:

template_base.generic_tag_compiler = _tag_compiler( template_base.generic_tag_compiler)

and appears to work fine on Django 1.9.5

AgustinLado commented 8 years ago

@slinkymanbyday Indeed, also works on 1.9.2.

It seems that generic_tag_compiler was a helper function that got inlined into the django.template.Library.simple_tag method around version 1.8 or something.

It seems like this panel works, but I wonder if not taking this into account is generating a bug of some kind, since now template-timings isn't wrapping the code I mentioned.