I've got a python script that maps a bunch of event records (results of a zSQL query) to a python dictionary, keyed by date. Inside the dtml-calendar tag, I'm trying to use the get() method to return the events for the day that the calendar iterator is on. I've tried a bunch of variations on this, but none of them return any results from the dictionary on days when there are definitely corresponding events. <dtml-in "myEvents.get(date.Date(), None)" mapping> <dtml-in "myEvents.get(date, None)" mapping> <dtml-in "myEvents.get(date)" mapping> how do I make this work? thanks -- David Siedband generation-xml.com
David Siedband wrote:
<dtml-in "myEvents.get(date.Date(), None)" mapping> <dtml-in "myEvents.get(date, None)" mapping> <dtml-in "myEvents.get(date)" mapping>
try: <dtml-var "repr(myEvents.keys())" html_quote> <dtml-var "repr((date.Date(),date))" html_quote> That should show you what the keys are and what your date is, which should give you a clue... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (2)
-
Chris Withers -
David Siedband