[Zope-CMF] Automatic ID generation -- > Title
Ignacio Valdes
ivaldes@hal-pc.org
Mon, 23 Apr 2001 22:07:02 -0500
Timothy Wilson wrote:
> On Mon, 23 Apr 2001, Ignacio Valdes wrote:
>
> > I've tried creating a python script called generateID with the following one line:
> >
> > return "%s" (DateTime().timeTime())
> >
> > I think this is on the right track, but it returns the same number every time.
> > Smelling the finish line...
>
> Have you tried ZopeTime()?
>
> -Tim
Thanks, came across this:
<dtml-call "REQUEST.set('ts', ZopeTime().strftime('%Y%m%d%H%M%S'))">
from a tip on the zope site:
http://www.zope.org/Members/Bill/Documentation/AutoGenID
But when I stick it into the right place in folder_factories:
<input type="text" name="id" value="<dtml-var "REQUEST.set('ts',
ZopeTime().strftime('%Y%m%d%H%M%S'))">" size="50">
It comes back with 'None' in the id field on screen. Hmm, don't know the right
syntactic sugar for this. -- IV