Re: [Zope-Coders] Wrong username and password == Anonymous User?
On 4/20/05, Sidnei da Silva [EMAIL PROTECTED] wrote: Supposedly you would not be able to access that part of the site until you authenticate against it. Isn't that the case now? Assuming it requires authentication, yes. The main problem here is that Internet Explorer doesn't allow you to log out, for example. So, in principal, invalid credentials should raise an error, but in practice, you can't do that if you use Simple HTTP authentication. With other authentication schemes, where you can log out properly, it's would be possible. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders
Re: [Zope-Coders] Wrong username and password == Anonymous User?
Lennart Regebro wrote: Supposedly you would not be able to access that part of the site until you authenticate against it. Isn't that the case now? Assuming it requires authentication, yes. And if it doesn't require authentication? Also, what determines whether it requires authentication? authorisation requirements or something else? The main problem here is that Internet Explorer doesn't allow you to log out, for example. I thought returning enough 401's usually prompts any browser to drop its basic auth? So, in principal, invalid credentials should raise an error, but in practice, you can't do that if you use Simple HTTP authentication. Why not? Surely they should just get a 403 response? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders
Re: [Zope-Coders] Re: Wrong username and password == Anonymous User?
Tres Seaver wrote: -1 without extensive testing on a branch, especially including heavy testing of basic-auth-only scenarios. Tinkering with the machinery here after a couple of hours head-scratching ignores the fact that the machinery *works* in the teeth of all the weird behavior built into to pavane which is stateless-but-faking-it basic authentication. I find myself strongly agreeing with Tres again, should I find this disturbing? ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders
Re: [Zope-Coders] Wrong username and password == Anonymous User?
On Wed, Apr 20, 2005 at 06:22:10PM +0200, Lennart Regebro wrote: On 4/20/05, Chris Withers [EMAIL PROTECTED] wrote: Lennart Regebro wrote: Supposedly you would not be able to access that part of the site until you authenticate against it. Isn't that the case now? Assuming it requires authentication, yes. And if it doesn't require authentication? It would fail, since you supplied incorrect authentication. That's pretty counter-intuitive. You are logged in, and click on a part of the site where you should not need authentication, and you get authentication errors. ;) That's what I was trying to tease out but I couldn't put my finger on it late last night. Thanks Lennart. -- Paul Winkler http://www.slinkp.com ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders
Re: [Zope-dev] Turning off product installation in zope.conf on all zeo clients?
Jens Vagelpohl wrote: From what I understand it prevents the installation/writing of a product into the ZODB (the products management part of the Control_Panel) and thus prevents conflict errors. If the product is already installed (e.g. by a client who is allowed to do so) then you can instantiate instances of your new product. So if not clients do the installation, I would not be able to instantiate objects? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ 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] To ZCML or not ;-)
Martijn Faassen wrote: Anyway, while I have my criticisms of ZCML, too much typing is really not very important in my list. You can get it somewhat shorter, I'm sure, but not *that* much shorter. I'd worry more about the reading part than the writing. More typing = more reading in my books, so I guess we're in agreement ;-) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ 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] To ZCML or not ;-)
Stephan Richter wrote: Can you be more specific? I think ZCML is very compact. Well, I'm hoping to take a proper look at the latest Z3 some time soon, so I'll let you know after that and shut up on the subject in the meantime ;-) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Zope-Coders] Unauthorized results in 401, shouldn't it result in 403?
Sidnei da Silva wrote: | Now, 5.2 is where I have the problem, since raising unauthorized | anywhere in Zope traditionally pops up a basic auth box rather than | returning standard_error_message with a 403 response which, as time goes | by, I'm starting to think is what should really happen. Yes! That too. | 1. Should things change to work as I describe? I would think so. OK, but I would prefer more opinions on this, so moving to [EMAIL PROTECTED] | 2. Is the above behaviour pluggable at all? Not at all. Should it be? Can it be without impacting on performance? | 3. How does PAS handle failover from one authentication plugin to the next? /me leaves slot for PAS experts to fill ... | 4. What kicks off the authentication process in Zope? Something being | anonymously viewable or credentials being found in the request? I've been looking at BaseRequest.traverse(). Basically, it tries to validate REQUEST._auth, What does? And what does validate mean in this context? being it set or not *wink* (when using Right, and that was the source of the other thread? CookieCrumbler it's this variable is set from the cookie value) and that may result in a valid user or 'Anonymous User'. Yeah, but how does CookieCrumbler stop a basic auth box being popped to the user when things aren't authorized? | PS: I suspect the answer to 4 varies depending on the type of auth :-( I don't think so. CookieCrumbler vs Everything Else: I think it does... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ 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] Turning off product installation in zope.conf on all zeo clients?
On Wed, Apr 20, 2005 at 02:50:21PM +0100, Chris Withers wrote: Jens Vagelpohl wrote: From what I understand it prevents the installation/writing of a product into the ZODB (the products management part of the Control_Panel) and thus prevents conflict errors. If the product is already installed (e.g. by a client who is allowed to do so) then you can instantiate instances of your new product. So if not clients do the installation, I would not be able to instantiate objects? AFAIK: At minimum, you need one client to do the installation once. After that, you can turn it off forever on all clients (until you install more products). -- Paul Winkler http://www.slinkp.com ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Zope-Coders] Unauthorized results in 401, shouldn't it result in 403?
On Wed, Apr 20, 2005 at 04:20:26PM +0100, Chris Withers wrote: | | 2. Is the above behaviour pluggable at all? | | Not at all. | | Should it be? Can it be without impacting on performance? I don't think so. I would expect there's only one sane way to do it. | | 4. What kicks off the authentication process in Zope? Something being | | anonymously viewable or credentials being found in the request? | | I've been looking at BaseRequest.traverse(). Basically, it tries to | validate REQUEST._auth, | | What does? And what does validate mean in this context? Did you read what I type? It's in BaseRequest.traverse(). Read the source, I can't summarize 100 lines of python in one sentence. | being it set or not *wink* (when using | | Right, and that was the source of the other thread? The source of the other thread is that falling back to unauthorized smells wrong, but I can see at least one case where changing this might break existing apps. | CookieCrumbler it's this variable is set from the cookie value) and | that may result in a valid user or 'Anonymous User'. | | Yeah, but how does CookieCrumbler stop a basic auth box being popped to | the user when things aren't authorized? Basically it monkeypatches RESPONSE.unauthorized() and RESPONSE._unauthorized(). if not req.get('disable_cookie_login__', 0): if attempt == ATTEMPT_LOGIN or attempt == ATTEMPT_NONE \ or attempt == ATTEMPT_RESUME: # Modify the unauthorized response. req._hold(ResponseCleanup(resp)) resp.unauthorized = self.unauthorized resp._unauthorized = self._unauthorized -- Sidnei da Silva [EMAIL PROTECTED] http://awkly.org - dreamcatching :: making your dreams come true http://www.enfoldsystems.com http://plone.org/about/team#dreamcatcher Mais sujo que pau de galinheiro. ___ 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] Turning off product installation in zope.conf on all zeo clients?
On Apr 20, 2005, at 15:50, Chris Withers wrote: Jens Vagelpohl wrote: From what I understand it prevents the installation/writing of a product into the ZODB (the products management part of the Control_Panel) and thus prevents conflict errors. If the product is already installed (e.g. by a client who is allowed to do so) then you can instantiate instances of your new product. So if not clients do the installation, I would not be able to instantiate objects? Yes, and the new product will not show up under Control_Panel/Products, that's my understanding. Should be easy to test, though. jens ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Zope-Coders] Unauthorized results in 401, shouldn't it result in 403?
On 2005-04-20 11:20:26 -0400, Chris Withers [EMAIL PROTECTED] said: Sidnei da Silva wrote: | 3. How does PAS handle failover from one authentication plugin to the next? /me leaves slot for PAS experts to fill Each attempt at authenticating a particular set of credentials gets a crack, and either stands up for the creds, or returns None. CookieCrumbler it's this variable is set from the cookie value) and that may result in a valid user or 'Anonymous User'. Yeah, but how does CookieCrumbler stop a basic auth box being popped to the user when things aren't authorized? By intercepting the RESPONSE's unauthorized() method. It's pretty plainly there in the code. FWIW, this is how PAS insinuates itself into the process as well, but to allow for any of the challenge plugins to fire this way. | PS: I suspect the answer to 4 varies depending on the type of auth :-( I don't think so. CookieCrumbler vs Everything Else: I think it does... Well, not in PAS ;^) Zac ___ 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] ZPsycopgDA dropping connections?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 20 Apr 2005 03:23 pm, Richard Jones wrote: Has anyone else seen ZPsycopgDA just lose its connection? I just looked in Shared/DC/ZRDB/Connection.py If the connection string is empty (which is quite valid for my setup, as it turns out) then the DA won't connect automatically. It won't even try. Could this be considered a bug, or am I missing something obvious? Richard -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFCZe/vrGisBEHG6TARAlfdAJ0ajEyBaGgTMMH+0bjL3NXv0g/UaQCeMDvD oJ1HMFf0yhXhE8OwQSzwFYI= =cmtl -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] ZCatalog and custom Product
Hi, I need to convert a ZClass cataloged in multiple ZCatalogs into a Product. I know how to create a Product. But I have trouble understanding how to create a proper ZCatalog and manage it in a Product. When I change my ZClass instance, it reindexes itself in multiple ZCatalogs. I have the following DTML method edit in my ZClass (stored in ZODB) that takes care of this: dtml-call manage_editCataloger('Catalog_A') dtml-call reindex_object dtml-call manage_editCataloger('Catalog_B') dtml-call reindex_object How should this be programmed in Products? - Should I first create a ZCatalog instance in ZODB, and then bind this instance to my Product? That would make my Product not self-contained. - or should the Product rather create ZCatalog instance during its initialization? That would mean that upon Zope restart, ZCatalog instance would be removed and re-created and all Product instances would have to be recataloged. In my new Product (that is to replace my ZClass), I put this line: from Products.ZCatalog.ZCatalog import ZCatalog and I added ZCatalog to the list of subclassed classes: class ArtBase(ZCatalog, ObjectManager, SimpleItem, PropertyManager, JMZPTMacros): but I have no idea what to do next. In this mailing list's archive, Chris Withers wrote that ZCatalog should be an attribute of a product's instance so that I can open the ZCatalog management interface by calling my_prod_instance/catalog_name/manage. I understand that, but I have no idea how to achieve it. Should I add a line to my class __init__ ? Something like: def __init__(self,id,title=''): Contructor method to initialize the properties of our class #Create and initilize the class attributes self.id=id self.title=title self.catalog=manage_addZCatalog(id=catalog, title=title) but the above looks fishy because I would have an isolated catalog for each new instance of my class... To support manage_editCataloger and reindex_object, do I need to import both ZCatalog from Products.ZCatalog and CatalogAware from Products.ZCatalog.CatalogAwareness ? -- Milos Prudek ___ 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] Multipart/alternative Emails
Hello, I'm trying to perform a multipart/alternative email message with combination of sendmail-, mime- and boundary-tag. Here is the code: dtml-sendmail mailhost=MailHost To: [EMAIL PROTECTED] From: [EMAIL PROTECTED] Subject: password dtml-mime type=multipart/alternative encode=quoted-printable dtml-boundary type=text/plain encode=quoted-printable plain text... dtml-boundary type=text/html encode=quoted-printable html .. here the HTML-Code /html /dtml-mime /dtml-sendmail But the resulting email is still of type multipart/mixed, what is wrong here? (I'm using Zope 2.7.3 with Python 2.3.4 on Win XP SP2) Thanks in advance Regards Thomas ___ 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] Organisational vs. Functional hierarchies
David Given wrote: On Tue, 2005-04-19 at 18:43 +0200, bruno modulix wrote: [...] All of B's siblings are the same sort of object. Why do you have this strange idea ? From, uh, the documentation... because all of B's siblings will inherit the same methods from A. s/inherit/acquire/ [...] Then calls like: Rose/Text/MyFavouriteRoseStories/text_methods/do_this Ah, so *that's* how acquisition by context works! (I couldn't find any documentation on this. All the documentation about acquisition by context just says 'this is really complicated and I'm not going to describe it here'.) It *is* really complicated, and I'd advise you not to go for this solution. What you want is clearly a Product. 2/ Write a product for your object types. Here it could be a Flower object, extending Folder so you can put texts and images in, and having all the code needed for your texts and images. Unfortunately, this requires having the code dealing with text and images to be in the same place, which breaks encapsulation. Why ? What you want is a custom Flower object, that can handle texts and images, right ? But if this bother you too much, you can add to your product specific texts and images classes (remember, a product is a componant, not a class - it can be composed of multiple classes, templates, images, external methods etc). (snip) Meh. Can you point me at any good tutorial documentations? google for zope + minimal product. Also read the developper's book on zope.org. And read the code of a few products. That's how I did anyway. -- Bruno Desthuilliers Développeur [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] ZCatalog and custom Product
Milos Prudek wrote: Hi, I need to convert a ZClass cataloged in multiple ZCatalogs into a Product. I know how to create a Product. But I have trouble understanding how to create a proper ZCatalog and manage it in a Product. To answer myself, simply follow Garito's advice of 10.6.2004 in mailing list archive. Now the only problem is multiple catalogs. I need to catalog my class into Catalog_A, Catalog_B and Catalog_C upon instantiation. class MyClass(CatalogPathAware): def __init__(): self.manage_editCataloger(Catalog_A) self.index_object() The above code catalogs the instance into Catalog_A. Okay, but self.manage_editCataloger(Catalog_A) self.index_object() self.manage_editCataloger(Catalog_B) self.index_object() self.manage_editCataloger(Catalog_C) self.index_object() ... the above code catalogs the instance into Catalog_C, but not into Catalog_A and not into Catalog_B. Does anyone know why Catalog_A and Catalog_B are ignored? -- Milos Prudek ___ 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] ZCatalog and custom Product
Milos Prudek wrote: The above code catalogs the instance into Catalog_A. Okay, but self.manage_editCataloger(Catalog_A) self.index_object() self.manage_editCataloger(Catalog_B) self.index_object() self.manage_editCataloger(Catalog_C) self.index_object() ... the above code catalogs the instance into Catalog_C, but not into Catalog_A and not into Catalog_B. Does anyone know why Catalog_A and Catalog_B are ignored? Using CatalogPathAware with multiple catalogs is asking for trouble, since it's onyl designed to support one catalog ;-) I'd suggest not using it in your case. Just write your own index_object method that does what you really want it to... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ 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] ZPsycopgDA dropping connections?
Richard Jones wrote: I just looked in Shared/DC/ZRDB/Connection.py If the connection string is empty (which is quite valid for my setup, as it turns out) then the DA won't connect automatically. It won't even try. Could this be considered a bug, or am I missing something obvious? Most of Shared/DC/ZRDB/Connection.py could be considered a bug ;-) But yeah, this one might not be a total bitch to fix, unlike everything else in there... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problem with Zope Threads on Debain
David wrote: I have installed the zope debian (sarge) package. The default number of threads is 4 but only one thread is running. I installed this package in several machines and I have this problem in everyone. How are you deducing that only one thread is running? Chris I do : ps -aux . There is one zope process (user : zope) running in every moment : zope 19004 0.3 11.0 171460 114380 ? S09:58 0:16 /usr/bin/python2.3 /usr/lib/zope2.7/lib/python/Zope/Startup/run.py -C /var/lib/zope2.7/instance/ ... However, there are a lot of apache process (6) running. Do you know another way to obtain the number of zope threads running? ___ 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] [ANN] Zope 2.7.6 beta 2 released
Dear Zope Community, on behalf of Zope Corporation and all Zope 2 developers and contributors I am pleased to announce the release of Zope 2.7.6 beta 2 Zope 2.7.6 beta 2 can be downloaded from http://www.zope.org/Products/Zope/2.7.6b1 The release notes can be found at http://www.zope.org/Products/Zope/2.7.6b2/CHANGES.txt This release also includes the security hotfix from 2005-04-05. It is highly recommended to upgrade existing installations or to install at least the hotfix and wait until 2.7.6 final will be out (in about two weeks). This release also contains several fixes for running Zope on Windows. All Zope windows users are invited to test the improvements *now* and not to wait until the final release. TEST NOW and help that related bugs are fixed *FOR THE FINAL* release and *AFTER THE FINAL* release. For information on using Python 2.4 with Zope 2.8: see doc/INSTALL.txt Andreas Jung Zope 2 Release Manager pgpYTSVRbNAVJ.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Pass index in a TAL path expr
Hello, if data is a tuple (or list), how can directly access it's contents using path expressions, like in: -- script s: return context.t(data=(one, two, three)) -- template t htmlbody span tal:replace=options/data/0/span /body/html The above example give out a TypeError for the index... options/data/0 is not correct. What should i set the path to? ___ 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] Pass index in a TAL path expr
--On Mittwoch, 20. April 2005 13:14 Uhr +0300 Vangelis Mihalopoulos [EMAIL PROTECTED] wrote: Hello, if data is a tuple (or list), how can directly access it's contents using path expressions, like in: -- script s: return context.t(data=(one, two, three)) -- template t htmlbody span tal:replace=options/data/0/span /body/html The above example give out a TypeError for the index... options/data/0 is not correct. What should i set the path to? You have to use python: data[0]. Your notation is not supported. -aj pgpHvXiBrRqMD.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problem with Zope Threads on Debain
On Apr 20, 2005, at 5:43 AM, David wrote: I do : ps -aux . There is one zope process (user : zope) running in every moment : zope 19004 0.3 11.0 171460 114380 ? S09:58 0:16 /usr/bin/python2.3 /usr/lib/zope2.7/lib/python/Zope/Startup/run.py -C /var/lib/zope2.7/instance/ ... However, there are a lot of apache process (6) running. Do you know another way to obtain the number of zope threads running? Apache spawns multiple processes, not threads. (that changes a bit with Apache 2, but lets ignore that for the moment.) Zope uses threads instead. The Linux kernel, before version 2.6 had relatively primitive thread support, and built threads out of multiple processes with some memory sharing. Linux 2.6 has more advanced thread support that supports the pthread standard. One side effect of real pthreads is that all threads are really within the same process. If you use the command and options ps auxm, you will see displayed the threads within the process. ___ 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] Organisational vs. Functional hierarchies
On Tue, 2005-04-19 at 13:40 -0400, Paul Winkler wrote: [...] Sure, but that doesn't constrain the types you can add to a folder. Unfortunately if you want the same method to do something different on a text file than on an image then you can't put them in the same folder... if you want to do it like that. [...] Meh. Can you point me at any good tutorial documentations? http://zopewiki.org/DiskBasedProduct Ta. I'll check it out, although I suspect a ZClass may be more what I want... need to do some more reading up. -- +- David Given --McQ-+ [One shot of the Death Star's superlaser has | [EMAIL PROTECTED]| enough power] to send Marty McFly to the Big Bang | ([EMAIL PROTECTED]) | and back 1.4x10^29 times. --- William Clifford +- www.cowlark.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] [python script] problem with AUTHENTICATED_USER
I have problem with my python script. I want to check if a user has a the manager role, and add an option in a menu in this case Here is my script: for el in rep.objectValues('Folder'): if el.id==Administration and AUTHENTICATED_USER.has_role(self, [Manager]): #add option to the menu but Zope displays me an error: Error Type: NameError Error Value: global name 'AUTHENTICATED_USER' is not defined I don't know what is the problem. I use sessionUserFolder (a Zope products), so I think it could be the reason of the problem. Thank you for your help ___ 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] [python script] problem with AUTHENTICATED_USER
I have another problem (not in relation with AUTHENTICATED_USER): I would like to know if a special function exists to transform special char in html (like HTMLentities in PHP or escape in javascript) ___ 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] [python script] problem with AUTHENTICATED_USER
--On Mittwoch, 20. April 2005 16:30 Uhr +0200 [EMAIL PROTECTED] wrote: I have problem with my python script. I want to check if a user has a the manager role, and add an option in a menu in this case Here is my script: for el in rep.objectValues('Folder'): if el.id==Administration and AUTHENTICATED_USER.has_role(self, [Manager]): #add option to the menu The recommended way to determine the current user is: from AccessControl import getSecurityManager() user = getSecurityManager().getUser() -aj pgp66uBdPyIaN.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Organisational vs. Functional hierarchies
Ta. I'll check it out, although I suspect a ZClass may be more what I want... need to do some more reading up. Don't use ZClasses. They have been deprecated for more than a year and they are poorly supported. -- Milos Prudek ___ 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] [python script] problem with AUTHENTICATED_USER
hi: AUTHENTICATED_USER is in REQUEST: hence you could write ... self.REQUEST.AUTHENTICATED_USER.has_role(self, [Manager]) ... regards, juergen herrmann [ [EMAIL PROTECTED] wrote:] I have problem with my python script. I want to check if a user has a the manager role, and add an option in a menu in this case Here is my script: for el in rep.objectValues('Folder'): if el.id==Administration and AUTHENTICATED_USER.has_role(self, [Manager]): #add option to the menu but Zope displays me an error: Error Type: NameError Error Value: global name 'AUTHENTICATED_USER' is not defined I don't know what is the problem. I use sessionUserFolder (a Zope products), so I think it could be the reason of the problem. Thank you for your help ___ 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 ) ___ XLhost.de - eXperts in Linux hosting Juergen Herrmann Weiherweg 10, 93051 Regensburg, Germany Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 ICQ: 27139974 - IRC: [EMAIL PROTECTED] WEB: http://www.XLhost.de ___ 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] Zope on cdrom
Hi, it was a burning problem. In fact, if you want to use your cdrom both on windows and linux, you need to burn with rockridge AND joliet extensions... If not, it doesn't work. That was my case because i used vmware and burned my cdrom under windows. Now, it works fine. Thanks for your help. cheers, Nip Chris Withers wrote: Nicolas Perrier - Zindep wrote: File /mnt/cdrom/python/lib/python2.3/asyncore.py, line 543, in __init__ flags = fcntl.fcntl(fd, fcntl.F_GETFL, 0) AttributeError: 'module' object has no attribute 'fcntl' Somebody can it help me? Is there any other handbook? Thanks. This looks more like you are trying ot use zopectl on Windows than anything to do with being on a CDROM. Is that the case? cheers, Chris ___ 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] Organisational vs. Functional hierarchies
On Wed, Apr 20, 2005 at 04:38:06PM +0200, Milos Prudek wrote: Ta. I'll check it out, although I suspect a ZClass may be more what I want... need to do some more reading up. Don't use ZClasses. They have been deprecated for more than a year and they are poorly supported. Poorly supported, yes; officially deprecated, no. See the recent thread on this list, Does anyone care whether we deprecate ZClasses? In which Jim Fulton said, among other things: ...I'm not advocating that [removing ZClasses from zope 2.10]. I was asking if anyone cared. I strongly suspected that there would be people who did care. ... Many active Zope developers are (understandbly) dismissive of ZClasses, but I think we can't ignore the many people who depend on them. My interpretation: they aren't going away, but think twice before you get heavily invested in them now. -- Paul Winkler http://www.slinkp.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] Organisational vs. Functional hierarchies
On Wednesday 20 April 2005 16:53, Paul Winkler wrote: [...] My interpretation: they aren't going away, but think twice before you get heavily invested in them now. Well, having done some research, they do appear to be precisely what I'm looking for. They're simple, fast to develop, and everything can be done through ZMI, which is a huge plus. The actual amount of code I want to write is minimal; it looks like what I'll have is a subclass of File that processes its content and passes it as a parameter into a page template on itself. (What I actually want is a lightweight RestructuredText thing with more customisability.) It should be pretty trivial. Any gotchas I should know about? What other approaches are there to doing this kind of thing, other than writing a fully-fledged Product? -- +- David Given --McQ-+ | [EMAIL PROTECTED]| Quidquid latine dictum sit, altum viditur. | ([EMAIL PROTECTED]) | +- www.cowlark.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] Organisational vs. Functional hierarchies
On Wed, Apr 20, 2005 at 05:51:17PM +0100, David Given wrote: Any gotchas I should know about? I dunno, I never use 'em :-) What other approaches are there to doing this kind of thing, other than writing a fully-fledged Product? For creating new TTW types? I don't know of any, but that's not a use-case I need so I haven't gone looking. -- Paul Winkler http://www.slinkp.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] Zope support for Blender .blend files
I would like to know more about how much an Apache-enabled Zope server supports hosting and distributed editing of Blender .blend files. ___ 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] Zope via WebDAV
I am trying to use Zope with Dreamweaver via WebDAV. There are lots of good docs and plenty of info in the archives and I have one install setup and working really well. The one that works is Zope 2.7.4 on Win32. An older, production install I want to configure the same way is Zope 2.6.2 on a RedHat 9.0 machine, but it is not working. The trouble I am having with that one is that it downloads all ZPT files without their TAL and METAL tags, and then when uploading, it overwrites the good ones. Munges them, as I think I've seen it typed before. Is this just due to some changes between versions, or platforms, or...? I have tried connecting via WebDrive, directly to the zserver WebDAV port and via Apache proxy with the same results. Thanks for any info you can provide. ___ 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] Zope support for Blender .blend files
On 21/04/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I would like to know more about how much an Apache-enabled Zope server supports hosting and distributed editing of Blender .blend files. A file's a file, it'll be served just like a GIF, JPEG, Spreadsheet or text document. It might not have the correct MIME type associated automatically, but that's easy to fix. -- Phillip Hutchings http://www.sitharus.com/ [EMAIL PROTECTED] / [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] Zope2.7.4 with Python2.4?
Luis N wrote: Hi, I fired up zope on a new server yesterday. It's very very slow! I didn't think about it much at first (because I didn't think it possible), but, sh bin/runzope /usr/local/lib/python2.4/whrandom.py:38: DeprecationWarning: the whrandom module is deprecated; please use the random module DeprecationWarning) trimmed line 99, in ? import psycopg ImportError: No module named psycopg /trimmed /usr/local/bin/python2.3 Python 2.3.4 (#2, Jan 1 2005, 23:02:40) [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4 Type help, copyright, credits or license for more information. import psycopg Zope appears to be defaulting, and running with Python2.4 Forgive my newbieness, but might this be because I did something silly like: python mkzopeinstance.py rather than, /usr/local/bin/python2.3 mkzopeinstance.py when the instance was first created? ___ 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 ) If you want Zope to use the Python located at path_to_python, you must run configure with --with-python ./configure --with-python=path_to_python In your case that's ./configure --with-python=/usr/local/bin/python2.3 ___ 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] Zope via WebDAV
I see - I was connecting to port 8090 - the regular old HTTP port instead of port 9090 - my configured WebDAV port. Works just fine now. Erik Myllymaki wrote: I am trying to use Zope with Dreamweaver via WebDAV. There are lots of good docs and plenty of info in the archives and I have one install setup and working really well. The one that works is Zope 2.7.4 on Win32. An older, production install I want to configure the same way is Zope 2.6.2 on a RedHat 9.0 machine, but it is not working. The trouble I am having with that one is that it downloads all ZPT files without their TAL and METAL tags, and then when uploading, it overwrites the good ones. Munges them, as I think I've seen it typed before. Is this just due to some changes between versions, or platforms, or...? I have tried connecting via WebDrive, directly to the zserver WebDAV port and via Apache proxy with the same results. Thanks for any info you can provide. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Organisational vs. Functional hierarchies
On 4/21/05, David Given [EMAIL PROTECTED] wrote: The actual amount of code I want to write is minimal; it looks like what I'll have is a subclass of File that processes its content and passes it as a parameter into a page template on itself. (What I actually want is a lightweight RestructuredText thing with more customisability.) It should be pretty trivial. Any gotchas I should know about? careful what you subclass. don't do what i did (in 2000); subclass all the classes i think i want. now, i have to make sure all the dependent products are installed. some of them are not actually maintained anymore. What other approaches are there to doing this kind of thing, other than writing a fully-fledged Product? write a simple basic product. and subclass that for your zclass here's what i did: http://myzope.kedai.com.my/blogs/kedai/20 -- +- David Given --McQ-+ | [EMAIL PROTECTED]| Quidquid latine dictum sit, altum viditur. | ([EMAIL PROTECTED]) | +- www.cowlark.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 ) -- http://myzope.kedai.com.my - my-zope org ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope-DB] Returning values from Oracle function/procedure withZSQLMethod
M.-A. Lemburg wrote: Not sure why they think that ODBC is deprecated - Oracle is happily working on their ODBC driver and it's one of the best bets you can find out there: http://www.oracle.com/technology/software/tech/windows/odbc/index.html Interesting, but people here, even M$ people, haven't been using ODBC for years... Sadly, not in the slightest. For me, only normal oracle listeners will ever be available :-( Would a native Oracle interface help ? Yeah, and that's what DCOracle2 is, right? If you're telling me you have a real live decent quality native oracle interface, then I'm all ears :-) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db