Re: [Zope-dev] [Zope 2.10] ZPT going Unicode
--On 5. Januar 2006 21:12:08 +0100 Dieter Maurer [EMAIL PROTECTED] - allowing only unicode textual content when calling macros, PyScript etc. definitely not. I know that this is a hard requirement but it is an implicit requirement in Zope 3. - converting non-unicode to unicode inside the TAL code using some encoding. The encoding could be specified as property of the called method (function properties) or object. Using a site encoding would probably be the best way (as done by e.g. Plone and Archetypes). Most sites use in fact a fixed encoding most of the time. At the places where a different encoding is used, it can be employed explicitely to convert to unicode. A site encoding as default makes sense however there are situations when the encoding of a string from is different. E.g. when you deal with XMLHTTPRequest the browser expects an utf8 fragment which might conflict with an iso-8859-15 site-encoding. So there should be some mechanism to specify the encoding. For PyScript one could introduce a property to specify the encoding and methods of products I can imagine using function properties..and this is possibly something some must be solved on the TAL level. As pointed out in private email (charset negociation will not work), the response charset has a significant impact on the charset used in form data sent back to the server. This may pose severe problems when the response charset is not the same as the site encoding (for textual form data). This issue is connected to the ongoing/planned project to use the Z3 publisher in Zope 2.10. There will be a sprint at PyCon next month afaik... -aj pgpvYpjpK6486.pgp Description: PGP signature ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] [Zope 2.10] ZPT going Unicode
Hello. - the ZMI screens for ZPTs use a _fixed_ UTF-8 encoding (is this also fine for asian users?) This is fine for me, as one of asian user. - The ZPublisher will convert a 'unicode' ZPT using default_zpublisher_encoding (zope.conf) to a byte stream. The current encoding is iso-8859-15. I think it would make sense to change it to utf8. Otherwise we must explicitly set the content-type with charset=utf8 set. Thoughts? I've tried to the branch and I found a typo in zope.conf. I think default-zpublisher-encoding is a correct directive name. By the way, I have a request related to this changes. If the rootfolder has `management_page_charset` property as default, this will very convenient for me. Because I can use japanese in ZMI without some setup things. Is this possible? -- TAHARA Yusei [EMAIL PROTECTED] ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] [Zope 2.10] ZPT going Unicode
--On 6. Januar 2006 19:55:56 +0900 TAHARA Yusei [EMAIL PROTECTED] wrote: I've tried to the branch and I found a typo in zope.conf. I think default-zpublisher-encoding is a correct directive name. This is already fixed. By the way, I have a request related to this changes. If the rootfolder has `management_page_charset` property as default, this will very convenient for me. Because I can use japanese in ZMI without some setup things. Is this possible? This whole management_page_charset is some kind of hack. I also had some trouble getting the ZMI for ZPT to use UTF-8 (which another hack). The current ZMI screen call zpt/read which returns a unicode string (to be presented within the edit textarea). I don't know if any further conversions have to be performed when using japanese in the ZMI...please try yourself (ptEdit.pt). -aj pgp47jFSkCKRt.pgp Description: PGP signature ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Zope tests: 8 OK
Summary of messages to the zope-tests list. Period Thu Jan 5 12:01:01 2006 UTC to Fri Jan 6 12:01:01 2006 UTC. There were 8 messages: 8 from Zope Unit Tests. Tests passed OK --- Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux From: Zope Unit Tests Date: Thu Jan 5 21:03:47 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-January/003938.html Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Thu Jan 5 21:05:18 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-January/003939.html Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Thu Jan 5 21:06:49 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-January/003940.html Subject: OK : Zope-2_7-branch Python-2.4.2 : Linux From: Zope Unit Tests Date: Thu Jan 5 21:08:19 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-January/003941.html Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Thu Jan 5 21:09:49 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-January/003942.html Subject: OK : Zope-2_8-branch Python-2.4.2 : Linux From: Zope Unit Tests Date: Thu Jan 5 21:11:19 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-January/003943.html Subject: OK : Zope-2_9-branch Python-2.4.2 : Linux From: Zope Unit Tests Date: Thu Jan 5 21:12:49 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-January/003944.html Subject: OK : Zope-trunk Python-2.4.2 : Linux From: Zope Unit Tests Date: Thu Jan 5 21:14:19 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-January/003945.html ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Zope 2.10] ZPT going Unicode
Dieter Maurer wrote: I'd rather have a one-time update method that trawls the database, like is done for Python Scripts recompiling for instance. Or I can call it myself in my upgrade procedures on the exact objects I know will need updates. I've implemented the setstate() variant as proof-of-concept. I am not sure if there is overhead for CMF-based sites since they FSPageTemplates inherit from PageTemplateFile which has nothing in mind with persistence. So only persistent ZopePageTemplate would be affected. If there is need for a dedicated migration we could easily write one..that's the lamest task of the whole ZPT unicode issue :-) Modern ZODB versions allow modifications made in __setstate__ to be reliably persisted. This means that __setstate__ updates can now be one time (though the test whether an upgrade is necessary is done always). The recompile hack for PythonScripts would no longer be necessary. I know but that means you have backward compatibility cruft that stays there forever. And no good way to tell the administrators how to upgrade before a given date. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: SVN: Zope/branches/2.9/ Move to ZODB 3.6 final.
Hi, Why not use the tag you just made? ZODB svn://svn.zope.org/repos/main/ZODB/tags/3.6.0/src/ZODB etc. (Hi have a vague feeling this may have been discussed before but I'm not sure ;)). Florent Tim Peters wrote: Log message for revision 41156: Move to ZODB 3.6 final. Changed: _U Zope/branches/2.9/doc/ _U Zope/branches/2.9/lib/python/ _U Zope/branches/2.9/utilities/ -=- Property changes on: Zope/branches/2.9/doc ___ Name: svn:externals - ZEO -r 41065 svn://svn.zope.org/repos/main/ZODB/branches/3.6/doc/ZEO + ZEO -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/doc/ZEO Property changes on: Zope/branches/2.9/lib/python ___ Name: svn:externals - ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1 BTrees -r 41065 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/BTrees persistent -r 41065 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/persistent ThreadedAsync -r 41065 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ThreadedAsync transaction-r 41065 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/transaction ZEO-r 41065 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ZEO ZODB -r 41065 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ZODB ZopeUndo -r 41065 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ZopeUndo zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon pytz -r 40992 svn://svn.zope.org/repos/main/Zope3/branches/3.2/src/pytz zodbcode -r 40992 svn://svn.zope.org/repos/main/Zope3/branches/3.2/src/zodbcode ClientCookie -r 40992 svn://svn.zope.org/repos/main/Zope3/branches/3.2/src/ClientCookie mechanize -r 40992 svn://svn.zope.org/repos/main/Zope3/branches/3.2/src/mechanize + ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1 BTrees -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/BTrees persistent -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/persistent ThreadedAsync -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ThreadedAsync transaction-r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/transaction ZEO-r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ZEO ZODB -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ZODB ZopeUndo -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ZopeUndo zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon pytz -r 40992 svn://svn.zope.org/repos/main/Zope3/branches/3.2/src/pytz zodbcode -r 40992 svn://svn.zope.org/repos/main/Zope3/branches/3.2/src/zodbcode ClientCookie -r 40992 svn://svn.zope.org/repos/main/Zope3/branches/3.2/src/ClientCookie mechanize -r 40992 svn://svn.zope.org/repos/main/Zope3/branches/3.2/src/mechanize Property changes on: Zope/branches/2.9/utilities ___ Name: svn:externals - ZODBTools -r 41065 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/scripts + ZODBTools -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/scripts ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: SVN: Zope/branches/2.9/ Move to ZODB 3.6 final.
[Florent Guillaume] Why not use the tag you just made? ZODB svn://svn.zope.org/repos/main/ZODB/tags/3.6.0/src/ZODB etc. Ask Jim ;-) (Hi have a vague feeling this may have been discussed before but I'm not sure ;)). I'm not sure it's been coherently discussed on a mailing list: - While a tag is conceptually read-only, sometimes people do make changes on tags. You can't cheat (or get screwed by someone else cheating) with -r N, though, - Updates to a different revision on the same SVN path typically go much faster, replacing only the files that have changed. When the SVN path changes (as was true when stitching in ZODB by tag), the entire project is refetched. When moving from ZODB 3.6.0b6 to 3.6.0 final, that's the difference between getting all the ZODB code again, or just getting the 3 (or so) files that changed (more files than that _did_ change in ZODB 3.6 final, but Zope doesn't include them -- the others are part of the standalone ZODB release). - When the SVN path changes, people who leave old .pyc (or other not-checked-in) files behind end up with OLD.n directories created by SVN too. Overall, I like tags better myself: - They're self-documenting. - I never leave old .pyc (etc) files around, always recompile everything, and do something else while `svn up` is running, so in all I just don't notice any of the bad aspects of using tags. - It's less error-prone to edit svn:externals to change a character or two in a mnemonically-named tag path than to replace an arbitrary-looking revision number. For example, I stitched ZODB 3.6 into 4 Zopes yesterday, doing propedit on 8 directories total. I screwed it up at first but didn't notice until after running tests, and then had to repair it and run them all over again: it turned out that the older -r 41065 wasn't unique to ZODB in all of them. s/41065/41153/g was semantically wrong, unintentionally updating some _non_-ZODB externals to rev 41553 too. If we had stuck to using tags, s/3.6.0b6/3.6.0/g would been right the first time around. So there are tradeoffs, and people won't agree on which is best overall. Jim has a strong preference for -r N, and much stronger than my will to argue about it ;-) ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: SVN: Zope/branches/2.9/ Move to ZODB 3.6 final.
Tim Peters wrote: [Florent Guillaume] Why not use the tag you just made? ZODB svn://svn.zope.org/repos/main/ZODB/tags/3.6.0/src/ZODB etc. Ask Jim ;-) I don't like using tags in externals. Each time an external is changed to a tag, svn creates .OLD directories and gets a new version. It's a real hassle IMO. I especialy don't like this on the trunk, or on a branch. I don't really mind using a tag for a release. For example, I wouldn't necessarily mind if the Zope 3.2.0 release itself was based on a tag of ZODB. But I don't think it's all that important either. What I especially don't like is forcing a release and tag of something just because we want to use it somewhere else. For example, I would hate to create a tag in zope.testing just so Zope could use a later revision. (Hi have a vague feeling this may have been discussed before but I'm not sure ;)). I'm not sure it's been coherently discussed on a mailing list: - While a tag is conceptually read-only, sometimes people do make changes on tags. You can't cheat (or get screwed by someone else cheating) with -r N, though, - Updates to a different revision on the same SVN path typically go much faster, replacing only the files that have changed. When the SVN path changes (as was true when stitching in ZODB by tag), the entire project is refetched. When moving from ZODB 3.6.0b6 to 3.6.0 final, that's the difference between getting all the ZODB code again, or just getting the 3 (or so) files that changed (more files than that _did_ change in ZODB 3.6 final, but Zope doesn't include them -- the others are part of the standalone ZODB release). - When the SVN path changes, people who leave old .pyc (or other not-checked-in) files behind end up with OLD.n directories created by SVN too. Overall, I like tags better myself: - They're self-documenting. Yes if they are real tags. I don't think adds much documentation is created soley so that something else can have a tag in an external. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: SVN: Zope/branches/2.9/ Move to ZODB 3.6 final.
--On 6. Januar 2006 10:49:29 -0500 Jim Fulton [EMAIL PROTECTED] wrote: I don't like using tags in externals. Each time an external is changed to a tag, svn creates .OLD directories and gets a new version. It's a real hassle IMO. I _like_ tags in externals because they are self-documenting. Dealing with externals where you have several different revision numbers is a PIA since you never know what version of a module is behind the revision. You always have look through the log for the referenced module...that's very time consuming. I see this as a major risk factor when working on releases. -aj pgpUVscTLgu0W.pgp Description: PGP signature ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: SVN: Zope/branches/2.9/ Move to ZODB 3.6 final.
[Andreas Jung] I _like_ tags in externals because they are self-documenting. Dealing with externals where you have several different revision numbers is a PIA since you never know what version of a module is behind the revision. You always have look through the log for the referenced module...that's very time consuming. I see this as a major risk factor when working on releases. If you want the tag style for ZODB in Zope 2.9 and Zope trunk, I doubt anyone would yell at you if you changed them to use the ZODB 3.6 tag instead (pieces of ZODB are stitched in under lib/python/, doc/, and utilities/ in Zope 2, so that requires propedit'ing 3 directories). Because ZODB has its own advertised version number (ZODB.__version__, ZEO.version, and src/ZEO/version.txt), I always make a new tag for a new ZODB release (whether internal or external). ZODB isn't like, e.g., zope.testing in that way (and I understand why Jim would think it a pain to make a new tag of zope.testing for every little change there). ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] buildbot failure in Zope trunk 2.4 Linux zc-buildbot
The Buildbot has detected a failed build of Zope trunk 2.4 Linux zc-buildbot. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 2617 Blamelist: andreasjung,anguenot,efge,jim BUILD FAILED: failed test sincerely, -The Buildbot ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] buildbot failure in Zope trunk 2.4 Windows 2000 zc-bbwin6
The Buildbot has detected a failed build of Zope trunk 2.4 Windows 2000 zc-bbwin6. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 2617 Blamelist: andreasjung,anguenot,efge,jim BUILD FAILED: failed failed slave lost sincerely, -The Buildbot ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] [Zope 2.10] ZPT going Unicode
Andreas Jung wrote at 2006-1-6 10:13 +0100: ... A site encoding as default makes sense however there are situations when the encoding of a string from is different. E.g. when you deal with XMLHTTPRequest the browser expects an utf8 fragment which might conflict with an iso-8859-15 site-encoding. So there should be some mechanism to specify the encoding. For PyScript one could introduce a property to specify the encoding and methods of products I can imagine using function properties..and this is possibly something some must be solved on the TAL level. I do not like this idea: If I need to modify individual objects (such as Python Scripts), rather than fiddling with properties, I can simply modify the script to return Unicode. I do not think that we need additional special features beside support for some kind of site encoding. As pointed out in private email (charset negociation will not work), the response charset has a significant impact on the charset used in form data sent back to the server. This may pose severe problems when the response charset is not the same as the site encoding (for textual form data). This issue is connected to the ongoing/planned project to use the Z3 publisher in Zope 2.10. There will be a sprint at PyCon next month afaik... I do not see that the problem is related to any specific publisher. Instead, it is a conceptual problem: When form data comes back, the server *MUST* know the encoding used by the client. For POST, the encoding is hopefully specified in the Content-Type request header, but for GET there is almost surely no information available: the server must assume that the client used the same charset as the page it replied to. However, the server does not have this information if it uses charset negotiation. -- Dieter ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope] Re: Java vs Zope
Rocky Burt wrote: David H wrote: Python is also object oriented. In python, x = 10 creates an object not a simple type - if I recall the same is true in Java. In fact this is not quite right. In java, int x = 10 produces a primitive type. Not a class instance at all. In this case x has no methods which can be invoked whatsoever. This is something I always despised about Java. Java does have an Integer class but that is generally only used when an object is absolutely required (which is not often). Java 1.5 did introduce autoboxing on primitive types so that int's and Integer instances could be interchanged without knowing in method calls, etc ... but x is still not an object with methods. In fact I'd go as far as to say that Python seems *more* object-oriented than Java. s/seems/is/ Java is more class-oriented than object-oriented. It forces you to use classes for everything, but not everything is an object. Python let you use the paradigm that seems appropriate for the task at hand, but still everything is an object (really everything : functions, classes and modules too...) -- bruno desthuilliers développeur [EMAIL PROTECTED] http://www.modulix.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Java vs Zope
Well, the class is simply a construct that Java uses to define an object. Also, the concept of object is well defined in Java which makes it easier for the programmer to know what can and cannot be done. In Python, it is not as explicit. Java is a programming language and hence cannot be compared directly to a scripting language such as Python or PHP. These 2 types are designed for different purposes. - Asad On Fri, 6 Jan 2006, bruno desthuilliers wrote: Rocky Burt wrote: David H wrote: Python is also object oriented. In python, x = 10 creates an object not a simple type - if I recall the same is true in Java. In fact this is not quite right. In java, int x = 10 produces a primitive type. Not a class instance at all. In this case x has no methods which can be invoked whatsoever. This is something I always despised about Java. Java does have an Integer class but that is generally only used when an object is absolutely required (which is not often). Java 1.5 did introduce autoboxing on primitive types so that int's and Integer instances could be interchanged without knowing in method calls, etc ... but x is still not an object with methods. In fact I'd go as far as to say that Python seems *more* object-oriented than Java. s/seems/is/ Java is more class-oriented than object-oriented. It forces you to use classes for everything, but not everything is an object. Python let you use the paradigm that seems appropriate for the task at hand, but still everything is an object (really everything : functions, classes and modules too...) -- bruno desthuilliers développeur [EMAIL PROTECTED] http://www.modulix.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: dynamically creating zip file, returning to user
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tino Wildenhain wrote: John Toews schrieb: Thanks Tino, I'll definately give that a try too. The quick fix seemed to be opening the file for read in binary mode... that should have been obvious. Posting another dumb question to the list now. ;) no, dot use a regular file! Use the tempfile module! And dont reopen but seek to the start - f.seek(0) You just open it for rw. Don't forget the 'b' when doing zipfiles! Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDvoj3+gerLs4ltQ4RAvpXAJ0Zcs5oTulmzdEwPnJ4nRoe/v8DyACePGum N0GbYQ63ky/MKtrSNHa1LA0= =OIXo -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Java vs Zope
--On 6. Januar 2006 10:06:55 -0500 Asad Habib [EMAIL PROTECTED] wrote: Well, the class is simply a construct that Java uses to define an object. Also, the concept of object is well defined in Java which makes it easier for the programmer to know what can and cannot be done. In Python, it is not as explicit. Java is a programming language and hence cannot be compared directly to a scripting language such as Python or PHP. These 2 types are designed for different purposes. Python is not a programming language??? huh..the difference is that Java is compiled and Python is interpreted. I agree that PHP is not a programming language but just a weird mixture of HTML and _something_ programming-language-like :-) -aj pgpoE7bogTbXV.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Java vs Zope
On 1/6/06, Andreas Jung [EMAIL PROTECTED] wrote: Python is not a programming language??? huh..the difference is that Java is compiled and Python is interpreted *Bt* Wrong again. :) Both Java and Python compile to bytecode, which a virtual machine then interprets. In Java this step is explicit, Python does the compilation on the fly on first import. The distinction between 'scripting' and 'programming' language is arbitrary and a marketing, what-can-you-use-the-language-for label. Java is hardly suited for scripting tasks, while Python scales from scripting all the way up to enterprise applications (another marketing label). I prefer the term 'Agile language'. This is going to deteriorate into a language flamewar soon, so let's look at a good Monty Python film instead. I recommend Life of Brian. -- Martijn Pieters ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Java vs Zope
--On 6. Januar 2006 16:39:18 +0100 Martijn Pieters [EMAIL PROTECTED] wrote: On 1/6/06, Andreas Jung [EMAIL PROTECTED] wrote: Python is not a programming language??? huh..the difference is that Java is compiled and Python is interpreted *Bt* Wrong again. :) Hairsplitter :-) -aj pgpkOhBnORLeQ.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Java vs Zope
On 1/6/06, Andreas Jung [EMAIL PROTECTED] wrote: Hairsplitter :-) That's *Mr* __Pedant__ to you, capiche? :P -- Martijn Pieters ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Java vs Zope
On 1/6/06, Asad Habib [EMAIL PROTECTED] wrote: Well, the class is simply a construct that Java uses to define an object. Also, the concept of object is well defined in Java which makes it easier for the programmer to know what can and cannot be done. In Python, it is not as explicit. Java is a programming language and hence cannot be compared directly to a scripting language such as Python or PHP. These 2 types are designed for different purposes. The difference between scripting languages and programming languages are an illusion. :) Python is intepreted while Java is compiled. That makes Python superiour in many ways. ;-) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Java vs Zope
Andreas Jung wrote: --On 6. Januar 2006 10:06:55 -0500 Asad Habib [EMAIL PROTECTED] wrote: Well, the class is simply a construct that Java uses to define an object. Also, the concept of object is well defined in Java which makes it easier for the programmer to know what can and cannot be done. In Python, it is not as explicit. Java is a programming language and hence cannot be compared directly to a scripting language such as Python or PHP. These 2 types are designed for different purposes. Python is not a programming language??? huh..the difference is that Java is compiled and Python is interpreted. Not even - Python is byte-compiled too. The difference is that the Python interpreter (call it 'VM' if you think that 'interpreter' isn't buzzword-compliant enough) is smart enough to take care of the compilation phase by itself. -- bruno desthuilliers développeur [EMAIL PROTECTED] http://www.modulix.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Java vs Zope
On 1/6/06, Lennart Regebro [EMAIL PROTECTED] wrote: Python is intepreted while Java is compiled. That makes Python superiour in many ways. ;-) pedant mode=ranting Python is compiled, then interpreted. Java is compiled, then interpreted. Java compilation is explicit, Python compilation implicit. The differences that make Python vastly superiour lie elsewhere. Educate yerselves, fer Chris'' sake! /pedant We now return you to our regelar program. -- Martijn Pieters ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Java vs Zope
Actually, that's not true. Languages such as Perl and Python were designed to write scripts, not to code entire applications. Python is an exception because it can be successfully used to code large applications, unlike some other scripting languages. So it's best to call Python a scripting programming language because it has this dual nature. All said and done, I prefer to use Java over Python for large applications simply because it's cleaner and has mechanisms in place that support reusability of components and extensibility. Also, OO concepts such as abstraction and inheritance are well defined in Java. Also, both compiled and interpreted languages have their advantages and disadvantages. - Asad On Fri, 6 Jan 2006, Lennart Regebro wrote: On 1/6/06, Asad Habib [EMAIL PROTECTED] wrote: Well, the class is simply a construct that Java uses to define an object. Also, the concept of object is well defined in Java which makes it easier for the programmer to know what can and cannot be done. In Python, it is not as explicit. Java is a programming language and hence cannot be compared directly to a scripting language such as Python or PHP. These 2 types are designed for different purposes. The difference between scripting languages and programming languages are an illusion. :) Python is intepreted while Java is compiled. That makes Python superiour in many ways. ;-) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Java vs Zope
Here is a document that explains why scripting languages are better than system programming languages (like C, C++, Java) for creating large scale applications, for gluing components together, thanks to weak typing: http://home.pacbell.net/ouster/scripting.html this too might be interesting to look at. http://www.ferg.org/projects/python_java_side-by-side.html PS: there's nothing negative in the term scripting language. /JM ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Java vs Zope
Asad Habib wrote: (top-post corrected) On Fri, 6 Jan 2006, bruno desthuilliers wrote: Asad Habib wrote: (top-post corrected) On Fri, 6 Jan 2006, bruno desthuilliers wrote: Rocky Burt wrote: (snip) In fact I'd go as far as to say that Python seems *more* object-oriented than Java. s/seems/is/ Java is more class-oriented than object-oriented. It forces you to use classes for everything, but not everything is an object. Python let you use the paradigm that seems appropriate for the task at hand, but still everything is an object (really everything : functions, classes and modules too...) Well, the class is simply a construct that Java uses to define an object. Also, the concept of object is well defined in Java which makes it easier for the programmer to know what can and cannot be done. In Python, it is not as explicit. Ho, really ? Chapter and verse, please ? Java is a programming language and hence cannot be compared directly to a scripting language such as Python Lol. or PHP. These 2 types are designed for different purposes. Learn Python, learn about it's object model, learn about it's execution model, and stop talking like a clueless newbie. Bruno, it's evident to me that you cannot distinguish between opinion and fact. opinions : - Java is a programming language, Python is a scripting language, - Zope is like PHP, facts : - the two main differences between Python and Java are the type system (declarative static in Java, dynamic in Python) and the fact that in Python, everything is an object (which is not true in Java) - Python is successfully used for large-scale applications - Zope is a web application server written in Python My advice to you, try thinking outside your box! Python is one of several languages being used for software development in the world today I use, did use, and will still use other languages too (including Java, which I really liked - before I discovered Python and Smalltalk). and just because I don't think it's optimal for large-scale applications (the keywork here is I, not everyone) does not mean that you have to insult me. As I said elsewhere, you have the absolute right to think what you want, prefer whichever language you prefer etc. The problem here is not that you prefer Java, it is that you present a mix of unbacked opinions and erroneous beliefs as facts. Hence my advice. BTW, please re-read it carefully: I do not say you *are* a clueless newbie - just that you actually talk like one. But you're of course free to feel insulted if you prefer... -- bruno desthuilliers développeur [EMAIL PROTECTED] http://www.modulix.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Java vs Zope
Lennart Regebro wrote: On 1/6/06, bruno desthuilliers [EMAIL PROTECTED] wrote: Not even - Python is byte-compiled too. The difference is that the Python interpreter (call it 'VM' if you think that 'interpreter' isn't buzzword-compliant enough) is smart enough to take care of the compilation phase by itself. Ah, but that's not the only difference. Of course not !-) This was only about the 'compiled-vs-interpreted' thing. -- bruno desthuilliers développeur [EMAIL PROTECTED] http://www.modulix.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Java vs Zope
On 1/6/06, bruno desthuilliers [EMAIL PROTECTED] wrote: Lennart Regebro wrote: On 1/6/06, bruno desthuilliers [EMAIL PROTECTED] wrote: Not even - Python is byte-compiled too. The difference is that the Python interpreter (call it 'VM' if you think that 'interpreter' isn't buzzword-compliant enough) is smart enough to take care of the compilation phase by itself. Ah, but that's not the only difference. Of course not !-) This was only about the 'compiled-vs-interpreted' thing. Yeah, yeah, I was trying to be pedagogical and failed. Compiled = fixed, interpreted = not fixed. If you see what I mean. Of course, thats an oversimplification bordering on the incorrect, and there are better ways to describe it, so as usual, I should be ignored. It is indeed the dynamic typing, and the fact that everything is handled by reference (more than that everything is an object, although that's true as well) that I was aiming at. This means that you can just replace the reference to one method with the reference to another method, and do the same with everything else. Careful use of this seriously cuts down development time, by for example letting you fix Zope bugs without waiting for a new release. I think it is these things people tend to see as scripting or interpreted language features as opposed to compiled or real languages. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] migrating a zodb
David Bear wrote at 2006-1-5 15:55 -0700: I installed zope 2.7.4 from FreeBSD packages. Trouble is that I already had python 2.4 installed. It appears the package just used that version of python since zope says it is using python 2.4. I've run in to a few wierd things and would like to get a zope instance a little more reliable. I was thinking of just making a copy of my zodb file, removing the zope pkgs, then do a source install with python 2.3. Is the zodb file plug and play transferrable? Can I just copy the zodb into the a new zope instance and go? Try it. It probably will work but in general you cannot expect backward compatibility: A ZODB storage file contains Python pickles. While Python tries hard that newer Python versions understand pickles written by older versions, sometime new Python versions get addtional pickle codes not understood by older Python versions. In such cases, the older Python version may not understand pickles written by the newer version. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Cookie Crumbler
Infor Gates wrote at 2006-1-5 14:11 -0800: Yes, after reading the source code. However, my problem as I found out is that I do not know how to access the methods in CC from DTML. I am not well verse with Python (still learning though). Please, read my messages carefully! As CookieCrumbler.logout performs a redirect, it is usually better not to call logout from a DTML method but activate it via an URL (e.g. via a logout link or a redirect). However, you can call the CookieCrumbler methods from DTML like you call any other method: dtml-call expr=your_cookie_crumber_name.logout() Note again that logout performs a redirect. You will usually not see the result of your DTML page. ... Dieter Maurer [EMAIL PROTECTED] wrote: Infor Gates wrote at 2006-1-4 20:14 -0800: I have a trying time using Cookie Crumbler 1.2 with Zope2.8.4 (windows version). I could NOT figure out how to log out a user. I have simplified to the orginal logged_out form to this: The Cookie Crumber has a logout method. You should use it for the logout (and not try to emulate it yourself). You can activate it via an URL of the form: url_to_your_cookie_crumbler/logout It will redirect to the logout_page (you can configure for your Cookie Crumbler. -- Dieter - Yahoo! Photos Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.div id=RTEContentYes, after reading the source code.nbsp; However, my problem as I found out is that I do not know how to access the methods in CC from DTML. I am not well verse with Python (still learning though).brbrThank you.brbrbiDieter Maurer lt;[EMAIL PROTECTED]gt;/i/b wrote:blockquote class=replbq style=border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; Infor Gates wrote at 2006-1-4 20:14 -0800:brgt;I have a trying time using Cookie Crumbler 1.2 with Zope2.8.4 (windows version).brgt;I could NOT figure out how to log out a user. I have simplified to the orginal logged_out form to this:brbrThe Cookie Crumber has a logout method.brYou should use it for the logout (and not try to emulate it yourself).brbrYou can activate it via an URL of the form:brbr url_to_your_cookie_crumbler/logoutbrbrIt will redirect to the logout_page (you can configure forbryour Cookie Crumbler.brbrbr-- brDieterbr/blockquotebr/divp hr size=1Yahoo! Photosbr Ring in the New Year with a href=http://us.rd.yahoo.com/mail_us/taglines/photos/*http://pa.yahoo.com/*http://us.rd.yahoo.com/mail_us/taglines/photos/evt=38087/*http://pg.photos.yahoo.com/ph//page?.file=calendar_splash.html.dir=;Photo Calendars/a. Add photos, events, holidays, whatever. -- Dieter___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Java vs Zope
Asad Habib wrote at 2006-1-6 11:27 -0500: Actually, that's not true. Languages such as Perl and Python were designed to write scripts, not to code entire applications. Python is an exception because it can be successfully used to code large applications, unlike some other scripting languages. Tcl and Perl, too, have been used to build large applications. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Java vs Zope
I was waiting for someone else to mention this and am only adding it because I haven't seen it yet. To answer you question Why wold anyone use Java? I present the following: It's not always about the technology. Outside of Fortune 1000 america we can debate the merits of differing techologies and experiment. (Example: at rezidew.net we wanted to know which would perform better for us a 486 133 or a pentium 60. We built a box and ran it in production for a month then pulled the harddrive out and plopped it into another box. Try doing that at a fortune 1000 company) Companies are now in the mode of managing risk so if they have to use an inferior system (MS Exchange) to get that exposure mitigation they are looking for, that's what they'll do. I've worked at banks that had No Open Source policies. When I pointed out that their IBM webservers were running Linux which is OpenSource they said oh well it's IBM, we have an SLA with them. When I've rebutted that they could get the same from other companies for Open Source technologies; the reply was something like what some dot-com that's going to disappear in 2 years? So it's not the bits, bytes, methods, types, references, classes, instanciation based answer you were probably looking for but it's true, at least in my experience. David Johnson wrote: Good afternoon. I am new to Zope and I am excited about its possibilities. We are an ASP and plan to use Zope to improve our development process. I see that many people use J2EE based environments. Does anyone understand why? Why would anyone use Java? What am I missing? We're ready to go forward with Zope but I fear I might be missing something. Thanks for any opinions! ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] create description when I mouse over a formulator form field???
At Friday 6/1/2006 13:45, Rhonda Shirah wrote: I would like to add a description to each of my fields in my formulator form. I would like the description to show when I mouse over the empty field on the form. Can anyone tell me how to do this? Most browsers show the 'title' attribute in a tooltip when you place the mouse over the element. No javascript needed. Just make sure you render the field's 'description' as a 'title' attribute; I'm not sure but I think this is what the default render() method does. Gabriel Genellina Softlab SRL ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problem with Zwiki mail-out
Tracy R Reed wrote: I am using Plone 2.1 and Zope 2.8.4-final, python 2.3.5, Zwiki 0.46.0 I am not having any luck getting mail-out working. The subscribe button won't appear on my zwiki and I am out of ideas as to why. Ok, with some help from d2m on IRC (thanks d2m!) I have figured this out: I have a 'Secure Mail Host' and not a 'Mail Host' or 'Maildrop Host' which are the only two things ZWiki checks for. This would seem to be a bug or at least a deficiency in ZWiki. I simply added 'Secure Mail Host' to line 600 of Mail.py in the ZWiki product and it works. I was temporarily confused and confounded by zope re-creating the Mail.pyc file containing the old code (lesson: edit your code, then remove the .pyc file, not the other way around) when I didn't expect it to but now everything works fine. Now to go back to figuring out why my workflow doesn't work... ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Cookie Crumbler
Thank you for your patience. Please do pardon my ignorance - am still at learning the learning stage.ChDieter Maurer [EMAIL PROTECTED] wrote: Infor Gates wrote at 2006-1-5 14:11 -0800:Yes, after reading the source code. However, my problem as I found out is that I do not know how to access the methods in CC from DTML. I am not well verse with Python (still learning though).Please, read my messages carefully!As "CookieCrumbler.logout" performs a redirect, it is usually betternot to call "logout" from a DTML method but activate it via an URL(e.g. via a "logout" link or a redirect).However, you can call the "CookieCrumbler" methods from DTMLlike you call any other method: Note again th at "logout" performs a redirect. You will usually notsee the result of your "DTML" page. ...Dieter Maurer <[EMAIL PROTECTED]> wrote: Infor Gates wrote at 2006-1-4 20:14 -0800:I have a trying time using Cookie Crumbler 1.2 with Zope2.8.4 (windows version).I could NOT figure out how to log out a user. I have simplified to the orginal logged_out form to this:The "Cookie Crumber" has a "logout" method.You should use it for the logout (and not try to emulate it yourself).You can activate it via an URL of the form:url_to_your_cookie_crumbler/logoutIt will redirect to the "logout_page" (you can configure foryour "Cookie Crumbler".-- Dieter -Yahoo! Photos Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.Yes, after reading the source code. However, my problem as I found out is that I do not know how to access the methods in CC from DTML. I am not well verse with Python (still learning though).Thank you.Dieter Maurer [EMAIL PROTECTED] wrote: Infor Gates wrote at 2006-1-4 20:14 -0800:I have a trying time using Cookie Crumbler 1.2 with Zope2.8.4 (windows version).I could NOT figure out how to log out a user. I have simplified to the orginal logged_out form to this:The "Cookie Crumber" has a "logout" method.You should use it for the logout (and not try to emulate it yourself).You can activate it via an URL of the form:url_to_your_cookie_crumbler/logoutIt will redirect to the "logout_page" (you can config ure foryour "Cookie Crumbler".-- Dieter Yahoo! Photos Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.-- Dieter Yahoo! DSL Something to write home about. Just $16.99/mo. or less___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Cookie Crumbler
Dieter Maurer wrote: Infor Gates wrote at 2006-1-4 20:14 -0800: I have a trying time using Cookie Crumbler 1.2 with Zope2.8.4 (windows version). I could NOT figure out how to log out a user. I have simplified to the orginal logged_out form to this: The "Cookie Crumber" has a "logout" method. You should use it for the logout (and not try to emulate it yourself). You can activate it via an URL of the form: url_to_your_cookie_crumbler/logout It will redirect to the "logout_page" (you can configure for your "Cookie Crumbler". Infor, you can also do it with a python script like so: (I make a python script into index_html and use it as a request clearing house): if request.get('action_type') == 'LOGOUT': context.cookie_authentication.logout() I guess you can translate this into DTML with something like: dtml-call "cookie_authentication.logout()" David ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope-DB] User Authentication
Hello Everyone, I need help in configuring user authentication for a folder in Zope using MySQL database. I spent many hours reading and searching for the answer but I con not reach a successful outcome. Here is what I did so far: - the folder that needs to be protected is "Root Folder\domains\mydomain" - I added a "MySQL_database_connection (Z MySQL Database Connection). The "Status" tab says the connection is open. - I added an "acl_users" (Extensible User Folder). - the "parameters" tab is set to "cookie-based authentication" - the "Authentication Source" tab shows Database Connection set to "MySQL_database_connection Table Name set to "webusers" Username Column set to "user_login" Password Column set to "user_pass" Roles Column set to "user_roles" - the "Properties Source" tab shows Database Connection set to "MySQL_database_connection" - the "Membership Source" tab shows (I list only some of the entries here): Mail Host set to "MialHost" Site Base set to "http://my.ip.address:8080/domains/mydomain"Relative Path (from base) of Login Page set to "LoginForm"Relative Path (from base) of Signup Page set to "SignupForm"Relative Path (from base) of Change Password Page set to "ChangPasswordForm"After login set to "Go to intended destination"Default Roles has nothing selected - the "Groups Source" is blank - the "Security" tab shows all set to "Aquire" - the "Contents" tab has a list of DTML and folders (too long to enter them here) - I added an "index_html" DTML method - I inserted a row in the database with the following data "user_login=admin" "user_pass=schi" "user_roles=administrator" (I used phpMyAdmin for this since I did not know how to do it in Zope) When I call in a browser http://my.ip.address:8080/domains/mydomain the above "index_html" is displayed When I change on the "Security" tab ofthe "index_html" method, the "View" permission from "Acquire" to "Authenticated" I do receive the "Login Required" page from domains/mydomain/acl_users and the "Contents" tab, DTML method called "docLogin (Login Page)". If I enter the user name as "caladmin" and its password "schi" and click the OK button ...the login page comes back over and over again. No error messages are displayed. What am I doing wrong and how can I makeit work? Please help. Thank you. Laurentiu ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db