Hi all, as a complete newby to Zope and Phyton (but with some background in (web) programming (-;) I spent the last week developing (to my great satisfaction and (Z)hope) my first Zope apps; it is up&running but I got stucked in a problem, that I am sure is a trivial one for you out there. I went through the docs (Zope, Phyton, FAQs, ZopeBook, HowTos, comments in phyton sources, you name it !!), I learned a lot, but the problem is still a problem (at least for me). Here is my Zope.problem.present: I want to use a date property to store a user entered date into a ZClass property; the date must be entered in "%d/%m/%&y" format (I am from Europe (-;)). Simple, isn't ? The idea was: 1. go to the management GUI and add a my_date property to the ZClass 2. use a format string as the value for the property 3. use name="mydate:date" in the relevant form 4. let Zope do the conversion ... The reality is: I cannot even accomplish step 2! Whatever I enter in the value field for the property for the ZClass (apart from an actual date which is readly converted in yyyy/mm/dd format), Zope complains about an 'Invalid Date-Time String'. For the time beeing, I can live with a string property and maybe some client-side Jscript, but I know it must be brain-dead simple... ... so, please, any pointer in the right direction would be _deeply_ appreciated. Thanks in advance, --peppo PS: I am really impressed about Zope/Phyton (or Phyton/Zope ...?)
is there somewhere I can setup a free hosting account for a Zope site, in order to practice with Zope in a remote environment ? Thanks, Jerry Lake Interface Engineering Technician
Jerry Lake wrote:
is there somewhere I can setup a free hosting account for a Zope site, in order to practice with Zope in a remote environment ?
http://www.nipltd.net Chris
Hi Jerry. I've had good experiences with the free services of both NIP Ltd and Zopesite.com. I don't pound on either one very hard at all, just playing around, but I've found NIP's site to be more reliable. A few times while trying to access Zopesite, it's been down for one reason or another. Zopesite seems to let you play with more products than NIP does (last time I checked). Eric.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Jerry Lake Sent: Tuesday, August 14, 2001 1:14 PM To: Zope Subject: [Zope] Zope host
is there somewhere I can setup a free hosting account for a Zope site, in order to practice with Zope in a remote environment ?
Thanks,
Jerry Lake Interface Engineering Technician
_______________________________________________ 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 )
Thanks for the info, I went and set up a site at zopesite. I've got zope on my local machine, but I wanted to compare any differences of working remotely, so I don't image that I will tax the zopesite server too much. Regards, Jerry Lake Interface Engineering Technician -----Original Message----- From: Eric Walstad [mailto:eric@walstads.net] Sent: Tuesday, August 14, 2001 2:08 PM To: Jerry Lake; Zope Subject: RE: [Zope] Zope host Hi Jerry. I've had good experiences with the free services of both NIP Ltd and Zopesite.com. I don't pound on either one very hard at all, just playing around, but I've found NIP's site to be more reliable. A few times while trying to access Zopesite, it's been down for one reason or another. Zopesite seems to let you play with more products than NIP does (last time I checked). Eric.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Jerry Lake Sent: Tuesday, August 14, 2001 1:14 PM To: Zope Subject: [Zope] Zope host
is there somewhere I can setup a free hosting account for a Zope site, in order to practice with Zope in a remote environment ?
Thanks,
Jerry Lake Interface Engineering Technician
_______________________________________________ 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 )
On your computer. ----- Original Message ----- From: Jerry Lake <jerryl@europa.com> To: Zope <zope@zope.org> Sent: Tuesday, August 14, 2001 9:13 PM Subject: [Zope] Zope host
is there somewhere I can setup a free hosting account for a Zope site, in order to practice with Zope in a remote environment ?
Thanks,
Jerry Lake Interface Engineering Technician
_______________________________________________ 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 )
The idea was:
1. go to the management GUI and add a my_date property to the ZClass 2. use a format string as the value for the property 3. use name="mydate:date" in the relevant form 4. let Zope do the conversion ...
The reality is:
I cannot even accomplish step 2! Whatever I enter in the value field for the property for the ZClass (apart from an actual date which is readly converted in yyyy/mm/dd format), Zope complains about an 'Invalid Date-Time String'.
How I have done it: 1. Submit your date as a string. 2. Create a Python Script to convert a string to a DateTime object. This could be as easy as 'return DateTime(str)', which will understand a great number of formats. But I think the format you want will be understood as the US mm/dd/[yy]yy, so you may have to do a little work. See Zope Help > API Reference > DateTime in the Zope Help System. 3. In whatever the form is submitted to call above script and store the results. This property can then be used as a DateTime in display: '<dtml-var "timeProp.ISO()"> You could also have your script return a canonical string or a floating point number representation of the time, if you'd rather store that. Or you could use a Python Script to preprocess your REQUEST and convert your string to something DateTime understands (ISO) and then hand it to a method that stores it in a 'date' property. --jcc (space-time)
Welcome European! Giuseppe Bonelli writes:
.... I want to use a date property to store a user entered date into a ZClass property; the date must be entered in "%d/%m/%&y" format (I am from Europe (-;)). .... 1. go to the management GUI and add a my_date property to the ZClass good!
2. use a format string as the value for the property Of course, this will not work. The value must be a valid date not a format string.
3. use name="mydate:date" in the relevant form Unfortunately, Zope is very US centric... It will not like European dates.
The mailing list archives will reveal you an announcement about a European aware DateTime extension. If you fetch this and plug it into your Zope installation, this should work. Dieter
participants (7)
-
Chris Withers -
David Smithson -
Dieter Maurer -
Eric Walstad -
Giuseppe Bonelli -
J. Cameron Cooper -
Jerry Lake