areski / django-nvd3

Django wrapper for nvd3 - It's time for beautiful charts
Other
416 stars 124 forks source link

Templates randomly fails #12

Closed badcrc closed 10 years ago

badcrc commented 10 years ago

Hello!

I'm having some troubles using django-nvd3. Most of the time it works perfect as expected, but sometimes the "load_container" isn't being recognized as a valid tag and I get a TemplaeSyntaxError, sadly I haven't been able yet to reproduce the exact conditions :(

I've a main template in which I included a header.html which has the {% load nvd3_tags %} and {% load_chart ....%} call, and after that in another template I've the {% include_container ...%} call, and this last call is what isn't being recognized. If I just refresh the page it renders perfectly.

This is my environment (I just updated your library): Django==1.4.8 django-nvd3==0.3.1 python-nvd3==0.9.0

And I've problems in booth mi development environment (macosx with python 2.6) and in my production system (freebsd with python 2.7).

The only thing that I've noticed is that sometimes getting and processing the data from the database needs a few seconds, but I do that before calling render() in my view... :/

I'm going to try to put some debug in your module but I wonder if you have seen this behaviour before.

Thanks in advance!

badcrc commented 10 years ago

Hello again,

after doing some work seems that it was an inheritance problem, I put a {% load nvd3_tags %} in every template with nvd3 tags and seems that now it's working properly.

Thanks!