Sorry in advance if this is a dumbo question, but I'm having trouble seeing the style to follow in the following situation:

 - user calls a url, say /object/tuesday_message

 - if today's date is a tuesday, render ''

 - otherwise render ''

both and are proper templates which need to follow the site's main template, and have some logic in a view class.

Without views, I would make tuesday_message a python script, and return the required template directly with context.tuesday() or context.no_message().

But what's the best way to do this with a view: I don't want users to be able to access the templates directly, so I can't redirect between them, and the two templates are sufficiently different not to be combined together in an if-else type way.



Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to