[Zope-Coders] Zope tests: 7 OK, 1 Failed
Summary of messages to the zope-tests list. Period Thu Aug 11 11:01:01 2005 UTC to Fri Aug 12 11:01:01 2005 UTC. There were 8 messages: 8 from Zope Unit Tests. Test failures - Subject: FAILED (errors=1) : Zope-2_8-branch Python-2.4.1 : Linux From: Zope Unit Tests Date: Thu Aug 11 23:31:16 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-August/002820.html Tests passed OK --- Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux From: Zope Unit Tests Date: Thu Aug 11 23:23:45 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-August/002815.html Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Thu Aug 11 23:25:16 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-August/002816.html Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Thu Aug 11 23:26:46 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-August/002817.html Subject: OK : Zope-2_7-branch Python-2.4.1 : Linux From: Zope Unit Tests Date: Thu Aug 11 23:28:16 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-August/002818.html Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Thu Aug 11 23:29:46 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-August/002819.html Subject: OK : Zope-trunk Python-2.3.5 : Linux From: Zope Unit Tests Date: Thu Aug 11 23:32:46 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-August/002821.html Subject: OK : Zope-trunk Python-2.4.1 : Linux From: Zope Unit Tests Date: Thu Aug 11 23:34:16 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-August/002822.html ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders
[Zope-dev] BTrees.Length conflict resolution
Did the conflict resolution code for BTrees.Length ever work? Because as it stands now the code will fail as it assumes that integers are passed in, instead of state dictionaries: def _p_resolveConflict(self, old, s1, s2): return s1 + s2 - old As there are no tests for this that I can see (the BTrees tests are kinda very dense), I am not too keen to go touch this, but I think this should read: def _p_resolveConflict(self, old, s1, s2): s1['value'] += s2['value'] - old['value'] return s1 Martijn Pieters, up to his armpits in conflict resolution code. signature.asc Description: OpenPGP digital 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] BTrees.Length conflict resolution
[Martijn Pieters] Did the conflict resolution code for BTrees.Length ever work? Because as it stands now the code will fail You haven't seen this fail, you're _deducing_ that it must fail, right? as it assumes that integers are passed in, instead of state dictionaries: def _p_resolveConflict(self, old, s1, s2): return s1 + s2 - old Don't overlook this other Length method: def __getstate__(self): return self.value That is, when a Length instance is asked for its state, it returns an integer. Similarly setting its state expects an integer: def __setstate__(self, v): self.value = v See: http://docs.python.org/lib/pickle-inst.html ... If a class defines both __getstate__() and __setstate__(), the state object needn't be a dictionary and these methods can do what they want. As there are no tests for this that I can see (the BTrees tests are kinda very dense), Confirmed: there are no Length tests in ZODB. I am not too keen to go touch this, Good instincts wink. but I think this should read: def _p_resolveConflict(self, old, s1, s2): s1['value'] += s2['value'] - old['value'] return s1 I expect that would blow up (TypeError: unsubscriptable object), unless you also removed Length's __getstate__ and __setstate__ methods. ___ 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: BTrees.Length conflict resolution
Tim Peters wrote: You haven't seen this fail, you're _deducing_ that it must fail, right? Deducing indeed... Don't overlook this other Length method: def __getstate__(self): return self.value That is, when a Length instance is asked for its state, it returns an integer. Similarly setting its state expects an integer: def __setstate__(self, v): self.value = v Dang. I knew I was missing something here. Thanks for putting me straight, Tim. Martijn, who has managed to extract himself from conflict resolution code today. signature.asc Description: OpenPGP digital 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] Aquisition
Date: Fri, 12 Aug 2005 10:48:44 +0400 From: Timur Izhbulatov [EMAIL PROTECTED] To: Dieter Maurer [EMAIL PROTECTED] Subject: Re: [Zope] Aquisition No, I don't forget to set the id. All objects which my product contains do have an id: # in __init__ self._setObject(add.id, add) self._setObject(search.id, search) self._setObject(conn.id, conn) WARN(add.id: %s % add.id) WARN(search.id: %s % search.id) WARN(conn.id: %s % conn.id) app.inventory.id 'inventory' app.inventory.add.id 'add' app.inventory.search.id 'search' app.inventory['db-connection'].id 'db-connection' Also I can see it in the log file: 2005-08-12T10:31:17 PROBLEM(100) Inventory add.id: add -- 2005-08-12T10:31:17 PROBLEM(100) Inventory search.id: search -- 2005-08-12T10:31:17 PROBLEM(100) Inventory conn.id: db-connection But the connection still can only be found if it's in the root folder. That's really weird. On Thu, Aug 11, 2005 at 08:25:22PM +0200, Dieter Maurer wrote: Timur Izhbulatov wrote at 2005-8-11 12:16 +0400: ... I have a simple Zope product which is an ObjectManager descendant and contains a database connection and a ZSQL method. It creates these objects during its initialisation. app.inventory Inventory instance at b7300f20 app.inventory['db-connection'] Connection instance at b724a980 app.inventory.list SQL instance at b724a8f0 Everything is OK except one thing. A problem appears when I go to the manage_main page of the ZSQL method. It can't find any database connection using the SQLConnectionsIDs function from the ${ZOPE_HOME}/lib/python/Products/ZSQLMethods/SQL.py module. The code of SQLConnectionIDs looks like this: ... for o in self.objectValues(): if (hasattr(o,'_isAnSQLConnection') and o._isAnSQLConnection and hasattr(o,'id')): Thus, a candidate SQLConnection must have an id. Now, when you create an object programmatically, it is quite easy to forget to give it an id (specifying the id in _setObject is not enough; the object itself must contain the id redundantly). -- Dieter -- Timur Izhbulatov OILspace, 26 Leninskaya sloboda, bld. 2, 2nd floor, 115280 Moscow, Russia P:+7 095 105 7245 + ext.205 F:+7 095 105 7246 E:[EMAIL PROTECTED] Building Successful Supply Chains - One Solution At A Time. www.oilspace.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] FS based product and image replacement
Hi *, I'm trying to use image replacement in a FS product, but unfortunately I'm not able to catch the image on the FS (a simple gif). The image is inside 'myproduct/images', what I've tried is to create an ImageFile and use it inside the background-image directive inside the stylesheet, but also url("images/foo.gif") with and without the absolute url. How do people use image replacement in FS based products ? TIA, ngw Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3___ 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] FS based product and image replacement
Hi Nicholas. You want to put your images, templates, script pythons etc that you want to be available in a skin folder for your product. Then you make skin folder a DirectoryView as part of your product development and install so that the DirectoryView is installed with portal skins. Once you have a successful install, you can verify that your skin folder in the appropriate skin paths you want by using the Properties tab in portal skins tool. Your images, templates and scripts - whatever you have included in the skin are now available globally to your application. All you have to do is reference the image or object by its id to get a handle on it. As far as images, when you use an image in a zpt, you can look at the source and the full url is made. Here is a link to a product that illustrates how to do this for ExampleFileSystemSkin product : http://sourceforge.net/project/showfiles.php?group_id=55262package_id=99640 With stylesheets, this is dtml. You can look at the zpt stylesheets in CMF in its skin folder to get the idea of how to use the portal_url or properties from a properties sheet to create your css. Generally, you would use portal_url in conjunction with the image to give you the full image path the css that is rendered. Hope this helps. Regards, David On Friday, August 12, 2005, at 06:45 AM, Nicholas Wieland wrote: Hi *, I'm trying to use image replacement in a FS product, but unfortunately I'm not able to catch the image on the FS (a simple gif). The image is inside 'myproduct/images', what I've tried is to create an ImageFile and use it inside the background-image directive inside the stylesheet, but also url(images/foo.gif) with and without the absolute url. How do people use image replacement in FS based products ? TIA, ngw image.tiff> Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3___ 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 ) On Friday, August 12, 2005, at 06:45 AM, Nicholas Wieland wrote: Hi *, I'm trying to use image replacement in a FS product, but unfortunately I'm not able to catch the image on the FS (a simple gif). The image is inside 'myproduct/images', what I've tried is to create an ImageFile and use it inside the background-image directive inside the stylesheet, but also url(images/foo.gif) with and without the absolute url. How do people use image replacement in FS based products ? TIA, ngw image.tiff> Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3___ 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] Creating an application using zope and plone
Hi all, I am very new to zope and plone. Now I have to make a blogging kind of site with user management based on roles. I want to have different classes for different type of users. Please tell me where to find good documentation to get started. And also some pointers to similar example solutions. Regards, Saura. ___ 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] FS based product and image replacement
Well I think for plain zope there is a skinned folder (or similar named) implementation to apply the same approach except no CMF overhead. I think you could find it on zope.org or google around for it. Regards, David On Friday, August 12, 2005, at 10:13 AM, Nicholas Wieland wrote: Sorry, but I don't and can't use CMF :) It's plain Zope. I'm not interested in skins, this is an internal app, so I just have to provide a usable UI. Thanks for trying. ngw David Pratt [EMAIL PROTECTED]> ha scritto: Hi Nicholas. You want to put your images, templates, script pythons etc that you want to be available in a skin folder for your product. Then you make skin folder a DirectoryView as part of your product development and install so that the DirectoryView is installed with portal skins. Once you have a successful install, you can verify that your skin folder in the appropriate skin paths you want by using the Properties tab in portal skins tool. Your images, templates and scripts - whatever you have included in the skin are now available globally to your application. All you have to do is reference the image or object by its id to get a handle on it. As far as images, when you use an image in a zpt, you can look at the source and the full url is made. Here is a link to a product that illustrates how to do this for ExampleFileSystemSkin product : http://sourceforge.net/project/ showfiles.php?group_id=55262package_id=99640 With stylesheets, this is dtml. You can look at the zpt stylesheets in CMF in its skin folder to get the idea of how to use the portal_url or properties from a properties sheet to create your css. Generally, you would use portal_url in conjunction with the image to give you the full image path the css that is rendered. Hope this helps. Regards, David image.tiff> Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3___ 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] REQUEST.setHeader doesn't seem to work?
Have you played w/ the capitalization of content-type in your call to setHeader? - Aaron Bauman http://www.gaycenter.org -Original Message- From: Yuan HOng [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 1:57 PM To: Zope@zope.org Subject: [Zope] REQUEST.setHeader doesn't seem to work? Hi, I have a dtml file on FSDV which should return a file in text/plain format. The dtml method starts with: dtml-call expr=RESPONSE.setHeader('content-type', 'text/plain') ... some content ... However, when I use 'curl -I' to check which Content-Type header is returned, I find it is still 'text/html', despite the call to setHeader. Where could the problem lie? I am using Zope 2.7.6, with Apache configured as frontend (with rewrite enabled). Could it be caused by Apache? -- Hong Yuan 大管家网上建材超市 www.homemaster.cn ___ 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] Creating an application using zope and plone
On Fri, Aug 12, 2005 at 08:26:35PM +0530, Saura Ramachandran wrote: Hi all, I am very new to zope and plone. Now I have to make a blogging kind of site with user management based on roles. I want to have different classes for different type of users. Please tell me where to find good documentation to get started. And also some pointers to similar example solutions. Well, I'd start by taking a look a the available products section on zope.org to see if there is something available that already does what you need. Roles are built in to Zope and there are probably a couple of blogging products. As far as references, I'd start with the Zope Bible then the Zope Book. From there, the Definitive Guide to Plone is really good (it helps to understand how Zope works first). It will also be helpful to know a bit of Python, Learning Python from O'Reilly is a good book to get you started. If you haven't worked with paradigms like Zope or JSPs or ASP.Net, that's the hardest part of learning it. With Zope, everything gets pretty easy after that. -- Dave ___ 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] Creating an application using zope and plone
On Fri, Aug 12, 2005 at 08:26:35PM +0530, Saura Ramachandran wrote: Hi all, I am very new to zope and plone. Now I have to make a blogging kind of site with user management based on roles. I want to have different classes for different type of users. Please tell me where to find good documentation to get started. And also some pointers to similar example solutions. Regards, Saura. CPS, which also runs on top of Zope, comes with a Blog product (at least version CPS-3.3.4-2 does). See: http://www.cps-project.org There is also a Blog-type product for Plone at the Plone collective: http://sourceforge.net/projects/collective (you will have to search down the page a ways.) Dave -- Dave Kuhlman http://www.rexx.com/~dkuhlman ___ 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: dtml-var variable from REQUEST not shown in input tag if it has spaces??
Josef Meile wrote: Hi Thomas, When i just use it as dtml-var sSQL everything is ok. When i use it like : input type=text value=dtml-var sSQL, i get everything until the first space. For example from select * from mytable i get select. I'm not sure, but don't you need to enclose it with double quotation marks? Something like this: input type=text value=dtml-var sSQL You can also try: input type=text value=dtml-sSQL; I suspect this to be the right answer. The way to diagnose this would be to have looked at the page source itself. You would have seen something like:: input type=text value=select * from mytable From this it seems obvious why only 'select' was showing up in the rendered output. --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ Enfold Systems, LLC http://www.enfoldsystems.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] Creating an application using zope and plone
Saura Ramachandran wrote at 2005-8-12 20:26 +0530: ... Please tell me where to find good documentation to get started. And also some pointers to similar example solutions. You read: * the Zope Book (2.7 edition, online) * the Zope developper guide * one of the Plone books * browse the HowTo section on plone.org. -- 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] REQUEST.setHeader doesn't seem to work?
Yuan HOng wrote at 2005-8-12 01:57 +0800: I have a dtml file on FSDV which should return a file in text/plain format. The dtml method starts with: dtml-call expr=RESPONSE.setHeader('content-type', 'text/plain') ... some content ... We use setHeader to set the content-type to text/css -- and this works. It would be surprising when text/css would work but text/plain not. ... Where could the problem lie? Good questions. I am using Zope 2.7.6, with Apache configured as frontend (with rewrite enabled). Could it be caused by Apache? Unlikely. You can find out when you access Zope directly (avoiding Apache). It the content type then correct? -- 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] FS based product and image replacement
Nicholas Wieland wrote at 2005-8-12 11:45 +0200: The image is inside 'myproduct/images', what I've tried is to create an ImageFile and use it inside the background-image directive inside the stylesheet, but also url(images/foo.gif) with and without the absolute url. ImageFile works. You must do something wrong. What happens precisely? Exception+Traceback -- broken image (then access it and report exception+traceback). Sometimes, images are put into the misc_ section of a product. You can see an example use in Products/ZGadflyDA/__init__.py. - Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3DIVHi *,/DIV DIVI'm trying to use image replacement in a FS product, but unfortunately I'm not able to catch the image on the FS (a simple gif)./DIV Please post text/plain only messages -- if possible... -- 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: ZSyncer and Zope-2.8.0
In my, similar, situation it is:: Traceback (innermost last): Module ZPublisher.Publish, line 113, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 40, in call_object Module Products.ZSyncer.ZSyncer, line 1199, in call_ Unauthorized: You are not allowed to access 'manage_listObjects' in this context If I try Sascha's username:password@ workaround, I get:: ... File /zope1/Products/ZSyncer/ZSyncer.py, line 1050, in _getRemoteList return serverconn.manage_listObjects(path) File /zope1/Products/ZSyncer/ConnectionMgr.py, line 164, in __call__ raise IOError, msg IOError: http://user:[EMAIL PROTECTED]/zsyncer/call_: 400 - Bad Request Bad Request (Invalid Hostname) ___ 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: Creating an application using zope and plone
On Fri, 12 Aug 2005 18:37:00 +0200, Dave Kuhlman [EMAIL PROTECTED] wrote: On Fri, Aug 12, 2005 at 08:26:35PM +0530, Saura Ramachandran wrote: Hi all, I am very new to zope and plone. Now I have to make a blogging kind of site with user management based on roles. I want to have different classes for different type of users. Please tell me where to find good documentation to get started. And also some pointers to similar example solutions. There is also a Blog-type product for Plone at the Plone collective: http://sourceforge.net/projects/collective There are several blog products that work well with Plone: http://plone.org/products/by-category/weblogs -- _ Alexander Limi · Chief Architect · Plone Solutions · Norway Consulting · Training · Development · http://www.plonesolutions.com _ Plone Co-Founder · http://plone.org · Connecting Content Plone Foundation · http://plone.org/foundation · Protecting Plone ___ 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 )