[Zope] "Picture of the day" product
Martijn Pieters
mj@digicool.com
Wed, 17 Jan 2001 20:19:45 +0100
On Wed, Jan 17, 2001 at 12:20:06PM -0600, Timothy Wilson wrote:
> Hey everyone,
>
> I was looking at linux.com the today and I noticed their "Daily Photo." I
> occurred to me that that would be a fun addition to the school's page that
> I'm developing. My first thought would be to:
>
> * inherit from Image
> * add caption, date taken, etc. properties
> * create an archive of past photos
>
> What I'm not sure about is how to have Zope automatically display the photo
> for a day, then archive it. Would a boolean property of the ZClass work? Is
> it possible to have Zope set the property of a ZClass instance at certain
> time? Any thoughts on how this would be designed?
I'd pre-create the archive in advance. Use dates as Ids, and have the
archive page only list past photos. The homepage would show the photo for
today. Simple and sweet. Or you could use a Python Script/Python
Method/External Method/DTML Method (whatever you prefer) called
currentPhoto or something that does the calculation for you and return the
correct object to the caller.
--
Martijn Pieters
| Software Engineer mailto:mj@digicool.com
| Digital Creations http://www.digicool.com/
| Creators of Zope http://www.zope.org/
---------------------------------------------