Re: Zope digest, Vol 1 #1343 - 46 msgs
Am/Um 08:27 20.04.01 -0400 schrieben Sie:
Send Zope mailing list submissions to zope@zope.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.zope.org/mailman/listinfo/zope or, via email, send a message with subject or body 'help' to zope-request@zope.org
You can reach the person managing the list at zope-admin@zope.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Zope digest..."
Today's Topics:
1. Re: hasRole (Bug or My brain is dead?) (The Doctor What) 2. Re: Problem with xmlrpc and manage_pasteObjects (Phil Harris) 3. RE: __basicnew__ errors (Brian Lloyd) 4. how to change a title from python script? (alex) 5. Re: hasRole (Bug or My brain is dead?) (Andy McKay) 6. Re: hasRole (Bug or My brain is dead?) (Phil Harris) 7. Mail as attachments (MSOutlook Express...) (The Doctor What) 8. Re: Problem with xmlrpc and manage_pasteObjects (Casey Duncan) 9. Re: Mail as attachments (MSOutlook Express...) (Phil Harris) 10. Re: Mail as attachments (MSOutlook Express...) (Charlie Blanchard) 11. Re: how to change a title from python script? (Casey Duncan) 12. Problems calling directory (Adrian Madrid) 13. Re: Re: page templates!? (Arian de Wit) 14. Re: GoLive and WebDAV? (Sim Harbert) 15. ZSQL - finding the id of what you just inserted? (The Doctor What) 16. Re: Correction to
http://www.zope.org/Wikis/DevSite/Projects/ZPT/IntroductionForDTMLers (ethan mindlace fremen)
17. Re: problem testing for a permission (ethan mindlace fremen) 18. Re: Re: Re: page templates!? (ethan mindlace fremen) 19. Re: Re: Re: page templates!? (Arian de Wit) 20. Re: html version of zope site (Danny William Adair) 21. Re: Re: Re: page templates!? (Arian de Wit) 22. Summarization and Zope (Ausum) 23. Re: ZSQL - finding the id of what you just inserted? (The Doctor What) 24. Re: Problems calling directory (Ben Peter) 25. Re: UPDATE: Problems calling directory (Ben Peter) 26. Re: CoreSessionTracking (Uwe C. Schroeder) 27. Re: UPDATE: Problems calling directory (Adrian Madrid) 28. Re: Problems calling directory (Tino Wildenhain) 29. Copy 'n Paste (Menno Brandsen) 30. Re: problem testing for a permission (Jerome Alet) 31. =?ISO-8859-1?Q?Re=3A=20=5BZope=5D=20Native=20Database=20for=20Zope?= (Uwe Fechner) 32. Zope on Python 2.1 (Oleg Broytmann) 33. Re: Re: Re: page templates!? (Phil Harris) 34. Re: GoLive and WebDAV? (Martijn Pieters) 35. RE: Zope on Python 2.1 (Peter Bengtsson) 36. RE: ZSQL - finding the id of what you just inserted? (Peter Bengtsson) 37. RE: Zope on Python 2.1 (Oleg Broytmann) 38. Re[2]: [Zope] GoLive and WebDAV? (Geir Bækholt) 39. RE: Zope on Python 2.1 (Tino Wildenhain) 40. Re: Zope on Python 2.1 (Martijn Pieters) 41. Re: __basicnew__ errors (seb bacon) 42. RFC - newbie with a zope product (bak (kedai)) 43. Re: [newbie] Property with <dtml-var> in it's value (Stefan Mallepell) 44. Re: delete HTML Tags out of a form input (Stefan Mallepell) 45. Re: Zope on Python 2.1 (Andreas Jung)
--__--__--
Message: 1 Date: Thu, 19 Apr 2001 17:05:16 -0500 From: The Doctor What <docwhat@gerf.org> To: zope@zope.org Subject: Re: [Zope] hasRole (Bug or My brain is dead?)
--+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable
* Hamish Lawson (hamish_lawson@yahoo.co.uk) [010419 14:41]:
Just a suggestion: You may want to consider whether it would be better to test whether the user has the appropriate permission using has_permission(), rather than for whether they have a particular role.
Thanks for the suggestion, but it's mainly a beautification. Example: I don't want the traceback on errors visible unless the user is logged in. :-) I don't care what their permissions are, just the fact that they are marked as development savvy.
Ciao!
--=20 When the only tool you have is a hammer, you tend to treat everything as if= it were a nail. -- Abraham Maslow
The Doctor What: Need I say more? http://docwhat.gerf.org/ docwhat@gerf.org KF6VNC
--+HP7ph2BbKc20aGI Content-Type: application/pgp-signature Content-Disposition: inline
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org
iD8DBQE632EckJDks3INMZURAr/TAJ9hfGRQ9e4xrinRstw0LsT1/S91BQCgiJ6+ 0bUtweGZU9kAZZA79JqrbK0= =Kafw -----END PGP SIGNATURE-----
--+HP7ph2BbKc20aGI--
--__--__--
Message: 2 From: "Phil Harris" <phil.harris@zope.co.uk> To: =?iso-8859-1?Q?Juan_Carlos_Coru=F1a?= <jcoruna@euskalnet.net>, <zope@zope.org> Subject: Re: [Zope] Problem with xmlrpc and manage_pasteObjects Date: Thu, 19 Apr 2001 23:15:06 +0100
Carlos,
I'm pretty sure that the cut/copy/paste functionality needs cookies to do the work.
xmlrpc doesn't as yet support cookie, so there is a problem there.
Hope that helps.
Phil
----- Original Message ----- From: "Juan Carlos Coru=F1a" <jcoruna@euskalnet.net> To: <zope@zope.org> Sent: Thursday, April 19, 2001 10:35 PM Subject: [Zope] Problem with xmlrpc and manage_pasteObjects
I have another xmlrpc replated problem:
If I test the following script (python) with the Zope management interface it works ok, but if I call the script from outside Zope using xmlrpc I become an Fault error:
xmlrpclib.Fault: <Fault -2: 'Unexpected Zope error value: Add Documents= , Images, and Files'>
This is the script:
# Create a unique document id id =3D 'pepe'
context.tmp.manage_addProduct['OFSP'].addDTMLDocument(id, title=3D"= ", file=3D'esto es una prueba') doctmp =3D getattr(context.tmp, id) doctmp.manage_addProperty('sender', 'loginName', 'string') doctmp.manage_addProperty('sessionId', 'session', 'string')
# move the message to the queue obj =3D context.tmp.manage_cutObjects(ids=3D[id]) context.manage_pasteObjects(obj)
return id
If I comment the line "context.manage_pasteObjects(obj)" Zope doesn't produce the error response.
Is there a limitations using manage_pasteObjects with xmlrpc? Any solutions?
_______________________________________________ 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 )
--__--__--
Message: 3 From: "Brian Lloyd" <brian@digicool.com> To: "seb bacon" <seb@jamkit.com>, <zope@zope.org> Subject: RE: [Zope] __basicnew__ errors Date: Thu, 19 Apr 2001 18:07:22 -0400
Whenever I try to import an object from one Zope (2.3.0) to another (2.3.1) I get a
Error Type: AttributeError Error Value: __basicnew__
<snip>
Why might this be? Can anyone shed any light onto what __basicnew__ does?
__basicnew__ is a rather low-level initialization method in ExtensionClass... I've never seen this before though :(
And has anyone any pointers to understanding these pickled traceback things? Whenever they occur, I find it's usually due to inconsistencies between the pickled product-related info and the products loaded from the filesystem, but I don't know how to go about debugging it.
There is definitely some problem unpickling one or more of the objects stored in the db (the junk in the traceback is the actual pickle string), but I don't have a quick answer for you on the cause here. Is it possible that you forgot to copy over a (filesystem) product that defines a base class or something used by these instances?
Brian Lloyd brian@digicool.com Software Engineer 540.371.6909 Digital Creations www.digicool.com
--__--__--
Message: 4 From: "alex" <alex@quad.com.ar> To: <zope@zope.org> Date: Thu, 19 Apr 2001 19:13:33 -0300 Subject: [Zope] how to change a title from python script?
Hey guys,
does anyone of you know how can an object title be changed without using the ugly manage_edit() method ?
I was expecting something more intuitive as in
dtml_method.title = 'new title instead of: dtml_method.mange_edit(data=dtml_object, title='new title')
reasons why I dont like manage_edit() ?
- It's a complete different method on each object. so you have to call it with different arguments depending the object you want to edit. - It's not intuitive at all!
thanks for your help !
Alex
--__--__--
Message: 5 From: "Andy McKay" <andym@ActiveState.com> To: "The Doctor What" <docwhat@gerf.org>, <zope@zope.org> Subject: Re: [Zope] hasRole (Bug or My brain is dead?) Date: Thu, 19 Apr 2001 15:24:38 -0700
Perhaps its just my mail client but your mail shows up as attachements. Annoying. -- Andy McKay.
----- Original Message ----- From: "The Doctor What" <docwhat@gerf.org> To: <zope@zope.org> Sent: Thursday, April 19, 2001 3:05 PM Subject: Re: [Zope] hasRole (Bug or My brain is dead?)
--__--__--
Message: 6 From: "Phil Harris" <phil.harris@zope.co.uk> To: "Andy McKay" <andym@ActiveState.com>, "The Doctor What" <docwhat@gerf.org>, <zope@zope.org> Subject: Re: [Zope] hasRole (Bug or My brain is dead?) Date: Thu, 19 Apr 2001 23:24:41 +0100
Oh good it's not just me!
V annoying!
----- Original Message ----- From: "Andy McKay" <andym@ActiveState.com> To: "The Doctor What" <docwhat@gerf.org>; <zope@zope.org> Sent: Thursday, April 19, 2001 11:24 PM Subject: Re: [Zope] hasRole (Bug or My brain is dead?)
Perhaps its just my mail client but your mail shows up as attachements. Annoying.
--__--__--
Message: 7 Date: Thu, 19 Apr 2001 17:27:57 -0500 From: The Doctor What <docwhat@gerf.org> To: Andy McKay <andym@ActiveState.com> Cc: zope@zope.org Subject: [Zope] Mail as attachments (MSOutlook Express...)
--LKTjZJSUETSlgu2t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable
* Andy McKay (andym@ActiveState.com) [010419 17:20]:
Perhaps its just my mail client but your mail shows up as attachements. Annoying.
Get the PGP plugin for Outlook. I'm sending GnuPG signed emails. The two parts are the body of the message and the GPG signature.
Eudora also behavies badly with signed mail without the PGP plugin.
Ciao!
--=20 "Laugh while you can, monkey boy!" --Dr. Emilio Lizardo (Adventures of Buckaroo Banzai)
The Doctor What: A Holtje Production http://docwhat.gerf.org/ docwhat@gerf.org KF6VNC
--LKTjZJSUETSlgu2t Content-Type: application/pgp-signature Content-Disposition: inline
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org
iD8DBQE632ZtkJDks3INMZURAsGAAJ0dhhw3eZqRvCOfKeruv49gwX73JgCgrrkU mQ/sieEtkHTs4ubISbzacsY= =Qmca -----END PGP SIGNATURE-----
--LKTjZJSUETSlgu2t--
--__--__--
Message: 8 Date: Thu, 19 Apr 2001 16:30:59 -0600 From: Casey Duncan <cduncan@kaivo.com> Organization: Kaivo, Inc. (www.kaivo.com) To: Juan Carlos =?iso-8859-1?Q?Coru=F1a?= <jcoruna@euskalnet.net> CC: zope@zope.org Subject: Re: [Zope] Problem with xmlrpc and manage_pasteObjects
Juan Carlos Coru=F1a wrote:
=20 I have another xmlrpc replated problem: =20 If I test the following script (python) with the Zope management interface it works ok, but if I call the script from outside Zope using xmlrpc I become an Fault error: =20 xmlrpclib.Fault: <Fault -2: 'Unexpected Zope error value: Add Documents= , Images, and Files'> =20 This is the script: =20 # Create a unique document id id =3D 'pepe' =20 context.tmp.manage_addProduct['OFSP'].addDTMLDocument(id, title=3D"= ", file=3D'esto es una prueba') doctmp =3D getattr(context.tmp, id) doctmp.manage_addProperty('sender', 'loginName', 'string') doctmp.manage_addProperty('sessionId', 'session', 'string') =20 # move the message to the queue obj =3D context.tmp.manage_cutObjects(ids=3D[id]) context.manage_pasteObjects(obj) =20 return id =20 If I comment the line "context.manage_pasteObjects(obj)" Zope doesn't produce the error response. =20 Is there a limitations using manage_pasteObjects with xmlrpc? Any solutions?
AFAIK, copy and paste in Zope use Cookies, so they won't work over XML-RPC as you found. You could move something programatically as follows
obj =3D context.tmp[id].aq_base context._setObject(obj, id) context.tmp.manage_delObjects(id)
This code could not be called directly from XML-RPC however...
Probably your best bet is to create a moveObject() external method that does the above and call it from XML-RPC.=20
hth, --=20 | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
--__--__--
Message: 9 From: "Phil Harris" <phil.harris@zope.co.uk> To: "The Doctor What" <docwhat@gerf.org>, "Andy McKay" <andym@ActiveState.com> Cc: <zope@zope.org> Subject: Re: [Zope] Mail as attachments (MSOutlook Express...) Date: Thu, 19 Apr 2001 23:33:28 +0100
OK I won't get the GPG plugin, so I won't read your mail.
Thanks for being so understanding!
----- Original Message ----- From: "The Doctor What" <docwhat@gerf.org> To: "Andy McKay" <andym@ActiveState.com> Cc: <zope@zope.org> Sent: Thursday, April 19, 2001 11:27 PM Subject: [Zope] Mail as attachments (MSOutlook Express...)
--__--__--
Message: 10 Date: Thu, 19 Apr 2001 15:37:22 -0700 From: Charlie Blanchard <charlie@blanchardsite.com> To: zope@zope.org Subject: Re: [Zope] Mail as attachments (MSOutlook Express...)
On Thu, Apr 19, 2001 at 05:27:57PM -0500, The Doctor What wrote:
* Andy McKay (andym@ActiveState.com) [010419 17:20]:
Perhaps its just my mail client but your mail shows up as attachements. Annoying.
Get the PGP plugin for Outlook. I'm sending GnuPG signed emails. The two parts are the body of the message and the GPG signature.
Eudora also behavies badly with signed mail without the PGP plugin.
for some reason the keyserver is refusing connections and causing timeout delays...
-- charlie blanchard http://baldguru.com/ Founder: LosAngeles area Zope Users Group http://lazug.org
--__--__--
Message: 11 Date: Thu, 19 Apr 2001 16:51:32 -0600 From: Casey Duncan <cduncan@kaivo.com> Organization: Kaivo, Inc. (www.kaivo.com) To: alex <alex@quad.com.ar> CC: zope@zope.org Subject: Re: [Zope] how to change a title from python script?
alex wrote:
Hey guys,
does anyone of you know how can an object title be changed without using
the
ugly manage_edit() method ?
I was expecting something more intuitive as in
dtml_method.title = 'new title instead of: dtml_method.mange_edit(data=dtml_object, title='new title')
reasons why I dont like manage_edit() ?
- It's a complete different method on each object. so you have to call it with different arguments depending the object you want to edit. - It's not intuitive at all!
thanks for your help !
Alex
Although it is still an ugly manage_ method, manage_changeProperties has basically the same syntax for all objects (excepting ZClass properties on custom property sheets). try:
obj.manage_changeProperties(title='new title')
hth, -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
--__--__--
Message: 12 Date: Thu, 19 Apr 2001 17:39:31 -0700 (PDT) From: Adrian Madrid <aemadrid@yahoo.com> Reply-To: aem@byu.edu To: zope@zope.org Subject: [Zope] Problems calling directory
I have a zclass which defines articles with a 'location' field. (ie. location = 'Portal.Publications.Review'). My problem is that the articles are located in a certain area but need to show in the 'location' specified. I don't understand why this code works:
<dtml-with "Portal.Publications.Review"> <p>This is the <dtml-var document_id> Document in the <dtml-var title_and_id> Folder.</p> </dtml-with>
While this code does not work:
<dtml-with "_['location']"> <p>This is the <dtml-var document_id> Document in the <dtml-var title_and_id> Folder.</p> </dtml-with>
Any ideas?
===== --------------------------- Adrian Esteban Madrid Benson Institute, Webmaster Brigham Young University --------------------------- adrian_esteban@madrid.com ===========================
__________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
--__--__--
Message: 13 From: "Arian de Wit" <adewit@niwa.cri.nz> Organization: NIWA To: zope@zope.org Date: Fri, 20 Apr 2001 12:56:16 +1200 Subject: [Zope] Re: Re: page templates!?
Hi all,
I had this same problem (ZPT wasn't processing things) using the example and had made a (presumably) silly mistake -- I had created the two objects in the example as DTML Document or DTML Method objects. Once I surmised that there was a new object available in the Add... list (Page Template) and used that for both objects, it worked (sort of).
Problem I have now is that it gives a KeyError in response to "here/Title":
exceptions.KeyError on Title in "<PathExpr standard:here/Title>"
(BTW, the < and > should be html-quoted -- the browser displays just:
exceptions.KeyError on Title in ""
which is less useful and required me to look at the source -- not a great hardship, but still...)
Both objects have a Title defined, so what might be causing this? And does "here" mean the master macro template (standard_lf.html in the example), or the "client" template (welcome.html)? Since they both have titles I figured trying it would let me know, but it's not working, so I have to ask. :-)
Excuse me if I'm being thick -- entirely possible, I admit.
Many thanks,
Arian
From: "Evan Simpson" <evan@digicool.com> To: "daniel dias" <diask8@yahoo.com.br>, "ZopeList" <zope@zope.org> Subject: Re: [Zope] page templates!? Date: Thu, 19 Apr 2001 12:16:30 -0400
From: "daniel dias" <diask8@yahoo.com.br>
<div metal:define-slot="main"> If you supply a tag with a 'fill-macro="main"' attribute when using this macro, that tag will replace this text. </div>
<div metal:fill-slot="main"> <p>Welcome to the machine</p> </div>
when I call template above it only shows the text "Welcome to the machine".
That is what should happen.
shouldn't appear " If you supply tag with ' fill-macro="main " ' attribute when using this macro, that tag will replace this text. " too?
No, that's the point of slots. If you supply a fill-slot with a matching slot name, the fill-slot tag replaces the define-slot tag.
Cheers,
Evan @ digicool
------------------------------------------------------------------ Arian de Wit, MSc(Hons), i-Net+, MCSE Information Systems Integration Manager NIWA (National Institute of Water & Atmospheric Research) Gate 10 Silverdale Road, Box 11-115, Hamilton, New Zealand Phone (+64) 7-856 1769 Fax (+64) 7-856 0151 Web http://www.niwa.cri.nz ------------------------------------------------------------------
--__--__--
Message: 14 Date: Thu, 19 Apr 2001 21:07:16 -0400 From: Sim Harbert <sim.harbert@zapmedia.com> Organization: ZapMedia To: Chris Withers <chrisw@nipltd.com> CC: zope@zope.org Subject: Re: [Zope] GoLive and WebDAV?
I have been checking into using ZPT to allow our designers to edit content, and so far things are going pretty well. But, I haven't had a chance to allow our designers edit things using the WebDAV interface with HomeSite (I don't have a copy). I have checked it a bit myself, and edit things using FTP (Xemacs EFS) and have set up certain folders to create PageTemplate objects by default, instead of DTML. I can give info on how to change PUT_factory() to get that to work.
The key to using ZPT with GoLive is whether GoLive removes the "extra" attributes that ZPT puts in. If it doesn't then things should work.
I'll try to keep you posted on how things go for us.
-Sim
Chris Withers wrote:
Hi,
I'm making my initial wanderings into using Adbove GoLive 5.0 to edit content in Zope and it's thrown up a few questions:
1. How do I persuade GoLive that it really can edit existing DTML Methods, etc that don't have names ending in .html? It seems that Zope very rarely sets an explicit content type on the WedDAV source port and so GoLive will only let you download the file...
2. How do I get GoLive to tell Zope to create the right kind of object? For example, I want to create file object with some lumps of text, python scripts with others, DTML methods with some and DTML documents with yet more? Has anyone tried ZPT over WebDAV yet?
3. [OT] How do I set up a Zope server as a 'Site' so that site menu has something not greyed out on it?!
cheers,
Chris
_______________________________________________ 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 )
--__--__--
Message: 15 Date: Thu, 19 Apr 2001 20:56:20 -0500 From: The Doctor What <docwhat@gerf.org> To: Jim Penny <jpenny@universal-fasteners.com> Cc: zope@zope.org Subject: [Zope] ZSQL - finding the id of what you just inserted?
Howdy again....
I use a dtml-call to call a zsql object that does an insert. I don't specify ID because ID is auto-sequenced by the DB.
How can I find out what the ID of that just inserted object is so I can do more operations on it?
Related question: Why doesn't this work? <dtml-call expr="RESPONSE.redirect('index_html?message=Link+added&url_id='+url_id)">
Zope complains about a builtin...
Ciao!
-- "Always do right. This will gratify some people and astonish the rest." -- Mark Twain
The Doctor What: A really hip dude http://docwhat.gerf.org/ docwhat@gerf.org KF6VNC
--__--__--
Message: 16 Date: Thu, 19 Apr 2001 22:52:40 -0400 From: ethan mindlace fremen <mindlace@digicool.com> To: Steve Drees <drees@the-bridge.net>, "Zope@Zope. Org" <zope@zope.org> Subject: Re: [Zope] Correction to http://www.zope.org/Wikis/DevSite/Projects/ZPT/IntroductionForDTMLers
--On Thursday, April 19, 2001 16:01:56 -0500 Steve Drees <drees@the-bridge.net> wrote:
First line of Template Operations section
Just as <dtml-var foo> is the most fundamental statement of DTML, replace="expr" and insert="expr" are the basic workhorses of TAL.
Should read Just as <dtml-var foo> is the most fundamental statement of DTML, replace="expr" and content="expr" are the basic workhorses of TAL.
Fixed! If you are logged in, note that you could comment on this wiki, and I'm certain someone would have fixed it.
Thanks, ethan -- -mindlace- zopatista community liason
--__--__--
Message: 17 Date: Thu, 19 Apr 2001 22:56:55 -0400 From: ethan mindlace fremen <mindlace@digicool.com> To: Jerome Alet <alet@unice.fr>, zope@zope.org Subject: Re: [Zope] problem testing for a permission
--On Thursday, April 19, 2001 23:01:42 +0200 Jerome Alet <alet@unice.fr> wrote:
<dtml-if "AUTHENTICATED_USER.has_permission('View', mymethod)"> ... Some tests and text ... <A HREF="<dtml-var URL>/mymethod">Members only</A> ... Some tests and text ... </dtml-if>
but if I access the pages as an anonymous user then I've got an Unauthorized exception instead of not having the "Members only" link.
What do I have done wrong ?
you don't want to evaluate truth: you want to see if there's an exception.
I think you want:
<dtml-try "AUTHENTICATED_USER.has_permission('View', mymethod)"> <A HREF="<dtml-var URL>/mymethod">Members only</A> <dtml-except> You are Anonymoose! </dtml-try>
Hope that helps, -- -mindlace- zopatista community liason
--__--__--
Message: 18 Date: Thu, 19 Apr 2001 22:59:59 -0400 From: ethan mindlace fremen <mindlace@digicool.com> To: Arian de Wit <adewit@niwa.cri.nz>, zope@zope.org Subject: Re: [Zope] Re: Re: page templates!?
--On Friday, April 20, 2001 12:56:16 +1200 Arian de Wit <adewit@niwa.cri.nz> wrote:
exceptions.KeyError on Title in ""
which is less useful and required me to look at the source -- not a great hardship, but still...)
Both objects have a Title defined, so what might be causing this?
hmm ... most objects have a title , few have a Title . Perhaps it is the case that's giving you a problem?
~ethan -- -mindlace- zopatista community liason
--__--__--
Message: 19 From: "Arian de Wit" <adewit@niwa.cri.nz> Organization: NIWA To: ethan mindlace fremen <mindlace@digicool.com>, zope@zope.org Date: Fri, 20 Apr 2001 15:26:27 +1200 Subject: Re: [Zope] Re: Re: page templates!?
Hi again,
Sorry, should have made that clear. Same problem with "title" as with "Title"
Arian
--On Friday, April 20, 2001 12:56:16 +1200 Arian de Wit <adewit@niwa.cri.nz> wrote:
exceptions.KeyError on Title in ""
which is less useful and required me to look at the source -- not a great hardship, but still...)
Both objects have a Title defined, so what might be causing this?
hmm ... most objects have a title , few have a Title . Perhaps it is the case that's giving you a problem?
~ethan -- -mindlace- zopatista community liason
------------------------------------------------------------------ Arian de Wit, MSc(Hons), i-Net+, MCSE Information Systems Integration Manager NIWA (National Institute of Water & Atmospheric Research) Gate 10 Silverdale Road, Box 11-115, Hamilton, New Zealand Phone (+64) 7-856 1769 Fax (+64) 7-856 0151 Web http://www.niwa.cri.nz ------------------------------------------------------------------
--__--__--
Message: 20 From: "Danny William Adair" <Danny@Adair.net> To: "Mike Blake" <mike.blake@cellnetwork.com>, <zope@zope.org> Subject: Re: [Zope] html version of zope site Date: Fri, 20 Apr 2001 15:33:02 +1200
wget is definitely the easiest approach.
For a pure zope approach, you might want to take a look at Ross's ZMirror product: http://www.zope.org/Members/rossl/ZMirror (last updated Sept 12,1999!)
It's probably not a out-of-the-box solution, but shows how to basically do things like this from Zope. I had a couple of problems using it as is, but it might be a framework to a solution where you just say: "Ok, this folder looks like it's ready to go out. Shovel!"
Danny
--__--__--
Message: 21 From: "Arian de Wit" <adewit@niwa.cri.nz> Organization: NIWA To: ethan mindlace fremen <mindlace@digicool.com>, zope@zope.org Date: Fri, 20 Apr 2001 15:45:09 +1200 Subject: Re: [Zope] Re: Re: page templates!?
Got it! needed to use template/title in the macro template, and here/title in the other one :-)
Arian
--On Friday, April 20, 2001 12:56:16 +1200 Arian de Wit <adewit@niwa.cri.nz> wrote:
exceptions.KeyError on Title in ""
which is less useful and required me to look at the source -- not a great hardship, but still...)
Both objects have a Title defined, so what might be causing this?
hmm ... most objects have a title , few have a Title . Perhaps it is the case that's giving you a problem?
~ethan -- -mindlace- zopatista community liason
------------------------------------------------------------------ Arian de Wit, MSc(Hons), i-Net+, MCSE Information Systems Integration Manager NIWA (National Institute of Water & Atmospheric Research) Gate 10 Silverdale Road, Box 11-115, Hamilton, New Zealand Phone (+64) 7-856 1769 Fax (+64) 7-856 0151 Web http://www.niwa.cri.nz ------------------------------------------------------------------
--__--__--
Message: 22 Date: Thu, 19 Apr 2001 22:45:12 -0500 From: Ausum <augusto@artlover.com> To: zope@zope.org Subject: [Zope] Summarization and Zope
After searching the Zope's site and the web, this is a question I've come up with: Is anybody working on a Summarization product for Zope?
Some weeks ago, after reading the Directions Road Map, I realized that the best way to include these kind of features in Zope was to write communication components to existing software, rather than dealing with new, complicated code, from scratch. But I'm assuming there aren't current projects on summarization written in Python, so if this is correct, this may be the right moment to start a new proposal on this subject, at least at a very basic level.
Regards,
Ausum
--__--__--
Message: 23 Date: Thu, 19 Apr 2001 22:47:30 -0500 From: The Doctor What <docwhat@gerf.org> To: zope@zope.org Cc: Jim Penny <jpenny@universal-fasteners.com> Subject: Re: [Zope] ZSQL - finding the id of what you just inserted?
* The Doctor What (docwhat@gerf.org) [010419 21:02]:
Howdy again....
I use a dtml-call to call a zsql object that does an insert. I don't specify ID because ID is auto-sequenced by the DB.
How can I find out what the ID of that just inserted object is so I can do more operations on it?
Related question: Why doesn't this work? <dtml-call expr="RESPONSE.redirect('index_html?message=Link+added&url_id='+url_id)">
Zope complains about a builtin...
If figured it out in the end. It was actually a Postgres question: INSERT INTO URL (val_ProtocolID, Url, Name, Summary, Description, Created) VALUES ( <dtml-sqlvar protocol_id type=int>, <dtml-sqlvar url_part type=nb>, <dtml-sqlvar url_name type=nb>, <dtml-sqlvar url_summary type=nb>, <dtml-sqlvar url_description type=nb>, now() ) <dtml-var sql_delimiter> SELECT id as url_id FROM URL WHERE id = currval('url_id_seq')
Ciao!
-- Any programming language is at its best before it is implemented and used.
The Doctor What: Un-Humble http://docwhat.gerf.org/ docwhat@gerf.org KF6VNC
--__--__--
Message: 24 Date: Fri, 20 Apr 2001 06:39:29 +0200 From: Ben.Peter@t-online.de (Ben Peter) To: aem@byu.edu Cc: zope@zope.org Subject: Re: [Zope] Problems calling directory
Adrian,
Adrian Madrid <aemadrid@yahoo.com> wrote:
<dtml-with "Portal.Publications.Review"> <p>This is the <dtml-var document_id> Document in the <dtml-var title_and_id> Folder.</p> </dtml-with>
<dtml-with "_['location']"> <p>This is the <dtml-var document_id> Document in the <dtml-var title_and_id> Folder.</p> </dtml-with>
All, please correct me if I'm writing bullshit ;-)
<dtml-with "_['location']"> gives you the string "Portal.Publications.Review", while
<dtml-with "Portal.Publications.Review"> gives you the actual resolved object.
So, what might do the trick could be
<dtml-with "_.getitem('location')">
It might be helpful to remember that using double quotes really means expr="". That is why your first example gives you the object that resolves to the name, while the second will resolve the expresion and give you the string contained in 'location'.
Cheers, Ben
-- Ben Peter - Feldstrasse 8 - 35091 Coelbe Ben.Peter@t-online.de ph: (+49) 6421 983520
--__--__--
Message: 25 Date: Fri, 20 Apr 2001 07:18:17 +0200 From: Ben.Peter@t-online.de (Ben Peter) To: Ben.Peter@t-online.de (Ben Peter) Cc: aem@byu.edu, zope@zope.org Subject: Re: [Zope] UPDATE: Problems calling directory
Adrian,
I did write bullshit.
Ben.Peter@t-online.de (Ben Peter) wrote:
<dtml-with "_['location']"> gives you the string "Portal.Publications.Review", while
<dtml-with "Portal.Publications.Review"> gives you the actual resolved object.
This is still true, but:
<dtml-with "_.getitem('location')">
wont't give you more than the string "Portal.Publications.Review" either. So, what you want is:
<dtml-with "_.getitem(_.getitem('location'))">
The inner _.getitem('location') will yield the string "Portal.Publications.Review". The outer _.getitem will then give you the actual object.
Sorry for the confusion.
Cheers, Ben
-- Ben Peter - Feldstrasse 8 - 35091 Coelbe Ben.Peter@t-online.de ph: (+49) 6421 983520
--__--__--
Message: 26 From: "Uwe C. Schroeder" <Uwe.Schroeder@contrada.de> Reply-To: Uwe.Schroeder@contrada.de Organization: ConTrada Consultants Europe To: "Chris McDonough" <chrism@digicool.com> Date: Fri, 20 Apr 2001 07:44:26 +0200 Cc: <zope@zope.org> Subject: [Zope] Re: CoreSessionTracking
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Monday 16 April 2001 20:47, Chris McDonough wrote: Hi Chris,
the commit doesn't work as expected. My bet it that SessionTracking won't= =20 save any sessiondata in a auth method. I traced through loginmanager - bu= t=20 there are no exceptions in the code (none relevant). The general architec= ture=20 leads me to the asumption that the exception must be generated in the Zop= e=20 core. I did something else: I use the SessionID to store values in a SQL=20 database. That works. So it really has something to do with the storage. For now I use the SQL solution - since the project needs a database anywa= ys=20 thats no big impact. But it would have been nice to use the=20 CoreSessionTracking - methods, since they're more flexible. Lucky me that= the=20 site has no big traffic - SQL slows things down.
Thanks for you help.
Hi Uwe,
If possible, continue to cc the Zope list on this... thanks...
You can explicitly cause a transaction to be committed, but not in DTML= or in a Python Script. You'll need to use an external method...
Here's an example of an function which does this:
def commit_trans(): get_transaction().commit()
Make an external method named commit_trans, reference this function fro= m within the external method UI, and then from dtml, you can do this:
<dtml-call commit_trans>
.... right before the raise. This should save the session data, then i= t won't matter if you raise afterwards in the DTML.
HTH,
- C
----- Original Message ----- From: "Uwe C. Schroeder" <Uwe.Schroeder@contrada.de> To: "Chris McDonough" <chrism@digicool.com> Sent: Monday, April 16, 2001 2:32 PM Subject: Re: CoreSessionTracking
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Monday 16 April 2001 20:22, you wrote:
Hi Uwe,
Thanks for the concise explanation of the problem... I'm cc'ing the Z= ope list on this... it's best to keep this stuff on the Zope list because= the message archive helps other folks out (including me! ;-)
I think what's happening here is that the dtml-raise in the middle of= the first snippet of DTML below aborts the ZODB transaction, and so the
session
data is never saved...
Is there a way to prompt for authorization without doing a DTML raise= ? I've never used LoginManager...
Hi,
wow - that's a quick answer. No I don't think that there's another way to do handle loginmanager. Loginmanager gets called on an authorization exception. The LoginForm i= sn't called directly, but gets called on any object a user tries to view wit= hout proper authentication. I don't know much about ZODB transactions, but probably you know if the= re's a way to finish the old transaction and start a new one ?
Thanks - I'll try to remove the raise.
Regards
Uwe C. Schr=F6der
- -- Uwe C. Schr=F6der ConTrada Consult= ants Lindenstrasse 15 Tel/Fax: +49 8294 80070 D-86477 Adelsried Mobil: +49= 172 8532352 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org
iD8DBQE62zrRTJbO78VG0aIRAhVvAKCq1jMYJgKai9x4qBLCKS1y8rAigACffDfG IqFwZQA8KO4a6d5++Qpik/o=3D =3DIV1E -----END PGP SIGNATURE-----
- --=20 Uwe C. Schr=F6der
- -- Uwe C. Schr=F6der ConTrada Consultan= ts Lindenstrasse 15 Tel/Fax: +49 8294 80= 070 D-86477 Adelsried Mobil: +49 172 853= 2352 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org
iD8DBQE638y9TJbO78VG0aIRAp4+AJ9QN7PHcy4ukph+gUNetSOlVk+DEgCdHHKd tqugd0ZtS5XG0oNoDTy6ASY=3D =3DmBWe -----END PGP SIGNATURE-----
--__--__--
Message: 27 Date: Thu, 19 Apr 2001 23:20:29 -0700 (PDT) From: Adrian Madrid <aemadrid@yahoo.com> Reply-To: aem@byu.edu Subject: Re: [Zope] UPDATE: Problems calling directory To: Ben Peter <Ben.Peter@t-online.de>, zope@zope.org
--- Ben Peter <Ben.Peter@t-online.de> wrote:
Adrian,
Although it sounds right I have tried and I sitll get KeyError : name not found or allowed. ... That sounds much like the Portal.Publications.Review cannot be properly acquired from where your dtml-with snipplet is called. Could you go a bit into detail with your folder structure?
Root +- Portal (CMF Site) | +- Members (Folder) | | +- aem (Folder) | | +- ArticleX (CMF Article) | +- Publications (Folder) | | +- Review (Folder) | | | +- Vol22 (Folder)
As you can see I working on a CMF site the is giving me headaches. ArticleX is a customized content that has a 'location' property with the directory where it should show up (ie. 'Publications/Review/Vol22').
In the standard_html_header I call a dtml method (breadcrumbs) where I want to get the fake PARENTS (the lineage of where it should show). Here follows some of the code I was working on:
<dtml-if location>
<p>Location: &dtml-location;
<dtml-let transtab="_.string.maketrans('/', '.')" location2="'Portal.'+_.string.translate(location, transtab)">
<p>Location2: &dtml-location2;
<p>Works:</p> <dtml-with "Portal.Publications.Review.Vol22"> <p>This is the <dtml-var document_id> Document in the <dtml-var title_and_id> Folder.</p> </dtml-with>
<p>Does not:</p> <dtml-with "_.getitem(_.getitem('location2'))"> <p>This is the <dtml-var document_id> Document in the <dtml-var title_and_id> Folder.</p> </dtml-with>
</dtml-let>
</dtml-if>
I don't know if there is something in the CMF that breaks the logic and I will try that tomorrow. If you see anything that I can try, please let me know.
Thanks again for your help,
===== --------------------------- Adrian Esteban Madrid Benson Institute, Webmaster Brigham Young University --------------------------- adrian_esteban@madrid.com ===========================
__________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
--__--__--
Message: 28 Date: Fri, 20 Apr 2001 08:44:41 +0200 From: Tino Wildenhain <tino@wildenhain.de> To: aem@byu.edu, zope@zope.org Subject: Re: [Zope] Problems calling directory
Hi,
this is a common understanding problem. To get a feeling whats bad, try to start the python interpreter and type in the following:
class dummy: def __getitem__(self,key): return(getattr(self,key)) # two newlines here
a=dummy() b=dummy() c=dummy()
b.c=c a.b=b
you now can access c thru a and b like this:
a.b.c
or a['b']['c']
but you cannot use a['b.c'] to access c, since the objects names are 'b' and 'c' and not 'b.c'
HTH Tino Wildenhain
--On Donnerstag, 19. April 2001 17:39 -0700 Adrian Madrid <aemadrid@yahoo.com> wrote:
I have a zclass which defines articles with a 'location' field. (ie. location = 'Portal.Publications.Review'). My problem is that the articles are located in a certain area but need to show in the 'location' specified. I don't understand why this code works:
<dtml-with "Portal.Publications.Review"> <p>This is the <dtml-var document_id> Document in the <dtml-var title_and_id> Folder.</p> </dtml-with>
While this code does not work:
<dtml-with "_['location']"> <p>This is the <dtml-var document_id> Document in the <dtml-var title_and_id> Folder.</p> </dtml-with>
Any ideas?
===== --------------------------- Adrian Esteban Madrid Benson Institute, Webmaster Brigham Young University --------------------------- adrian_esteban@madrid.com ===========================
__________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
_______________________________________________ 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 )
--__--__--
Message: 29 From: "Menno Brandsen" <menno@zreal.net> To: <zope@zope.org> Date: Fri, 20 Apr 2001 08:49:06 +0200 Subject: [Zope] Copy 'n Paste
This is a multi-part message in MIME format.
------=_NextPart_000_0016_01C0C976.C1D09490 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit
Hello all, I'm trying to write a little script that makes it possible to copy a folder out of the root into a sub folder just by clicking on a link !
I've tried this, but it doesnt seem to work !
<dtml-let clip="manage_copyObjects(objectIds('pasteme'))"> <dtml-call "manage_pasteObjects(clip)"> </dtml-let>
I hope someone can help out with this !
Cheers, Menno
------=_NextPart_000_0016_01C0C976.C1D09490 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.3103.1000" name=3DGENERATOR></HEAD> <BODY> <DIV><FONT face=3DArial size=3D2> <DIV><FONT face=3DArial size=3D2><SPAN class=3D507594713-19042001>Hello = all,=20 </SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D507594713-19042001>I'm = trying to write=20 a little script that makes it possible to copy a folder out of the root = into a=20 sub folder just by clicking on a link !</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D507594713-19042001></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D507594713-19042001>I've = tried this, but=20 it doesnt seem to work !</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D507594713-19042001></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN = class=3D507594713-19042001><dtml-let=20 clip=3D"manage_copyObjects(objectIds('pasteme'))"><BR><dtml-call=20 "manage_pasteObjects(clip)"><BR></dtml-let></SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D507594713-19042001></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D507594713-19042001></SPAN></FONT> <FONT face=3DArial = size=3D2><SPAN=20 class=3D507594713-19042001>I hope someone can help out with this=20 !</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D507594713-19042001></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D507594713-19042001></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D507594713-19042001></SPAN></FONT> <FONT face=3DArial = size=3D2><SPAN=20 class=3D507594713-19042001>Cheers,=20 Menno</SPAN></FONT></DIV></FONT></DIV></BODY></HTML>
------=_NextPart_000_0016_01C0C976.C1D09490--
--__--__--
Message: 30 Date: Fri, 20 Apr 2001 10:19:26 +0200 (MET DST) From: Jerome Alet <alet@unice.fr> To: ethan mindlace fremen <mindlace@digicool.com> cc: zope@zope.org Subject: Re: [Zope] problem testing for a permission
Hi,
On Thu, 19 Apr 2001, ethan mindlace fremen wrote:
--On Thursday, April 19, 2001 23:01:42 +0200 Jerome Alet <alet@unice.fr> wrote:
<dtml-if "AUTHENTICATED_USER.has_permission('View', mymethod)"> Some tests and text <A HREF="<dtml-var URL>/mymethod">Members only</A> Some tests and text </dtml-if>
but if I access the pages as an anonymous user then I've got an Unauthorized exception instead of not having the "Members only" link.
you don't want to evaluate truth: you want to see if there's an exception. <dtml-try "AUTHENTICATED_USER.has_permission('View', mymethod)"> <A HREF="<dtml-var URL>/mymethod">Members only</A> <dtml-except> You are Anonymoose! </dtml-try>
Doesn't work, but it's better: the link appears even if the user is anonymous, but if he clicks on the link then the authentication dialog box opens. What I want is for the link to not appear at all, if possible.
the permissions on "my_method" are normal, except View which is only allowed to roles Manager and Member, and not acquired.
Zope version is 2.3.1b2
bye,
Jerome Alet
--__--__--
Message: 31 From: Uwe Fechner <uwe.fechner@4commerce.de> To: Yvonne Totty <ytotty@atinucleus.com> CC: =?ISO-8859-1?Q?zope=40zope=2Eorg?= <zope@zope.org> Date: Fri, 20 Apr 2001 10:46:57 +0200 Subject: [Zope] =?ISO-8859-1?Q?Re=3A=20=5BZope=5D=20Native=20Database=20for=20Zope?=
Hi Yvonne,
we are trying to solve a similar problem with interbase/ firebird= . It's a robust database engine, firebird is open source, and there exist several replication engines for interbase.
Best regards:
UFechner@4commerce.de =20
All, =20 We have a system that we need to track orders, inventory, etc. Pretty much an enterprise system. =20 We also would like to be able to mirror and/or set up a distributed database. =20 What system would you guys suggest for this task? =20 TIA, =20 -y ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Yvonne Totty Database Engineer ------------------------- Maximus: What we do in life, echoes in eternity. -- Gladiator =20 =20 =20 =20 =20 _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists -=20 http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) =20
--__--__--
Message: 32 Date: Fri, 20 Apr 2001 13:13:40 +0400 (MSD) From: Oleg Broytmann <phd@phd.fep.ru> Reply-To: <phd@phd.fep.ru> To: Zope Mailing List <zope@zope.org> Subject: [Zope] Zope on Python 2.1
Hello!
I did a quick test on how Zope would run on Python 2.1. I didn't do extensive tests, but at first glance it works without a problem. I've got some deprecation warnings:
/usr/local/Zope/ZServer/medusa/asynchat.py:293: DeprecationWarning: the regex module is deprecated; please use the re module import regex /usr/local/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module is deprecated; please use re.sub() DeprecationWarning) /usr/local/Zope/ZServer/medusa/asynchat.py:293: DeprecationWarning: the regex module is deprecated; please use the re module import regex /usr/local/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module is deprecated; please use re.sub() DeprecationWarning)
Oleg. ---- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
--__--__--
Message: 33 From: "Phil Harris" <phil.harris@zope.co.uk> To: "ethan mindlace fremen" <mindlace@digicool.com>, "Arian de Wit" <adewit@niwa.cri.nz>, <zope@zope.org> Subject: Re: [Zope] Re: Re: page templates!? Date: Fri, 20 Apr 2001 10:27:11 +0100
I also saw this when I was playing with ZPT.
I think it's some sort of security problem.
It's think the same error as one I wrote about a few days ago.
I'll reiterate what I thought then, there is something gone bad in the Zope security machinery. I can't put my finger on what exactly is wrong, but things that used to work no longer do so without loosening the permissions.
I first noticed it when I was using the LoginManager, and at the time thought it was something I'd fcked up in there. Now I'm not so sure.
If you check the mailing list there have been sporadic reports of very similar problems over the last few months, at least they seem similar to me.
I honestly thought I was losing some of my understanding of the Zope security machinery, but now I'm pretty sure there's something gone awry.
I'll do some more investigations and see if I can come up with a simple example of the problems I'm getting.
Phil
----- Original Message ----- From: "ethan mindlace fremen" <mindlace@digicool.com> To: "Arian de Wit" <adewit@niwa.cri.nz>; <zope@zope.org> Sent: Friday, April 20, 2001 3:59 AM Subject: Re: [Zope] Re: Re: page templates!?
--On Friday, April 20, 2001 12:56:16 +1200 Arian de Wit <adewit@niwa.cri.nz> wrote:
exceptions.KeyError on Title in ""
which is less useful and required me to look at the source -- not a great hardship, but still...)
Both objects have a Title defined, so what might be causing this?
hmm ... most objects have a title , few have a Title . Perhaps it is the case that's giving you a problem?
~ethan -- -mindlace- zopatista community liason
_______________________________________________ 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 )
--__--__--
Message: 34 Date: Fri, 20 Apr 2001 11:40:29 +0200 From: Martijn Pieters <mj@digicool.com> To: Sim Harbert <sim.harbert@zapmedia.com> Cc: Chris Withers <chrisw@nipltd.com>, zope@zope.org Subject: Re: [Zope] GoLive and WebDAV?
On Thu, Apr 19, 2001 at 09:07:16PM -0400, Sim Harbert wrote:
I have been checking into using ZPT to allow our designers to edit content, and so far things are going pretty well. But, I haven't had a chance to allow our designers edit things using the WebDAV interface with HomeSite (I don't have a copy). I have checked it a bit myself, and edit things using FTP (Xemacs EFS) and have set up certain folders to create PageTemplate objects by default, instead of DTML. I can give info on how to change PUT_factory() to get that to work.
The key to using ZPT with GoLive is whether GoLive removes the "extra" attributes that ZPT puts in. If it doesn't then things should work.
I'll try to keep you posted on how things go for us.
GoLive doesn't remove them, so you're in luck. :)
-- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
--__--__--
Message: 35 From: "Peter Bengtsson" <peter@grenna.net> To: <phd@phd.fep.ru> Cc: <zope@zope.org> Subject: RE: [Zope] Zope on Python 2.1 Date: Fri, 20 Apr 2001 11:41:46 +0200
Take the risk of search-replace all occurances of "regex" with "re". "regex" is a pretty "odd" word so it's unlikely to find it inside other words. Let us know if that worked.
-----Message d'origine----- De : zope-admin@zope.org [mailto:zope-admin@zope.org]De la part de Oleg Broytmann Envoye : vendredi 20 avril 2001 11:14 A : Zope Mailing List Objet : [Zope] Zope on Python 2.1
Hello!
I did a quick test on how Zope would run on Python 2.1. I didn't do extensive tests, but at first glance it works without a problem. I've got some deprecation warnings:
/usr/local/Zope/ZServer/medusa/asynchat.py:293: DeprecationWarning: the regex module is deprecated; please use the re module import regex /usr/local/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module is deprecated; please use re.sub() DeprecationWarning) /usr/local/Zope/ZServer/medusa/asynchat.py:293: DeprecationWarning: the regex module is deprecated; please use the re module import regex /usr/local/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module is deprecated; please use re.sub() DeprecationWarning)
Oleg. ---- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
_______________________________________________ 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 )
--__--__--
Message: 36 From: "Peter Bengtsson" <peter@grenna.net> To: "The Doctor What" <docwhat@gerf.org> Cc: <zope@zope.org> Subject: RE: [Zope] ZSQL - finding the id of what you just inserted? Date: Fri, 20 Apr 2001 11:47:46 +0200
If you want to be more on the safe side here's another way of doing it.
# create random string like 208h28hd280D7ych987YD98N80e048N3C # or make that a param INSERT into table SET name='<dtml-var name>', lastname='208h28hd280D7ych987YD98N80e048N3C' <dtml-var sql_delimiter> SELECT id FROM table WHERE lastname='208h28hd280D7ych987YD98N80e048N3C' <dtml-var sql_delimiter> UPDATE table SET lastname='<dtml-var lastname>' WHERE lastname='208h28hd280D7ych987YD98N80e048N3C'
Get it? Peter
-----Message d'origine----- De : zope-admin@zope.org [mailto:zope-admin@zope.org]De la part de The Doctor What Envoye : vendredi 20 avril 2001 05:48 A : zope@zope.org Cc : Jim Penny Objet : Re: [Zope] ZSQL - finding the id of what you just inserted?
* The Doctor What (docwhat@gerf.org) [010419 21:02]:
Howdy again....
I use a dtml-call to call a zsql object that does an insert. I don't specify ID because ID is auto-sequenced by the DB.
How can I find out what the ID of that just inserted object is so I can do more operations on it?
Related question: Why doesn't this work? <dtml-call expr="RESPONSE.redirect('index_html?message=Link+added&url_id='+url_id)">
Zope complains about a builtin...
If figured it out in the end. It was actually a Postgres question: INSERT INTO URL (val_ProtocolID, Url, Name, Summary, Description, Created) VALUES ( <dtml-sqlvar protocol_id type=int>, <dtml-sqlvar url_part type=nb>, <dtml-sqlvar url_name type=nb>, <dtml-sqlvar url_summary type=nb>, <dtml-sqlvar url_description type=nb>, now() ) <dtml-var sql_delimiter> SELECT id as url_id FROM URL WHERE id = currval('url_id_seq')
Ciao!
-- Any programming language is at its best before it is implemented and used.
The Doctor What: Un-Humble http://docwhat.gerf.org/ docwhat@gerf.org KF6VNC
_______________________________________________ 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 )
--__--__--
Message: 37 Date: Fri, 20 Apr 2001 13:48:27 +0400 (MSD) From: Oleg Broytmann <phd@phd.fep.ru> Reply-To: Oleg Broytmann <phd@phd.fep.ru> To: Peter Bengtsson <peter@grenna.net> cc: <zope@zope.org> Subject: RE: [Zope] Zope on Python 2.1
Hi!
Thank you. But it was only an information message! I didn't ask for help :))) I only wanted to let people to know that Zope is running on Python 2.1. I won't change Zope myself for Python 2.1 - Python 2.1 has many interesting capabilities, and DC people already announced that they will produce special version for python 2.1 (probably Zope 2.4). I cannot speak for them, but I think the most important things are Unicode and function attributes. Function attributes allow one to mark a function with user-defined attributes. Zope can use this in a number of ways. Mark a function as "publishable" (instead of abusing docstrings); assign roles to the function... etc.
On Fri, 20 Apr 2001, Peter Bengtsson wrote:
Take the risk of search-replace all occurances of "regex" with "re". "regex" is a pretty "odd" word so it's unlikely to find it inside other words. Let us know if that worked.
-----Message d'origine----- De : zope-admin@zope.org [mailto:zope-admin@zope.org]De la part de Oleg Broytmann Envoye : vendredi 20 avril 2001 11:14 A : Zope Mailing List Objet : [Zope] Zope on Python 2.1
Hello!
I did a quick test on how Zope would run on Python 2.1. I didn't do extensive tests, but at first glance it works without a problem. I've got some deprecation warnings:
/usr/local/Zope/ZServer/medusa/asynchat.py:293: DeprecationWarning: the regex module is deprecated; please use the re module import regex /usr/local/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module is deprecated; please use re.sub() DeprecationWarning) /usr/local/Zope/ZServer/medusa/asynchat.py:293: DeprecationWarning: the regex module is deprecated; please use the re module import regex /usr/local/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module is deprecated; please use re.sub() DeprecationWarning)
Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
--__--__--
Message: 38 Date: Fri, 20 Apr 2001 11:46:55 +0200 From: Geir Bækholt <geirh@funcom.com> Reply-To: Geir Bækholt <geirh@funcom.com> Organization: Funcom Oslo To: Sim Harbert <sim.harbert@zapmedia.com> CC: zope@zope.org Subject: Re[2]: [Zope] GoLive and WebDAV?
I would love some info on changing PUT_factory for folders. Any chance of a howTo ??
-- Geir Bækholt web-developer/designer geirh@funcom.com http://www.funcom.com
on or about, Friday, April 20, 2001, we have reason to believe that Martijn Pieters wrote something along the lines of : MP> On Thu, Apr 19, 2001 at 09:07:16PM -0400, Sim Harbert wrote:
I have been checking into using ZPT to allow our designers to edit content, and so far things are going pretty well. But, I haven't had a chance to allow our designers edit things using the WebDAV interface with HomeSite (I don't have a copy). I have checked it a bit myself, and edit things using FTP (Xemacs EFS) and have set up certain folders to create PageTemplate objects by default, instead of DTML. I can give info on how to change PUT_factory() to get that to work.
The key to using ZPT with GoLive is whether GoLive removes the "extra" attributes that ZPT puts in. If it doesn't then things should work.
I'll try to keep you posted on how things go for us.
MP> GoLive doesn't remove them, so you're in luck. :)
--__--__--
Message: 39 Date: Fri, 20 Apr 2001 11:50:34 +0200 From: Tino Wildenhain <tino@wildenhain.de> To: Peter Bengtsson <peter@grenna.net>, phd@phd.fep.ru Cc: zope@zope.org Subject: RE: [Zope] Zope on Python 2.1
Hi,
this is only in ansynchat.py, I replaced it once and it works since then without problems. However I thought about replacing the whole function where it gets used with one of my first C extensions if I get so far ;)
Regards Tino
--On Freitag, 20. April 2001 11:41 +0200 Peter Bengtsson <peter@grenna.net> wrote:
Take the risk of search-replace all occurances of "regex" with "re". "regex" is a pretty "odd" word so it's unlikely to find it inside other words. Let us know if that worked.
-----Message d'origine----- De : zope-admin@zope.org [mailto:zope-admin@zope.org]De la part de Oleg Broytmann Envoye : vendredi 20 avril 2001 11:14 A : Zope Mailing List Objet : [Zope] Zope on Python 2.1
Hello!
I did a quick test on how Zope would run on Python 2.1. I didn't do extensive tests, but at first glance it works without a problem. I've got some deprecation warnings:
/usr/local/Zope/ZServer/medusa/asynchat.py:293: DeprecationWarning: the regex module is deprecated; please use the re module import regex /usr/local/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module is deprecated; please use re.sub() DeprecationWarning) /usr/local/Zope/ZServer/medusa/asynchat.py:293: DeprecationWarning: the regex module is deprecated; please use the re module import regex /usr/local/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module is deprecated; please use re.sub() DeprecationWarning)
Oleg. ---- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
_______________________________________________ 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 )
--__--__--
Message: 40 Date: Fri, 20 Apr 2001 11:52:12 +0200 From: Martijn Pieters <mj@digicool.com> To: Peter Bengtsson <peter@grenna.net> Cc: phd@phd.fep.ru, zope@zope.org Subject: Re: [Zope] Zope on Python 2.1
On Fri, Apr 20, 2001 at 11:41:46AM +0200, Peter Bengtsson wrote:
Take the risk of search-replace all occurances of "regex" with "re". "regex" is a pretty "odd" word so it's unlikely to find it inside other words.
No need to. Because Zope 2.4 will require Python 2.1, Andreas Jung is already hard at work replacing all regex and ts_regex usage with re. This is not as simple as it looks; take a look at the recent acrives of Zope-Checkins starting at:
http://lists.zope.org/pipermail/zope-checkins/2001-April/author.html#5992
-- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
--__--__--
Message: 41 Date: Fri, 20 Apr 2001 11:31:49 +0100 From: seb bacon <seb@jamkit.com> To: Brian Lloyd <brian@digicool.com> Cc: zope@zope.org Subject: Re: [Zope] __basicnew__ errors
* Brian Lloyd <brian@digicool.com> [010420 00:15]:
Whenever I try to import an object from one Zope (2.3.0) to another (2.3.1) I get a
Error Type: AttributeError Error Value: __basicnew__
<snip>
Why might this be? Can anyone shed any light onto what __basicnew__ does?
__basicnew__ is a rather low-level initialization method in ExtensionClass... I've never seen this before though :(
And has anyone any pointers to understanding these pickled traceback things? Whenever they occur, I find it's usually due to inconsistencies between the pickled product-related info and the products loaded from the filesystem, but I don't know how to go about debugging it.
There is definitely some problem unpickling one or more of the objects stored in the db (the junk in the traceback is the actual pickle string), but I don't have a quick answer for you on the cause here. Is it possible that you forgot to copy over a (filesystem) product that defines a base class or something used by these instances?
Yes, it was something like that. The problem went away when I resynched the Products directories between the two installs, so there must have been inconsistencies between Product version. Personally I suspect different versions of ZPatterns.
This broken product problem occurs frequently on the lists. I've never looked at the unpickling / db loading code, but I wonder if there's a way of better identifying broken products at startup time? Or is there a bootstrapping issue which makes this impossible?
cheers,
seb
--__--__--
Message: 42 From: bak (kedai) <kedai@kedai.com.my> To: zope@zope.org Date: Thu, 19 Apr 2001 18:04:56 +0800 Subject: [Zope] RFC - newbie with a zope product
hello i'm not sure whether this is a proper thing to do, but here goes
i jsut made myself a python product that grabs a page, and return a list of items; depending on a few regular expression patterns.
any kind soul could spare a few minutes to look and comment on my codes? what i missed out, what should be done, etc
http://www.kedai.com.my/dll/KebasData.tar.gz tia
p/s - no docs as yet since this is still in testing phase
--__--__--
Message: 43 Reply-To: "Stefan Mallepell" <steve@syso.ch> From: "Stefan Mallepell" <steve@syso.ch> To: "Dieter Maurer" <dieter@handshake.de> Cc: <zope@zope.org> Subject: Re: [Zope] [newbie] Property with <dtml-var> in it's value Date: Fri, 20 Apr 2001 13:41:05 +0200 Organization: SYSO GmbH
Hi Dieter
I will try this, but unfortunately I don't have any time today.
Thank you for your help. Stefan
----- Original Message ----- From: "Dieter Maurer" <dieter@handshake.de> To: "Stefan Mallepell" <steve@syso.ch> Cc: <zope@zope.org> Sent: Thursday, April 19, 2001 8:03 PM Subject: Re: [Zope] [newbie] Property with <dtml-var> in it's value
Stefan Mallepell writes:
"A" is the object-instance with a property "l" which contains 'http://www.externalserver.org' and the id 'externalserver' "B" is another object-instance with a property "c" which contains 'This is text with some links. The links to the *externalserver* can be in the middle of the text.'
In my index_html I show "c" an would like to generate a proper "a href" around *externalserver* ... You have 3 problems - all solvable:
1. locate the ranges in "c" to be replaced by "a href=..." 2. find the link for an id ("externalserver" in your example) 3. insert the links into "c"
For 1. and 3. you would use Python's "re" module (regular expressions), more precisly, the "sub" method (for "substitute"). You find documentation on "re" in the Python library documentation (--> www.python.org).
As it is not too difficult to create long running regular expressions, "re" was considered too dangerous to expose it to DTML or Python Script. Thus, you will either need an External Method or learn how to make additional modules accessible from Python Script (--> searchable mailing list archives).
If you have an "id" and you want to get the corresponding object, you can use "_.getitem(id)". Thus, if "id" contains "externalserver", then "_.getitem(id).l" will be equivalent to "externalserver.l", the "l" attribute of "externalserver". This solves 2.
Dieter
_______________________________________________ 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 )
--__--__--
Message: 44 Reply-To: "Stefan Mallepell" <steve@syso.ch> From: "Stefan Mallepell" <steve@syso.ch> To: "Luciano Ramalho" <luciano@hiper.com.br> Cc: <zope@zope.org> Subject: Re: [Zope] delete HTML Tags out of a form input Date: Fri, 20 Apr 2001 14:04:14 +0200 Organization: SYSO GmbH
Hi Luciano
Thank you! Stefan
PS.: I was reading the syntax about 10 times and it never made "klick" ... well may I should make sometimes a break ...
----- Original Message ----- From: "Luciano Ramalho" <luciano@hiper.com.br> To: "Stefan Mallepell" <steve@syso.ch> Cc: <zope@zope.org> Sent: Thursday, April 19, 2001 3:25 PM Subject: Re: [Zope] delete HTML Tags out of a form input
Stefan Mallepell wrote:
My code is: <dtml-let transtab="_.string.maketrans('><','**')"> <dtml-call "REQUEST.set('Message',_.string.translate(Message,transtab,'><'))"> </dtml-let>
The documentation for translate explains that the third argument, '><' in your case, is used to specify characters do be removed before the translation occurs. If you do like this...
"REQUEST.set('Message',_.string.translate(Message,transtab))">
...it should work.
Regards,
Luciano
_______________________________________________ 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 )
--__--__--
Message: 45 From: "Andreas Jung" <andreas@digicool.com> To: "Peter Bengtsson" <peter@grenna.net>, <phd@phd.fep.ru> Cc: "zope-list" <zope@zope.org> Subject: Re: [Zope] Zope on Python 2.1 Date: Fri, 20 Apr 2001 07:31:14 -0400
You can't switch from regex to re by just replacing regex by re. Both modules use different notations for regular expressions and have a *different* API. Stay tuned until Zope 2.4 - this will be regex/regsub free. I am currently working on this stuff.
Andreas Jung Digitial Creations ----- Original Message ----- From: "Peter Bengtsson" <peter@grenna.net> To: <phd@phd.fep.ru> Cc: <zope@zope.org> Sent: Friday, April 20, 2001 5:41 AM Subject: RE: [Zope] Zope on Python 2.1
Take the risk of search-replace all occurances of "regex" with "re". "regex" is a pretty "odd" word so it's unlikely to find it inside other words. Let us know if that worked.
-----Message d'origine----- De : zope-admin@zope.org [mailto:zope-admin@zope.org]De la part de Oleg Broytmann Envoye : vendredi 20 avril 2001 11:14 A : Zope Mailing List Objet : [Zope] Zope on Python 2.1
Hello!
I did a quick test on how Zope would run on Python 2.1. I didn't do extensive tests, but at first glance it works without a problem. I've got some deprecation warnings:
/usr/local/Zope/ZServer/medusa/asynchat.py:293: DeprecationWarning: the regex module is deprecated; please use the re module import regex /usr/local/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module is deprecated; please use re.sub() DeprecationWarning) /usr/local/Zope/ZServer/medusa/asynchat.py:293: DeprecationWarning: the regex module is deprecated; please use the re module import regex /usr/local/lib/python2.1/regsub.py:15: DeprecationWarning: the regsub module is deprecated; please use re.sub() DeprecationWarning)
Oleg. ---- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
_______________________________________________ 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
End of Zope Digest
Hello, Please notice:
When replying, please edit your Subject line so it is more specific than "Re: Contents of Zope digest..."
Also: Please only include relevant information in posts. An excess of information results in a comlete disregard of your post. This is especially important if you receive/respond to the mailing list in digested mode. Regards, Jake -- Jake Berglund <jwb@imeme.net> Online Community Building http://imeme.net - Affordable Dynamic Webhosting http://nconsequential.org - modern audio architecture
participants (2)
-
Axel Blass -
Jake Berglund