Re: Scope of variables in template blocks

2009-12-14 Thread bruno desthuilliers
On 12 déc, 21:25, Alex Rades wrote: > Hi, > > I have a master template which defines two blocks: > > {% block account %}{% endblock %} > {% block content %}{% endblock %} > > I have a templatetag which tells me the time of the last image upload > (it's a photo sharing site). > This templatetag hit

Re: Scope of variables in template blocks

2009-12-12 Thread pjrhar...@gmail.com
In your template tag you can add the variable to the global context like this: context.dicts[-1]['last_upload'] = whatever Pete -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com.

Scope of variables in template blocks

2009-12-12 Thread Alex Rades
Hi, I have a master template which defines two blocks: {% block account %}{% endblock %} {% block content %}{% endblock %} I have a templatetag which tells me the time of the last image upload (it's a photo sharing site). This templatetag hits the database, and I don't want to call it multiple t