Are Django template tags cached?

Posted by thebossman on Stack Overflow See other posts from Stack Overflow or by thebossman
Published on 2010-06-07T00:53:17Z Indexed on 2010/06/07 1:02 UTC
Read the original article Hit count: 446

I have gone through the (painful) process of writing a custom template tag for use in Django. It is registered as an inclusion_tag so that it renders a template. However, this tag breaks as soon as I try to change something.

I've tried changing the number of parameters and correspondingly changing the parameters when it's called. It's clear the new tag code isn't being loaded, because an error is thrown stating that there is a mismatch in the number of parameters, and it's evident that it's attempting to call the old function.

The same problem occurs if I try to change the name of the template being rendered and correspondingly change the name of the template on disk. It continues to try to call the old template. I've tried clearing old .pyc files with no luck.

Overall, the system is acting as though it's caching the template tags, likely due to the register command. I have dug through endless threads trying to find out if this is so, but all could find it James Bennett stating here that register doesn't do anything. Please help!

© Stack Overflow or respective owner

Related posts about django

Related posts about caching