[Zope] Version seems to LockOut
Maslak, Michael
mmaslak at anteon.com
Tue Dec 6 10:59:45 EST 2005
Attempting to use the Version to stop from stepping on each others' code results in a LockOut error that seems to propagate to any object the code in the version touches. For example, if the versioned object uses
<dtml-var standard_html_header>
then standard_html_header gets locked and the site becomes inaccessible.
What am I doing wrong?
-----Original Message-----
From: zope-bounces at zope.org [mailto:zope-bounces at zope.org] On Behalf Of zope-request at zope.org
Sent: Tuesday, December 06, 2005 6:02 AM
To: zope at zope.org
Subject: Zope Digest, Vol 19, Issue 8
Send Zope mailing list submissions to
zope at zope.org
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.zope.org/mailman/listinfo/zope
or, via email, send a message with subject or body 'help' to
zope-request at zope.org
You can reach the person managing the list at
zope-owner at zope.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Zope digest..."
Today's Topics:
1. Re: add multiple images to zope folder (Jonathan Cyr)
2. Adding TextIndexNG 3.1.1 error (Garth B.)
3. Re: Adding TextIndexNG 3.1.1 error (Andreas Jung)
4. Re: Adding TextIndexNG 3.1.1 error (Garth B.)
5. Re: Adding TextIndexNG 3.1.1 error (Andreas Jung)
6. Re: Adding TextIndexNG 3.1.1 error (Garth B.)
7. Re: Re: Zope Calendar (John Poltorak)
8. Accessing a Subfolder of a Parent Folder (Asad Habib)
9. Re: Accessing a Subfolder of a Parent Folder (Peter Bengtsson)
10. Re: Accessing a Subfolder of a Parent Folder (Jonathan)
11. Re: FOLLOWUP: 120MB file import failures (Michael Dexter)
12. oddity with zope and webdav (David Bear)
13. Translating a webpage (Sam Boggess)
14. Re: Finding a match in a large dataset - btrees? (Cameron Beattie)
15. Re: add multiple images to zope folder (Chris Purves)
16. Re: add multiple images to zope folder (Chris Purves)
17. Re: oddity with zope and webdav (Chris Purves)
18. Re: oddity with zope and webdav (Chris Purves)
19. Re: Finding a match in a large dataset - btrees? (Andreas Jung)
20. Re: Finding a match in a large dataset - btrees? (Andreas Jung)
21. Re: Finding a match in a large dataset - btrees? (Tino Wildenhain)
22. Re: oddity with zope and webdav (Sam Stainsby)
23. Re: Translating a webpage (Josef Meile)
24. Re: Re: Zope Calendar (Lennart Regebro)
25. Saving a Rendered DTML Document (Asad Habib)
26. Re: FOLLOWUP: 120MB file import failures (Jens Vagelpohl)
27. Re: zdsock (Chris Withers)
28. Re: Hooks for methods other than GET/POST on port 80?
(Chris Withers)
29. Re: oddity with zope and webdav (Chris Withers)
30. Re: Beginners Confusion (Chris Withers)
31. Re: FOLLOWUP: 120MB file import failures (Chris Withers)
32. Re: zdsock (John Poltorak)
33. Re: Re: Python Classes and Zope. (Dario Lopez-K?sten)
34. Re: Re: Python Classes and Zope. (Jean-Marc Orliaguet)
----------------------------------------------------------------------
Message: 1
Date: Mon, 05 Dec 2005 12:44:06 -0500
From: Jonathan Cyr <cyrj at cyr.info>
Subject: Re: [Zope] add multiple images to zope folder
To: Chris Purves <chris.purves at gmail.com>
Cc: zope at zope.org
Message-ID: <43947C66.1000302 at cyr.info>
Content-Type: text/plain; charset="iso-8859-1"
I once started down that path with FTP. I use HomeSite, as well, to
save via FTP. I investigated a Linux package called Delegate, that
would provide a rev-proxy for FTP over SSL, in which normal FTP clients
with SSL could transfer files. www.delegate.org
I didn't continue, priorities and all.
Maybe a WebDAV client over SSL would be easier, depends on your needs.
-Jon
Chris Purves wrote:
>On 04/12/05, Jonathan Cyr <cyrj at cyr.info> wrote:
>
>
>> Use FTP,
>>
>> Open Internet Explorer, type ftp://zopeusername:password@yourZopeIPorURL.com:8021/directory/
>>
>> and drag and drop from explorer to ie, zope assigns them as images automatically.
>>
>> Any FTP client will do, Filezilla is nice/free, as well. (filezilla.sourceforge.net) Substitute 8021 with your Zope's FTP port.
>>
>> I use it regularly for uploading website graphical components, a nice shortcut.
>>
>>
>
>That looks like exactly what I want, but is it possible to make the
>connection secure?
>
>--
>Take care, eh.
>Chris
>_______________________________________________
>Zope maillist - Zope at 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 )
>
>
>
--
Jonathan Cyr
http://www.cyr.info
http://www.weddingweblog.com
cyrj at cyr.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20051205/c0387b7b/attachment-0001.htm
------------------------------
Message: 2
Date: Mon, 5 Dec 2005 13:34:15 -0500
From: "Garth B." <garthb at gmail.com>
Subject: [Zope] Adding TextIndexNG 3.1.1 error
To: zope at zope.org
Message-ID:
<4ee48d070512051034p22cce993q44c36e5da56e6288 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Zope 2.8.0
Python 2.3.5
RHEL 3
I installed TextIndexNG 3.1.1 and associated extension_modules without
a problem. Trying to add a TextIndexNG index to my catalog returns:
Error Type: ComponentLookupError
Error Value: 'Utilities'
I'm pretty sure I followed all instructions and I've installed and
used previous versions of TextIndexNG without a problem on other
instances of Zope 2.8.x.
Can anyone help figure out what's going wrong? Traceback follows...
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 Shared.DC.Scripts.Bindings, line 311, in __call__
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
Module Products.PageTemplates.PageTemplateFile, line 110, in _exec
Module Products.PageTemplates.PageTemplate, line 102, in pt_render
- <PageTemplateFile at /test/Catalog/manage_addTextIndexNG3Form>
Module TAL.TALInterpreter, line 190, in __call__
Module TAL.TALInterpreter, line 234, in interpret
Module TAL.TALInterpreter, line 611, in do_loop_tal
Module Products.PageTemplates.TALES, line 206, in setRepeat
Module Products.PageTemplates.TALES, line 221, in evaluate
- URL: manage_addTextIndexNG3Form
- Line 155, Column 8
- Expression: standard:'context/get_splitters'
- Names:
{'container': <App.ProductContext.__FactoryDispatcher__ object
at 0xb64020cc>,
'context': <App.ProductContext.__FactoryDispatcher__ object at
0xb64020cc>,
'default': <Products.PageTemplates.TALES.Default instance at 0xb6c6bdcc>,
'here': <App.ProductContext.__FactoryDispatcher__ object at 0xb64020cc>,
'loop': <Products.PageTemplates.TALES.SafeMapping object at 0xb613e3cc>,
'modules':
<Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at
0xb6c7ec6c>,
'nothing': None,
'options': {'args': ()},
'repeat': <Products.PageTemplates.TALES.SafeMapping object at
0xb613e3cc>,
'request': <HTTPRequest,
URL=http://localhost:8080/test/Catalog/manage_addProduct/TextIndexNG3/manage_addTextIndexNG3Form>,
'root': <OFS.Application.Application object at 0xb644f32c>,
'template': <PageTemplateFile at
/test/Catalog/manage_addTextIndexNG3Form>,
'traverse_subpath': [],
'user': garth}
Module Products.PageTemplates.Expressions, line 183, in __call__
Module Products.PageTemplates.Expressions, line 178, in _eval
Module Products.PageTemplates.Expressions, line 85, in render
Module Products.TextIndexNG3, line 49, in get_splitters
Module zope.component, line 87, in getUtilitiesFor
Module zope.component, line 68, in getService
Module zope.component.service, line 109, in getService
ComponentLookupError: 'Utilities'
------------------------------
Message: 3
Date: Mon, 05 Dec 2005 20:06:23 +0100
From: Andreas Jung <lists at andreas-jung.com>
Subject: Re: [Zope] Adding TextIndexNG 3.1.1 error
To: "Garth B." <garthb at gmail.com>, zope at zope.org
Message-ID: <B32EE3A33AE7D20A55522E53 at suxmac>
Content-Type: text/plain; charset="us-ascii"
--On 5. Dezember 2005 13:34:15 -0500 "Garth B." <garthb at gmail.com> wrote:
> Zope 2.8.0
> Python 2.3.5
> RHEL 3
>
> I installed TextIndexNG 3.1.1 and associated extension_modules without
> a problem. Trying to add a TextIndexNG index to my catalog returns:
>
> Error Type: ComponentLookupError
> Error Value: 'Utilities'
>
I am still missing a detailed description from your side how to reproduce
this behaviour on nacked Plone or Zope installation.
-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20051205/2a260952/attachment-0001.bin
------------------------------
Message: 4
Date: Mon, 5 Dec 2005 14:15:39 -0500
From: "Garth B." <garthb at gmail.com>
Subject: Re: [Zope] Adding TextIndexNG 3.1.1 error
To: Andreas Jung <lists at andreas-jung.com>, zope at zope.org
Message-ID:
<4ee48d070512051115o3d1b5aeeie4b29456295694c3 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Sorry, I created a ZCatalog and when choosing TextIndexNG3 from the
"Add" dropdown in my ZCatalog's Indexes tab, it immediately gives me
this error.
Thanks for any help you can provide! I'll repeat the traceback below:
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 Shared.DC.Scripts.Bindings, line 311, in __call__
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
Module Products.PageTemplates.PageTemplateFile, line 110, in _exec
Module Products.PageTemplates.PageTemplate, line 102, in pt_render
- <PageTemplateFile at /test/Catalog/manage_addTextIndexNG3Form>
Module TAL.TALInterpreter, line 190, in __call__
Module TAL.TALInterpreter, line 234, in interpret
Module TAL.TALInterpreter, line 611, in do_loop_tal
Module Products.PageTemplates.TALES, line 206, in setRepeat
Module Products.PageTemplates.TALES, line 221, in evaluate
- URL: manage_addTextIndexNG3Form
- Line 155, Column 8
- Expression: standard:'context/get_splitters'
- Names:
{'container': <App.ProductContext.__FactoryDispatcher__ object
at 0xb64020cc>,
'context': <App.ProductContext.__FactoryDispatcher__ object at
0xb64020cc>,
'default': <Products.PageTemplates.TALES.Default instance at 0xb6c6bdcc>,
'here': <App.ProductContext.__FactoryDispatcher__ object at 0xb64020cc>,
'loop': <Products.PageTemplates.TALES.SafeMapping object at 0xb613e3cc>,
'modules':
<Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at
0xb6c7ec6c>,
'nothing': None,
'options': {'args': ()},
'repeat': <Products.PageTemplates.TALES.SafeMapping object at
0xb613e3cc>,
'request': <HTTPRequest,
URL=http://localhost:8080/test/Catalog/manage_addProduct/TextIndexNG3/manage_addTextIndexNG3Form>,
'root': <OFS.Application.Application object at 0xb644f32c>,
'template': <PageTemplateFile at
/test/Catalog/manage_addTextIndexNG3Form>,
'traverse_subpath': [],
'user': garth}
Module Products.PageTemplates.Expressions, line 183, in __call__
Module Products.PageTemplates.Expressions, line 178, in _eval
Module Products.PageTemplates.Expressions, line 85, in render
Module Products.TextIndexNG3, line 49, in get_splitters
Module zope.component, line 87, in getUtilitiesFor
Module zope.component, line 68, in getService
Module zope.component.service, line 109, in getService
ComponentLookupError: 'Utilities'
On 12/5/05, Andreas Jung <lists at andreas-jung.com> wrote:
>
>
> --On 5. Dezember 2005 13:34:15 -0500 "Garth B." <garthb at gmail.com> wrote:
>
> > Zope 2.8.0
> > Python 2.3.5
> > RHEL 3
> >
> > I installed TextIndexNG 3.1.1 and associated extension_modules without
> > a problem. Trying to add a TextIndexNG index to my catalog returns:
> >
> > Error Type: ComponentLookupError
> > Error Value: 'Utilities'
> >
>
> I am still missing a detailed description from your side how to reproduce
> this behaviour on nacked Plone or Zope installation.
>
> -aj
>
>
>
>
------------------------------
Message: 5
Date: Mon, 05 Dec 2005 20:27:21 +0100
From: Andreas Jung <lists at andreas-jung.com>
Subject: Re: [Zope] Adding TextIndexNG 3.1.1 error
To: "Garth B." <garthb at gmail.com>, Andreas Jung
<lists at andreas-jung.com>, zope at zope.org
Message-ID: <3440EE1E50BA9A028F5CF601 at suxmac>
Content-Type: text/plain; charset="us-ascii"
--On 5. Dezember 2005 14:15:39 -0500 "Garth B." <garthb at gmail.com> wrote:
> Sorry, I created a ZCatalog and when choosing TextIndexNG3 from the
> "Add" dropdown in my ZCatalog's Indexes tab, it immediately gives me
> this error.
Works like a charm..Somehow your Zope installation must be borked.
Try with again with a fresh 2.8 installation.
-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20051205/3fc4fbd6/attachment-0001.bin
------------------------------
Message: 6
Date: Mon, 5 Dec 2005 14:39:29 -0500
From: "Garth B." <garthb at gmail.com>
Subject: Re: [Zope] Adding TextIndexNG 3.1.1 error
To: Andreas Jung <lists at andreas-jung.com>
Cc: zope at zope.org
Message-ID:
<4ee48d070512051139n4a4cd487hd5faf3f3d5658160 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Sigh... figures... I'll use this as an excuse to upgrade to 2.8.4
Thanks!
On 12/5/05, Andreas Jung <lists at andreas-jung.com> wrote:
>
>
> --On 5. Dezember 2005 14:15:39 -0500 "Garth B." <garthb at gmail.com> wrote:
>
> > Sorry, I created a ZCatalog and when choosing TextIndexNG3 from the
> > "Add" dropdown in my ZCatalog's Indexes tab, it immediately gives me
> > this error.
>
> Works like a charm..Somehow your Zope installation must be borked.
> Try with again with a fresh 2.8 installation.
>
> -aj
>
>
>
------------------------------
Message: 7
Date: Mon, 5 Dec 2005 22:18:32 +0000
From: John Poltorak <jp at warpix.org>
Subject: Re: [Zope] Re: Zope Calendar
To: zope at zope.org
Message-ID: <20051205221832.D47 at warpix.org>
Content-Type: text/plain; charset=us-ascii
On Mon, Dec 05, 2005 at 05:08:19PM +0100, Lennart Regebro wrote:
> On 12/5/05, Lennart Regebro <regebro at gmail.com> wrote:
> > I think this would be easier if you were more specific of what kind of
> > features you want.
>
> Or you can just use CalZope. ;-) It is the most superfantasticmegacool
> calendar software ever. I know, because Martijn Faassen and I wrote
> it. :-D
>
> http://www.cps-project.org/sections/projects/calendar_server/features/
Is there so,ething missing here?
http://www.cps-project.org/sections/about/screenshots/cps_sites_screenshots/
Is there an example of it in use anywhere?
Can't tell if it works with just Zope or whether it needs Plone.
> Unbiasedly:
> Lennart Regebro, Nuxeo
--
John
------------------------------
Message: 8
Date: Mon, 5 Dec 2005 17:50:23 -0500 (EST)
From: Asad Habib <ahabib at engin.umich.edu>
Subject: [Zope] Accessing a Subfolder of a Parent Folder
To: zope at zope.org
Message-ID: <Pine.GSO.4.63.0512051745470.29817 at lapis.engin.umich.edu>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
How do I access the subfolder of a parent folder? I am using the following
but cannot seem to access the folder object:
<dtml-call "REQUEST.set('parentFolder', PARENTS[2].id + 'Test')">
<dtml-call "REQUEST.get('parentFolder').initialize_vars()">
I get the following error:
Error Type: AttributeError
Error Value: 'str' object has no attribute 'initialize_vars'
I understand that a DTML method cannot be called on a string, but how do I
obtain the object that represents the subfolder 'Test'? Any help would be
appreciated. Thanks.
- Asad
------------------------------
Message: 9
Date: Mon, 5 Dec 2005 23:31:32 +0000
From: Peter Bengtsson <peter at fry-it.com>
Subject: Re: [Zope] Accessing a Subfolder of a Parent Folder
To: Asad Habib <ahabib at engin.umich.edu>
Cc: zope at zope.org
Message-ID:
<bc95c2800512051531s5371804h51d39a7ea50e29b6 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
<dtml-call "REQUEST.set('parentFolder', PARENTS[2].id + 'Test')">
<dtml-call "_.getitem(REQUEST.get('parentFolder')).initialize_vars()">
On 12/5/05, Asad Habib <ahabib at engin.umich.edu> wrote:
> How do I access the subfolder of a parent folder? I am using the following
> but cannot seem to access the folder object:
>
> <dtml-call "REQUEST.set('parentFolder', PARENTS[2].id + 'Test')">
> <dtml-call "REQUEST.get('parentFolder').initialize_vars()">
>
> I get the following error:
>
> Error Type: AttributeError
> Error Value: 'str' object has no attribute 'initialize_vars'
>
> I understand that a DTML method cannot be called on a string, but how do I
> obtain the object that represents the subfolder 'Test'? Any help would be
> appreciated. Thanks.
>
> - Asad
>
>
> _______________________________________________
> Zope maillist - Zope at 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 )
>
--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
------------------------------
Message: 10
Date: Mon, 5 Dec 2005 18:32:18 -0500
From: "Jonathan" <dev101 at magma.ca>
Subject: Re: [Zope] Accessing a Subfolder of a Parent Folder
To: "Asad Habib" <ahabib at engin.umich.edu>, <zope at zope.org>
Message-ID: <003f01c5f9f4$228c1770$677ba8c0 at amd>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=response
try googling 'aq_parent'.
Jonathan
----- Original Message -----
From: "Asad Habib" <ahabib at engin.umich.edu>
To: <zope at zope.org>
Sent: Monday, December 05, 2005 5:50 PM
Subject: [Zope] Accessing a Subfolder of a Parent Folder
> How do I access the subfolder of a parent folder? I am using the following
> but cannot seem to access the folder object:
>
> <dtml-call "REQUEST.set('parentFolder', PARENTS[2].id + 'Test')">
> <dtml-call "REQUEST.get('parentFolder').initialize_vars()">
>
> I get the following error:
>
> Error Type: AttributeError
> Error Value: 'str' object has no attribute 'initialize_vars'
>
> I understand that a DTML method cannot be called on a string, but how do I
> obtain the object that represents the subfolder 'Test'? Any help would be
> appreciated. Thanks.
>
> - Asad
>
>
> _______________________________________________
> Zope maillist - Zope at 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 )
>
------------------------------
Message: 11
Date: Mon, 5 Dec 2005 17:05:08 -0800
From: Michael Dexter <dexter at ambidexter.com>
Subject: Re: [Zope] FOLLOWUP: 120MB file import failures
To: zope at zope.org
Message-ID: <a06230911bfba90e21e98@[192.168.1.30]>
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
Hello,
I found the source of my problem uploading a large file to ZODB over
DAV and an a workaround that shouldn't have worked but worked. For
those who are interested:
For completeness:
> >I would like to put a 120MB file into ZODB and it is constantly failing.
>
>But you should have learned that you cannot simply say "is failing"
>but must describe precisely (error information, traceback) *how*
>it is failing...
Correct Dieter, I was vague but it indeed would progress and then
fail. Goliath, a mac web dav client, would report "Unknown connection
error" and the Finder would report "... cannot be completed... one or
more required items not found (error code -43) I apologize that I am
not familiar with Zope's traceback.
Thank you to Tino for providing a script to copy files into ZODB.
This solves a few other issues.
So. I knew to watch my /tmp directory and it was not being used. It
turns out that Python (presumably, not Zope) was using /var/tmp (over
RAM, given that large-file-threshold in zope.conf was lower than
120MB).
I linked /var/tmp to /tmp and oddly it started using /usr/??? but at
least it worked because there was more than 120MB available there. I
am not quite sure where it ended up putting it. (seemingly not /var
in the zope instance)
The solution appears to be that python can use the TMPDIR variable to
specify where tmp should default to (reportedly it will try various
locations) but, I am not clear how I can add this to Zope's rc script
to declare it. I tried it as simply setting the environment variable
"set TMPDIR=/tmp" but that gave warnings about the startup logic.
1. Should TMPDIR work?
2. Where should I declare it when using rc scripts?
3. Any chance zope.conf can use it?
References:
http://mail.zope.org/pipermail/zope-dev/2005-March/024534.html
http://mail.zope.org/pipermail/zope-dev/2005-March/024532.html
Appreciated,
Michael.
------------------------------
Message: 12
Date: Mon, 5 Dec 2005 18:17:38 -0700
From: David Bear <dwbear75 at gmail.com>
Subject: [Zope] oddity with zope and webdav
To: zope at zope.org
Message-ID:
<1476e3960512051717q3016945ev8db3cc2723a8f885 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
I have a zope instance listening on localhost. I use apache and fastcgi to
reach zope. Now I would like to provide webdav. Since my apache is already
doing ssl, I wanted webdav connections to also go through apache.
when I use cadaver and connect to my zope zope through apache, all works
well even though I have specified in my zope.conf file that webdav listen
on localhost:8088 (it seems that cadaver is smart enough working through the
fastcgi interface to just work).
When attempting to using dreamweaver mx or windows webfolders to connect to
zope I get an error.
So I attempted to use an apache proxy pass directive to campture all urls at
myzopeserver.edu:8088/webdav back to localhost:8088. This had no effect.
cadaver was still able to work. Dreamweaver (using webdav site setup) and
windows webfolders still failed.
What deep magic do I need to make dav work through apache? ( would prefer to
have all things go through fastcgi but I understand the trend is to use
proxy-pass )
--
David Bear
What's the difference between private knowledge and public knowledge?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20051205/47a1232a/attachment-0001.htm
------------------------------
Message: 13
Date: Mon, 5 Dec 2005 17:39:03 -0800
From: Sam Boggess <sboggess at gmail.com>
Subject: [Zope] Translating a webpage
To: zope at zope.org
Message-ID: <B2B68C83-0E1E-45AD-BB13-C389AEC80D4D at gmail.com>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
I'm wondering if someone can point me in the direction of some
documentation that will tell me the best way to translate a web page
into multiple languages using Zope Page Templates. In previous sites
we've done in DTML we used a 'phrases' table in our MySQL database
that contained phrases in each language the site required. We then
used sql methods and a dtml-let statement to create a list of the
phrases used on a certain page. I'm considering using the same basic
idea for a page template site, but am wondering if there is a better
way of doing translations. I've read about using .po files. Is
there an easy way to hook these up to Zope? Any help would be greatly
appreciated.
Thanks.
------------------------------
Message: 14
Date: Tue, 6 Dec 2005 14:55:08 +1300
From: "Cameron Beattie" <kjcsb at orcon.net.nz>
Subject: Re: [Zope] Finding a match in a large dataset - btrees?
To: <zope at zope.org>
Message-ID: <013401c5fa08$1692a9c0$0a00a8c0 at HOUSTON>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=response
Thanks for the many replies. I apologise for the original message which was
obviously very unclear - I will try to correct that.
Basically I want to match a telephone number to a rate table. Assume the
following rate table:
Telephone code Rate
649 1
6421 2
6422 2.5
64 1.5
The following table sets out the appropriate rate to return for a given
telephone number
Dialled number Returned rate
649123 1
643123 1.5
6421111 2
64221 2.5
Things to note:
If there is no match the right-most digit is removed until there is a match
e.g. 643123 matches to 64
The length of the "dialled number" is not consistent e.g. 649123 vs 64221
The length of the "telephone code" is not consistent e.g. 64 vs 6422
I want to do this frequently and at low cost i.e. ideally in memory. Perhaps
the best way is to write a procedure in MySQL however I am interested in any
python-based alternatives.
Regards
Cameron
------------------------------
Message: 15
Date: Tue, 6 Dec 2005 10:13:06 +0800
From: Chris Purves <chris.purves at gmail.com>
Subject: Re: [Zope] add multiple images to zope folder
To: zope at zope.org
Message-ID: <5c27911f0512051813j7191057fn at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
On 05/12/05, Chris Withers <chris at simplistix.co.uk> wrote:
> I'd use WebDAV.
>
> If you want security, tunnel the WebDAV port over ssh.
>
Thanks. I was able to get WebDAV over SSL working.
--
Take care, eh.
Chris
------------------------------
Message: 16
Date: Tue, 6 Dec 2005 10:15:48 +0800
From: Chris Purves <chris.purves at gmail.com>
Subject: Re: [Zope] add multiple images to zope folder
To: zope at zope.org
Message-ID: <5c27911f0512051815m61aa5e04r at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
On 06/12/05, Jonathan Cyr <cyrj at cyr.info> wrote:
> I once started down that path with FTP. I use HomeSite, as well, to save
> via FTP. I investigated a Linux package called Delegate, that would provide
> a rev-proxy for FTP over SSL, in which normal FTP clients with SSL could
> transfer files. www.delegate.org
>
> I didn't continue, priorities and all.
>
> Maybe a WebDAV client over SSL would be easier, depends on your needs.
Yes, that's exactly what I was looking for. I'm already using Apache
as a proxy for Zserver, so it didn't take much to get SSL working as
well.
Thanks, everyone for your help.
--
Take care, eh.
Chris
------------------------------
Message: 17
Date: Tue, 6 Dec 2005 10:23:33 +0800
From: Chris Purves <chris.purves at gmail.com>
Subject: Re: [Zope] oddity with zope and webdav
To: zope at zope.org
Message-ID: <5c27911f0512051823t586060d7r at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
On 06/12/05, David Bear <dwbear75 at gmail.com> wrote:
> I have a zope instance listening on localhost. I use apache and fastcgi to
> reach zope. Now I would like to provide webdav. Since my apache is already
> doing ssl, I wanted webdav connections to also go through apache.
>
> when I use cadaver and connect to my zope zope through apache, all works
> well even though I have specified in my zope.conf file that webdav listen
> on localhost:8088 (it seems that cadaver is smart enough working through the
> fastcgi interface to just work).
>
> When attempting to using dreamweaver mx or windows webfolders to connect to
> zope I get an error.
>
> So I attempted to use an apache proxy pass directive to campture all urls
> at myzopeserver.edu:8088/webdav back to localhost:8088. This had no effect.
> cadaver was still able to work. Dreamweaver (using webdav site setup) and
> windows webfolders still failed.
>
> What deep magic do I need to make dav work through apache? ( would prefer
> to have all things go through fastcgi but I understand the trend is to use
> proxy-pass )
>
I just got this working myself, although I am using apache as a proxy,
not fastcgi. If you already have ssl working with apache and can
access zope through apache without ssl, it shouldn't be difficult.
The main thing is to add a virtual host in your apache config for SSL
and modify the rewrite line to use https:. I found the following
document helpful:
http://www.zope.org/Members/tmckibben/HowTo.2004-04-13.0659
It uses FastCGI, so it should more closely match your setup than mine
--
Take care, eh.
Chris
------------------------------
Message: 18
Date: Tue, 6 Dec 2005 10:23:33 +0800
From: Chris Purves <chris.purves at gmail.com>
Subject: Re: [Zope] oddity with zope and webdav
To: zope at zope.org
Message-ID: <5c27911f0512051823t586060d7r at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
On 06/12/05, David Bear <dwbear75 at gmail.com> wrote:
> I have a zope instance listening on localhost. I use apache and fastcgi to
> reach zope. Now I would like to provide webdav. Since my apache is already
> doing ssl, I wanted webdav connections to also go through apache.
>
> when I use cadaver and connect to my zope zope through apache, all works
> well even though I have specified in my zope.conf file that webdav listen
> on localhost:8088 (it seems that cadaver is smart enough working through the
> fastcgi interface to just work).
>
> When attempting to using dreamweaver mx or windows webfolders to connect to
> zope I get an error.
>
> So I attempted to use an apache proxy pass directive to campture all urls
> at myzopeserver.edu:8088/webdav back to localhost:8088. This had no effect.
> cadaver was still able to work. Dreamweaver (using webdav site setup) and
> windows webfolders still failed.
>
> What deep magic do I need to make dav work through apache? ( would prefer
> to have all things go through fastcgi but I understand the trend is to use
> proxy-pass )
>
I just got this working myself, although I am using apache as a proxy,
not fastcgi. If you already have ssl working with apache and can
access zope through apache without ssl, it shouldn't be difficult.
The main thing is to add a virtual host in your apache config for SSL
and modify the rewrite line to use https:. I found the following
document helpful:
http://www.zope.org/Members/tmckibben/HowTo.2004-04-13.0659
It uses FastCGI, so it should more closely match your setup than mine
--
Take care, eh.
Chris
------------------------------
Message: 19
Date: Tue, 06 Dec 2005 06:55:03 +0100
From: Andreas Jung <lists at andreas-jung.com>
Subject: Re: [Zope] Finding a match in a large dataset - btrees?
To: Cameron Beattie <kjcsb at orcon.net.nz>, zope at zope.org
Message-ID: <7810084537A97C47ADE0DD6A at suxmac>
Content-Type: text/plain; charset="us-ascii"
--On 6. Dezember 2005 14:55:08 +1300 Cameron Beattie <kjcsb at orcon.net.nz>
wrote:
> I want to do this frequently and at low cost i.e. ideally in memory.
> Perhaps the best way is to write a procedure in MySQL however I am
> interested in any python-based alternatives.
>
I pointed you already to the BTrees documentation.
-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20051206/6b921faf/attachment-0001.bin
------------------------------
Message: 20
Date: Tue, 06 Dec 2005 07:13:36 +0100
From: Andreas Jung <lists at andreas-jung.com>
Subject: Re: [Zope] Finding a match in a large dataset - btrees?
To: Cameron Beattie <kjcsb at orcon.net.nz>, zope at zope.org
Message-ID: <A907BF90742C88770D23B12E at suxmac>
Content-Type: text/plain; charset="us-ascii"
--On 6. Dezember 2005 14:55:08 +1300 Cameron Beattie <kjcsb at orcon.net.nz>
wrote:
>
> I want to do this frequently and at low cost i.e. ideally in memory.
> Perhaps the best way is to write a procedure in MySQL however I am
> interested in any python-based alternatives.
Your problem is more an algorithmic problem than q question of the data
representation. Store the mapping as some BTree (possibly IIBTree using
normalized integers for the values). Then you have to iterate over all
prefixes of the dialed number starting with the longest prefix to the
smallest prefix. Then perform a lookup of the prefix in your BTree...
this is should not take more than five lines of code and requires a maximum
of #(length_of_dialed_number) comparisons. If you want it more complicated
construct a tree and you'll have a logarithmic number of comparisons. I
doubt that it is worth the effort since the first solution should be fast
enough unless your dialed number is hundreds of digits long :-)
-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20051206/b6c4f02a/attachment-0001.bin
------------------------------
Message: 21
Date: Tue, 06 Dec 2005 07:41:47 +0100
From: Tino Wildenhain <tino at wildenhain.de>
Subject: Re: [Zope] Finding a match in a large dataset - btrees?
To: Cameron Beattie <kjcsb at orcon.net.nz>
Cc: zope at zope.org
Message-ID: <1133851307.4975.2.camel at Andrea.peacock.de>
Content-Type: text/plain
Am Dienstag, den 06.12.2005, 14:55 +1300 schrieb Cameron Beattie:
> Thanks for the many replies. I apologise for the original message which was
> obviously very unclear - I will try to correct that.
>
...
> I want to do this frequently and at low cost i.e. ideally in memory. Perhaps
> the best way is to write a procedure in MySQL however I am interested in any
> python-based alternatives.
*hint* use postgres instead where you can write stored functions in
python too :-)
(With some little modifications on the zope database adaptor you
could even return a dictionary or btree object as result
of your query then :-)
SCNR
Tino
------------------------------
Message: 22
Date: Tue, 06 Dec 2005 16:52:57 +1000
From: Sam Stainsby <sam at stainsby.id.au>
Subject: [Zope] Re: oddity with zope and webdav
To: zope at zope.org
Message-ID: <pan.2005.12.06.06.52.56.525132 at stainsby.id.au>
Content-Type: text/plain; charset=ISO-8859-1
On Mon, 05 Dec 2005 18:17:38 -0700, David Bear wrote:
> I have a zope instance listening on localhost. I use apache and fastcgi to
> reach zope. Now I would like to provide webdav. Since my apache is already
> doing ssl, I wanted webdav connections to also go through apache.
>
> when I use cadaver and connect to my zope zope through apache, all works
> well even though I have specified in my zope.conf file that webdav listen
> on localhost:8088 (it seems that cadaver is smart enough working through the
> fastcgi interface to just work).
>
> When attempting to using dreamweaver mx or windows webfolders to connect to
> zope I get an error.
>
> So I attempted to use an apache proxy pass directive to campture all urls at
> myzopeserver.edu:8088/webdav back to localhost:8088. This had no effect.
> cadaver was still able to work. Dreamweaver (using webdav site setup) and
> windows webfolders still failed.
>
> What deep magic do I need to make dav work through apache? ( would prefer to
> have all things go through fastcgi but I understand the trend is to use
> proxy-pass )
I believe this patch is required if using recent WinXP, due to Microsoft
webdav breakages:
http://teyc.editthispage.com/2005/06/02
It fixed webdav for web folder for me. Add the extra line into the OPTIONS
method of the file mentioned, where other headers are being set.
-- Sam.
------------------------------
Message: 23
Date: Tue, 06 Dec 2005 09:25:50 +0100
From: Josef Meile <jmeile at hotmail.com>
Subject: [Zope] Re: Translating a webpage
To: zope at zope.org
Message-ID: <43954B0E.9060101 at hotmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi Sam,
> I've read about using .po files. Is there an easy
> way to hook these up to Zope? Any help would be greatly appreciated.
Yes, there are two alternatives:
PlacelessTranslationService and Localizer both of them allow you to use
po files and negociate the language according to the browser settings or
cookie based (Localizer allows you also a path based negociation ie:
/en for english, /de for german). If you only need to translate label
messages and small paragraphs, then PlacelessTranslationService will be
the way. Localizer can also do the same as its competitor; additionaly
you can also define localized contents (ie: you can have two versions of
a page and they will be selected according to the browser language).
Some days ago, I also read something about integrating the Zope 3.x
translation technolgy into zope 2 using five; it seems interesting as
well:
http://worldcookery.com/files/fivei18n
Regards
Josef
------------------------------
Message: 24
Date: Tue, 6 Dec 2005 10:16:45 +0100
From: Lennart Regebro <regebro at gmail.com>
Subject: Re: [Zope] Re: Zope Calendar
To: John Poltorak <jp at warpix.org>
Cc: zope at zope.org
Message-ID:
<319e029f0512060116t349654fxa62a9df4aa3fd858 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
On 12/5/05, John Poltorak <jp at warpix.org> wrote:
> Is there an example of it <CalZope> in use anywhere?
Yes, but I guess you want a place you can test it... :-)
You can always install CPS and try it out, the calendar is included there.
> Can't tell if it works with just Zope or whether it needs Plone.
It works with plain Zope. There are also integration for CPS, and
since the Plone calendaring sprint last weekend, a project to make
Plone integration as well.
For plain Zope, you need to implement some sort of
internationalisation and integrate it with your sites menu system.
(Although I'm currently working on using the Five internationalisation
that comes with Five 1.1 and Zope 2.9).
http://www.cps-project.org/sections/projects/calendar_server/cpssharedcalendar-1-3-3/
--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
------------------------------
Message: 25
Date: Tue, 6 Dec 2005 04:29:36 -0500 (EST)
From: Asad Habib <ahabib at engin.umich.edu>
Subject: [Zope] Saving a Rendered DTML Document
To: zope at zope.org
Message-ID: <Pine.GSO.4.63.0512060423040.11153 at lapis.engin.umich.edu>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Hello. I have a DTML document which contains some DTML, but mostly HTML. I
want to save the HTML contents of this DTML document once it is rendered
by Zope (i.e. once the DTML is evaluated) in another DTML document (i.e.
this document will only contain HTML offcourse and must be since it will
be used by a PHP script). Is there a way to do this so every time the
former changes, the latter is updated as well? Any help would be
appreciated. Thanks.
- Asad
------------------------------
Message: 26
Date: Tue, 6 Dec 2005 09:51:49 +0000
From: Jens Vagelpohl <jens at dataflake.org>
Subject: Re: [Zope] FOLLOWUP: 120MB file import failures
To: Zope Zope list <zope at zope.org>
Message-ID: <81A2B446-3B54-436C-8FCF-C1CF99AD18B8 at dataflake.org>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
On 6 Dec 2005, at 01:05, Michael Dexter wrote:
> The solution appears to be that python can use the TMPDIR variable
> to specify where tmp should default to (reportedly it will try
> various locations) but, I am not clear how I can add this to Zope's
> rc script to declare it. I tried it as simply setting the
> environment variable "set TMPDIR=/tmp" but that gave warnings about
> the startup logic.
>
> 1. Should TMPDIR work?
> 2. Where should I declare it when using rc scripts?
> 3. Any chance zope.conf can use it?
zope.conf has a directive "environment" for exactly that purpose.
jens
------------------------------
Message: 27
Date: Tue, 06 Dec 2005 09:51:12 +0000
From: Chris Withers <chris at simplistix.co.uk>
Subject: Re: [Zope] zdsock
To: John Poltorak <jp at warpix.org>
Cc: zope at zope.org
Message-ID: <43955F10.5010204 at simplistix.co.uk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
John Poltorak wrote:
> Zope itself works fine when started via runzope, so what is the problem in
> trying to provide an alternate socket name?
>
> zdctl is supposed to accept an alternative socket name:-
>
> -s/--socket-name SOCKET -- Unix socket name for client (default "zdsock")
>
> Unfortunately, I can't figure out any way to make use of this option.
Why do you care about this? AGAIK, this is only to do with those weird
unix file-like socket things, and shouldn't be worried about if you're
using a normal tcp socket as you should be ;-)
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
------------------------------
Message: 28
Date: Tue, 06 Dec 2005 09:45:55 +0000
From: Chris Withers <chris at simplistix.co.uk>
Subject: Re: [Zope] Hooks for methods other than GET/POST on port 80?
To: Roman Susi <rnd at onego.ru>
Cc: zope at zope.org
Message-ID: <43955DD3.6020804 at simplistix.co.uk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Roman Susi wrote:
> This is what freezes Zope:
What do you mean by freezes? how did you cause this to happen?
> Traceback (most recent call last):
> File "/usr/local/lib/python2.3/logging/__init__.py", line 674, in emit
> msg = self.format(record)
> File "/usr/local/lib/python2.3/logging/__init__.py", line 567, in format
> return fmt.format(record)
> File "/usr/local/lib/python2.3/logging/__init__.py", line 369, in format
> s = s + self.formatException(record.exc_info)
> File "/usr/local/lib/python2.3/logging/__init__.py", line 342, in
> formatException
> traceback.print_exception(ei[0], ei[1], ei[2], None, sio)
> File "/usr/local/lib/python2.3/traceback.py", line 123, in print_exception
> print_tb(tb, limit, file)
> File "/usr/local/lib/python2.3/traceback.py", line 68, in print_tb
> line = linecache.getline(filename, lineno)
> File "/usr/local/lib/python2.3/linecache.py", line 14, in getline
> lines = getlines(filename)
> RuntimeError: maximum recursion depth exceeded
We need more of the traceback, there is no repeating part here so it's
impossible to see what's causing the infinite recursion...
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
------------------------------
Message: 29
Date: Tue, 06 Dec 2005 10:12:42 +0000
From: Chris Withers <chris at simplistix.co.uk>
Subject: Re: [Zope] oddity with zope and webdav
To: David Bear <dwbear75 at gmail.com>
Cc: zope at zope.org
Message-ID: <4395641A.3090806 at simplistix.co.uk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
David Bear wrote:
> I have a zope instance listening on localhost. I use apache and fastcgi to
> reach zope.
you may wish to rethink that when you get a chance...
> Now I would like to provide webdav.
What do you want to use WebDAV for?
> when I use cadaver and connect to my zope zope through apache, all works
> well even though I have specified in my zope.conf file that webdav listen
> on localhost:8088 (it seems that cadaver is smart enough working through the
> fastcgi interface to just work).
I know nothing abotu fastcgi, but I doubt you're reachign the source
port, so if you open a ZPT, for example, you will get the rendered
version, and if you edit and save it, you will loose all your tal markup.
> When attempting to using dreamweaver mx or windows webfolders to connect to
> zope I get an error.
Chocolate teapot? ;-)
What error, exactly and verbosely, did you get?
> So I attempted to use an apache proxy pass directive to campture all urls at
> myzopeserver.edu:8088/webdav back to localhost:8088. This had no effect.
I doubt it had no effect, look in your apache access and error logs...
> cadaver was still able to work. Dreamweaver (using webdav site setup) and
> windows webfolders still failed.
More information please... you may need to get a packet sniffer such as
etheral up and running to get further...
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
------------------------------
Message: 30
Date: Tue, 06 Dec 2005 10:17:06 +0000
From: Chris Withers <chris at simplistix.co.uk>
Subject: Re: [Zope] Beginners Confusion
To: rwinter at r2solutions.com.au, zope at zope.org
Message-ID: <43956522.5020608 at simplistix.co.uk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Russell Winter wrote:
> If you have the time, could I bug you for another question directly, please.
Ask the list, always ask the list ;-)
> I have my main Zope instance, each primary team is going to have their own
> Zope Instance with Plone in their own Products directory.
You could look at the "third product directory" option that used to be
enabled by setting the PRODUCTS_PATH environment variable, should be an
option in zope.conf somewhere now...
> I have seen and read something that seems to relate to also being able to
> run multiple Plone instances within the same Zope server, but each Plone
> instance has its own folder (on the file-system) to store some of its files
> in as well as using the Zope Zope database, I am reading this correctly?
- yes you can have as many plone instances as you like in one zope instance
- they all run off the same software, so they will be the same version
of Plohn, etc...
- you can get them in different places on disk my using mounted
storages, you'll have to have a google and fiddle. This is part of the
standard zope software, read zope.conf ;-)
- mounted storages are still ZODB-based, there's no such thing as "file
system storage" ;-)
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
------------------------------
Message: 31
Date: Tue, 06 Dec 2005 09:53:56 +0000
From: Chris Withers <chris at simplistix.co.uk>
Subject: Re: [Zope] FOLLOWUP: 120MB file import failures
To: Michael Dexter <dexter at ambidexter.com>
Cc: zope at zope.org
Message-ID: <43955FB4.1050902 at simplistix.co.uk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Michael Dexter wrote:
>
> 1. Should TMPDIR work?
Yes.
> 2. Where should I declare it when using rc scripts?
I'd probably put in the bin/runzope in your Zope instance.
> 3. Any chance zope.conf can use it?
no, unless I'm misunderstanding you...
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
------------------------------
Message: 32
Date: Tue, 6 Dec 2005 11:40:00 +0000
From: John Poltorak <jp at warpix.org>
Subject: Re: [Zope] zdsock
To: zope at zope.org
Message-ID: <20051206114000.D45 at warpix.org>
Content-Type: text/plain; charset=us-ascii
On Tue, Dec 06, 2005 at 09:51:12AM +0000, Chris Withers wrote:
> John Poltorak wrote:
> > Zope itself works fine when started via runzope, so what is the problem in
> > trying to provide an alternate socket name?
> >
> > zdctl is supposed to accept an alternative socket name:-
> >
> > -s/--socket-name SOCKET -- Unix socket name for client (default "zdsock")
> >
> > Unfortunately, I can't figure out any way to make use of this option.
>
> Why do you care about this? AGAIK, this is only to do with those weird
> unix file-like socket things, and shouldn't be worried about if you're
> using a normal tcp socket as you should be ;-)
According to the docs it should be possible to specify an alternate socket
name. I am unable to use the name 'zdsock' so would like to configure Zope
to use a user specific socket name. Either it is possible or it isn't.
So far no one has told me how I can use what are supposed to be existing
features. I've even found a sample.conf which contains this
<runner>
# Harmless example
program sleep 100
# Repeat the defaults
backoff-limit 10
daemon True
forever True
socket-name zdsock
exit-codes 0,2
# user has no default
umask 022
directory .
default-to-interactive True
hang-around False
</runner>
but no one seems to know how/where this is can be used.
What is the point in having features if no one knows how to use them?
> cheers,
>
> Chris
>
> --
> Simplistix - Content Management, Zope & Python Consulting
> - http://www.simplistix.co.uk
>
--
John
------------------------------
Message: 33
Date: Tue, 06 Dec 2005 12:48:01 +0100
From: Dario Lopez-K?sten <dario at ita.chalmers.se>
Subject: Re: [Zope] Re: Python Classes and Zope.
To: zope at zope.org
Message-ID: <43957A71.2080505 at ita.chalmers.se>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Florent Guillaume wrote:
> Paul Winkler wrote:
>
>> On Fri, Dec 02, 2005 at 04:12:01PM +0100, Jean-Marc Orliaguet wrote:
>>
>>> does zope2 do an access control based on acquisition for public
>>> methods, that would be a waste of resources since the answer is
>>> always "yes, granted" ?
>>
>> Well, the thing is, the declaration that makes the method public
>> *has no effect* unless your class participates in acquisition.
>
>
> That's not true. The objects of this class will be perfectly accessible
> to a restricted user:
>
> from AccessControl import ClassSecurityInfo
> class MyStuff(object):
> security = ClassSecurityInfo()
> security.declareObjectPublic()
> security.setDefaultAccess('allow')
> def foo(self):
> return 'bar'
> InitializeClass(MyStuff)
>
In Zope 2.7.8 I get a segmentation fault when I try to do the above; I
also have the following code that manages this for any class (to avoid
having to do that for every single class):
def _ZopifyClass(a_class):
a_class.security = ClassSecurityInfo()
a_class.security.declareObjectPublic() # Segmentation fault
security.setDefaultAccess('allow')
InitializeClass(a_class)
I cannot swithc to Zope 2.8 because my code runs in PLone 2.05 and it
does not work with Zope 2.8.
The segmentation fault occurs in the declareObjectPublic() statement.
Is there a fix for the Zope 2.7 to this problem?
Thanks.
/dario
--
-- -------------------------------------------------------------------
Dario Lopez-Kästen, IT Systems & Services Chalmers University of Tech.
Lyrics applied to programming & application design:
"emancipate yourself from mental slavery" - redemption song, b. marley
------------------------------
Message: 34
Date: Tue, 06 Dec 2005 12:51:00 +0100
From: Jean-Marc Orliaguet <jmo at chalmers.se>
Subject: Re: [Zope] Re: Python Classes and Zope.
To: Dario Lopez-K?sten <dario at ita.chalmers.se>
Cc: zope at zope.org
Message-ID: <43957B24.3050802 at chalmers.se>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Dario Lopez-Kästen wrote:
> Florent Guillaume wrote:
>
>> Paul Winkler wrote:
>>
>>> On Fri, Dec 02, 2005 at 04:12:01PM +0100, Jean-Marc Orliaguet wrote:
>>>
>>>> does zope2 do an access control based on acquisition for public
>>>> methods, that would be a waste of resources since the answer is
>>>> always "yes, granted" ?
>>>
>>>
>>> Well, the thing is, the declaration that makes the method public
>>> *has no effect* unless your class participates in acquisition.
>>
>>
>>
>> That's not true. The objects of this class will be perfectly
>> accessible to a restricted user:
>>
>> from AccessControl import ClassSecurityInfo
>> class MyStuff(object):
>> security = ClassSecurityInfo()
>> security.declareObjectPublic()
>> security.setDefaultAccess('allow')
>> def foo(self):
>> return 'bar'
>> InitializeClass(MyStuff)
>>
>
> In Zope 2.7.8 I get a segmentation fault when I try to do the above; I
> also have the following code that manages this for any class (to avoid
> having to do that for every single class):
>
> def _ZopifyClass(a_class):
> a_class.security = ClassSecurityInfo()
> a_class.security.declareObjectPublic() # Segmentation fault
> security.setDefaultAccess('allow')
> InitializeClass(a_class)
>
> I cannot swithc to Zope 2.8 because my code runs in PLone 2.05 and it
> does not work with Zope 2.8.
>
> The segmentation fault occurs in the declareObjectPublic() statement.
>
> Is there a fix for the Zope 2.7 to this problem?
>
> Thanks.
>
> /dario
is it a typo, or did you mean:
a_class.security.setDefaultAccess('allow')
?
/JM
------------------------------
_______________________________________________
Zope maillist - Zope at zope.org
End of Zope Digest, Vol 19, Issue 8
***********************************
More information about the Zope
mailing list