On Dec 17, 2007 4:03 PM, Rob Hudson <[EMAIL PROTECTED]> wrote:
> If I understand correctly, these cache the templates after they have
> been rendered.  What I'm curious about is if there is a way to cache
> templates before they are rendered so you can provide different
> contexts to them.  It seems like there would still be some gains
> involved -- a filesystem read, parsing the template into nodes, etc.

Manually call get_template() or select_template(), and stuff the
resulting Template object into a module-global variable somewhere.
Then just re-use it, calling render() with different contexts, each
time you need it.


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to