On Jan 9, 2009, at 9:11 PM, Joshua Bronson wrote:
> I would like to set the Last-Modified header for certain responses to
> the last modified time of the template being rendered. I'm guessing
> Mako/Buffet must keep track of the last modified time of templates.
> Could someone point me toward how to retrieve it?

<just-for-fun>

Assuming template engine usage as described here:

        http://evoque.gizmojo.org/ext/pylons/

you would do something like this:

        template = app_globals.evoque_domain.get_template("template_name")
        print template.last_modified

last_modified, for file-based templates, is *file-system-checked* for  
staleness after wait intervals of <auto_reload> number of seconds...  
auto_reload may be set on domain and/or per template collection...

</just-for-fun>

mario ;-)

ps: I would assume in mako it would be pretty much identical


> Thanks,
> Josh
> 

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

Reply via email to