Hi, I'm sorry for asking this here, but the question was raised several time on the -users mailing list and I don't think we users have a solution for it.
Basically, the problem is that if I call a templatetag into a block and it fills me a variiable with the usual context[varname]=something, then if I need that variable into another block, I have to call the templatetag again. This for me means extra db queries, which is really something I'm trying to avoid. This templatetag is called in a base template which is extended by many other templates, so I can't just change all the views to pass something to the context, it makes no sense (WET principle?) Even a context processor would be not good because I don't want to call it for every page rendered in the site, even the ones not based on that template. I was thinking about writing a templatetag which would use the internal context structures to put the variable in a global context, but I'd feel too guilty doing it. How would you solve this problem? Thank you!
-- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.