Re: [Zope] Multiple zope instances using the same storage
Dieter Maurer wrote: Mark Gibson wrote at 2008-12-6 11:22 -0700: I have an unusual setup. I have 4 distinct Zope instances (4 seperate Data.fs'). Each Data.fs is identical - Data is kept in a RDBMS. I have a product I need to install that stores data in the ZODB. This data is stored in one folder. Now, I *think* I can simply mount this folder in each ZODB and serve the storage through a ZEO server - however I've never done this setup, so I want to make sure this makes sense and I'm not overlooking potential problems. This should be possible -- though I expect that you can use a single Data.fs, serve it with ZEO and mount it in each of your Zope instances. There is little reason to have 4 identical Data.fs once you have decided to use ZEO anywhere. Thanks Dieter. I agree with you. This isn't my setup, so I would like to avoid having too much of an impact on their setup, but I'll bring it up with the client. Mark ___ 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] Multiple zope instances using the same storage
I have an unusual setup. I have 4 distinct Zope instances (4 seperate Data.fs'). Each Data.fs is identical - Data is kept in a RDBMS. I have a product I need to install that stores data in the ZODB. This data is stored in one folder. Now, I *think* I can simply mount this folder in each ZODB and serve the storage through a ZEO server - however I've never done this setup, so I want to make sure this makes sense and I'm not overlooking potential problems. This is a legacy setup that I'm not responsible for, so I'm trying to keep my footprint in this setup as small as possible. Using Zope 2.7.9. Thanks, Mark ___ 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] Five and editform
Hi JeanMichel, thanks for our reply. This is not an egg - just a simple product I have in instance_home/lib/python. I'm working with Zope 2.9.7, not a buildout environment. I get the Boring product in the Add dropdown, and I can create the object. I do have the product included in site.zcml, and it does implement the IBoring interface. Any other ideas? I read somewhere that I have to include this: five:traversable class=.boring.Boring / And read somewhere else that five:traversable is deprecated. In any case, including or not including this makes no difference. Thanks, Mark JeanMichel FRANCOIS wrote: Hi Mark Gibson, Do you develop this with egg ? throw Products namespace ? The zcml seems good. If you develop outside of the Products namespace don't forget to include your package in the site.zcml. You can verify this by making a mistake in the zcml and try to start zope. Does you content implements boring.interfaces.IBoring ? -- JeanMichel FRANCOIS Makina Corpus Le Friday 17 October 2008 05:51:34 Mark Gibson, vous avez écrit : I created a simple content type. I can create an object, but I can't call my view or edit form on it. If I try object/boring_editform or object/index.html I get a Not Found error. Here's what I have in my configure.zcml: --- browser:editform schema=boring.interfaces.IBoring for=boring.interfaces.IBoring name=boring_editform label=Edit Boring Folder permission=boring.ManageBoring / browser:page for=boring.interfaces.IBoring name=index.html template=view.pt permission=zope2.View menu=zmi_views title=View /browser:page --- What am I missing? Thanks, Mark ___ 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 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] Five pointers
I'm developing a new product for a Zope 2.9.7 site (no CMF). I'd like to use Zope 3 technologies for this product. I've been looking around for a few days, most of what I see describes development for Zope 3, or Five in the context of Plone. Is there a tutorial or a product I can reference that describes how to build a few simple content types the Zope 3 way in Zope 2? ___ 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] Five and editform
I created a simple content type. I can create an object, but I can't call my view or edit form on it. If I try object/boring_editform or object/index.html I get a Not Found error. Here's what I have in my configure.zcml: --- browser:editform schema=boring.interfaces.IBoring for=boring.interfaces.IBoring name=boring_editform label=Edit Boring Folder permission=boring.ManageBoring / browser:page for=boring.interfaces.IBoring name=index.html template=view.pt permission=zope2.View menu=zmi_views title=View /browser:page --- What am I missing? Thanks, Mark ___ 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] ZServer error
(Zope 2.8.7-final, python 2.4.3, linux2) I see the following error in my event.log a couple of times a day: 2006-10-02T07:13:00 ERROR ZServer uncaptured python exception, closing channel ZServer.HTTPServer.zhttp_channel connected 10.0.20.6:51398 at -0x68ce9834 channel#: 1517 requests: (socket.error:(104, 'Connection reset by peer') [/usr/lib/python2.4/asynchat.py|initiate_send|219] [/usr/local/zope/Zope-2.8.7/lib/python/ZServer/medusa/http_server.py|send|417] [/usr/lib/python2.4/asyncore.py|send|332]) Anyone familiar with this? Thanks, Mark ___ 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] ZServer error
Great, Thanks! Mark Pascal Peregrina wrote: As far as I know, this means that the requester closed the connection (like a browser timing out, etc...). In general, I would say, nothing to worry about... Pascal De : Mark Gibson [EMAIL PROTECTED] Date : Mon, 02 Oct 2006 11:58:31 -0600 À : zope@zope.org Objet : [Zope] ZServer error (Zope 2.8.7-final, python 2.4.3, linux2) I see the following error in my event.log a couple of times a day: 2006-10-02T07:13:00 ERROR ZServer uncaptured python exception, closing channel ZServer.HTTPServer.zhttp_channel connected 10.0.20.6:51398 at -0x68ce9834 channel#: 1517 requests: (socket.error:(104, 'Connection reset by peer') [/usr/lib/python2.4/asynchat.py|initiate_send|219] [/usr/local/zope/Zope-2.8.7/lib/python/ZServer/medusa/http_server.py|send|417] [/usr/lib/python2.4/asyncore.py|send|332]) Anyone familiar with this? Thanks, Mark ___ 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 ) ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.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] Packing Data.fs
I know zope makes a copy of Data.fs before packing. Is it possible to specify a location other than zope/var to place that copy? Mark ___ 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] Basic Template question : 'truthiness'
I thought I knew how this stuff worked, but this has gotten me banging my head against a wall. I'm trying to evaluate a condition expression, and I'm not getting what I expect when using path, and I get a different result when using python. The following expressions results=span tal:content=results /br / dosearch=span tal:content=request/dosearch | string:NO SEARCH /br / querytpe=span tal:content=request/querytype | string:NO QUERYTYPE /br / !-- test with python: this gives me what I expect -- div tal:condition=python:len(results) or request.get('dosearch',None) or request.get('querytype',None)TRUE IN PYTHON/div -- This doesn't evaluate to true -- div tal:condition=results | request/dosearch | request/querytype | nothingTHIS DOESN'T SHOW UP/div Produces: results=[] dosearch=NO SEARCH querytpe=mps TRUE IN PYTHON As you can see, the second expression doesn't evaluate to True. Can someone explain the subtleties I seem to be missing? Thanks, Mark ___ 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] ZCatalog Strategy
I'm struggling to weigh the cost of getObject() vs. the cost of adding more metadata to the catalog. I'll explain my situation. I have 10,000 widgets cataloged. I do a path and date query that returns me maybe 12 of these. Then I have a choice of calling getObject().getData() on each of these, or I could add getData to the catalog metadata. Does the cost of calling getObject() for a dozen objects justify creating a new metadata field? More generally how does a large amount of metadata in the catalog affect performance of queries? The wisdom of those more knowledgeable than me would be appreciated. Mark ___ 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] Render a string as tal
On Mon, 2005-11-14 at 13:38, Paul Winkler wrote: On Mon, Nov 14, 2005 at 01:19:18PM -0700, Mark Gibson wrote: I would like to be able to render an arbitrary string as tal, having the tal statements evaluated correctly. How would I go about doing this? I assume you mean TALES expressions. See: http://zopelabs.com/cookbook/1037762730 Thanks for your suggestion. This has shed some light on the subject. However, what I'm looking for is being able to take a string such as 'div tal:content=here/absolute_urlThe url/div' and be able to evaluate the TALES expression in the string to produced something like: 'divhttp://mydomain.com/theUrl/div' Any chance there's a recipe for this? -- Mark Gibson [EMAIL PROTECTED] ___ 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] Render a string as tal
I would like to be able to render an arbitrary string as tal, having the tal statements evaluated correctly. How would I go about doing this? -- Mark Gibson [EMAIL PROTECTED] ___ 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] fine grained, dynamic permissions based on attribute values
On Tue, 2005-10-18 at 11:05, Chris Crownhart wrote: Good day, I am wondering if/how I could control the permissions on an object based on the value of an attribute. I am using CMF, and thus portal_catalog, and have built a custom content type. My type has a category field. I would like to control the view permission of the object dynamically based on the value of category. So, as an example, I have multiple users, and multiple values for the category field. I would like User A to access the object if the category ='financial', and User B access the object if the category='other'. Thanks for any ideas. I assume user A and B have different roles? Instead of dynamically controlling the permission, could you set the permission on the object explicitly when the object is edited? e.g. def manage_edit(self, ...): ... if REQUEST.get('category') == 'other': self.set_permission_so_user_B_can_access() elif REQUEST.get('category') == 'financial': self.set_permission_so_user_A_can_access() ___ 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] DateTime and TimeZone
It seems that since the Pacific timezone is in daylight savings time, the correct offset is -7. So nevermind. On Tue, 2005-09-06 at 00:53, Mark Gibson wrote: I installed zope 2.7.6 on a windows 2000 machine. This machine is set to the pacific timezone. When I run python from the command line, and check DateTime, I get: from DateTime import DateTime DateTime() DateTime('2005/09/06 23:55:29.620 GMT-7') The 'GMT-7' is the Mountain timezone. The actual time should read DateTime('2005/09/06 23:55:29.620 GMT-8') for the Pacific timezone. What controls the default timezone behavior of DateTime on Windows? How can I get this working correctly? Thanks, Mark -- Mark Gibson [EMAIL PROTECTED] ___ 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] Help me with acquisition and custom types
I've got a problem... I've created two objects, A folderish object called myfolder, and a document-type object called mydocument. Here's how my classes are defined... class mydocument( CatalogAware, Implicit, Persistent, RoleManager, PropertyManager, Item): class myfolder( CatalogAware, Implicit, Persistent, RoleManager, PropertyManager, Folder) So, say I have a hierarchy like this... / /ObjectA /folder /folder/mydocument ( an instance of mydocument) /folder/myfolder (an instance of myfolder) /folder/myfolder/ObjectA Ok.. I want to be able to call http://mysite/folder/mydocument/ObjectA - this works fine http://mysite/folder/myfolder/ObjectA - this works fine http://mysite/folder/myfolder/mydocument/ObjectA - this returns the ObjectA at '/ObjectA', I'd like it to return ObjectA at '/folder/myfolder/ObjectA' Any ideas how I would go about making this happen? -- Mark Gibson [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] 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-dev] Zope 2.2.2 bug
I hope zope-dev is the right list to post this - I'm runining zope 2.2.2 on linux with python 1.5.2 Here's the set-up. I create a python class to act as a base class for a ZClass. I create a folder in Products called bugtest. Create a python class called bugtest. create and __init__.py file to register the base class. Restart Zope, see I have a new product called bugtest. Enter the bugtest product and create a ZClass the has bugtest as a base class. Everything works fine. Edit the python file bugtest.py - type in 'import x' (import something that isn't int the PYTHONPATH). Restart Zope. The bugtest product isn't shown as broken. Open the folder and everything in the folder has the 'product' icon. Try and create a new ZClass anywhere, and it fails. This is a sneaky bug because nowhere does zope tell you where or what the problem is, and it has the side-effect that you can't create a new ZClass. Could someone confirm this? ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )