[Zope] Getting a date into an object title - DON'T Disregard

complaw@hal-pc.org complaw@hal-pc.org
Fri, 30 Mar 2001 20:47:16 GMT


Therapy or not, I spoke too soon.

I did manage to get a time in as part of the title.  Unfortunately, the time
that I got was ZopeTime().  

What I want to get in is the time (really a date) set by the user.  This date is
taken in as input from the form page, it is then sent to a DTML Method that then
calls the Python script.  As I mentioned before, the parameter in question is
"contact_date".

If I try to set myTitle = '%d' % contact_date then I get an error.

However, if I try to set myTitle = '%d' % report_title then I don't get an
error.  The report_title parameter was set in the DTML Method that was called by
the HTML form.  that code is <dtml-let report_title="ZopeTime()">

Unfortunately, if I set <dtml-let report_title=contact_date> I get an error. 
Note, the </dtml-let> is AFTER the call to the python script.

Is there something I'm missing?

TIA,

Ron


> > Is there something therapeutic/magical about this list?
> 
> Of course, you didnt know ;)
> 
> BTW I normally set the id equal to the time in secs... which gives a
> horrible url but has *loads* of other advantages.
> --
>   Andy McKay.
> 
> 
> ----- Original Message -----
> From: <complaw@hal-pc.org>
> To: <complaw@hal-pc.org>; <zope@zope.org>
> Sent: Friday, March 30, 2001 9:54 AM
> Subject: Re: [Zope] Getting a date into an object title - DISREGARD
> 
> 
> > Why is it that within 5 minutes after posting a notice on this list that I
> > figure out a solution to the problem?
> >
> > Is there something therapeutic/magical about this list?
> >
> > Ron
> >
> >
> > > I want to put a date value into a DTML Document title so that when the
> DTML
> > > Documents are sorted by their title, they will automatically be sorted
> by
> > date.
> > >  (Incidentally, the title also has some other non-date information.)
> > >
> > > I've tried various schemes and they don't work.  I'm using the Zope book
> > > template for creating the DTML Documents (which are loaded by the users
> who
> > > don't have manage access).  This means that I have a form to gether
> > information
> > > (including the contact date, which is transmitted from the form as
> > > "contact_date").  The form calls an DTML method that calls a Python
> script
> > > which creates the DTML Document.
> > >
> > > Any hints, either in DTML or for the Python script, would be most
> > appreciated.
> > >
> > > Thanks,
> > >
> > > Ron
> > >
> > >
> > > _______________________________________________
> > > Zope maillist  -  Zope@zope.org
> > > http://lists.zope.org/mailman/listinfo/zope
> > > **   No cross posts or HTML encoding!  **
> > > (Related lists -
> > >  http://lists.zope.org/mailman/listinfo/zope-announce
> > >  http://lists.zope.org/mailman/listinfo/zope-dev )
> > >
> >
> >
> >
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> >
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 

 

_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )