ClearSilver uses a two-stage rendering process. First you must populate the HDF object from your code (the request handler mostly), and then you pass that to the template and use it to generate the page. That "datetime.today" variable in the HDF doesn't currently exist, so you must add it somewhere in the code side of things: req.hdf['datetime.today'] = str(datetime.today()).
--Noah Julien wrote: > Hi, > > I am trying to hack a bit the basic templates of Trac, but I have to > say I am a bit confused by Clearsilver. > (I'm used to Rails, and calling normal ruby inside the <%%>) ... > > To start, I'd just like to display the current time, dynamically, on > my page. > I've checked some python doc for the class that does that and it seems > to be datetime. > > So I did : <?cs var:datetime.today ?> but did not get any result. > > What am I missing here ? > > Thx in advance, and sorry for the noob question ;-) > Ju > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" 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/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
