[Zope-dev] RFClarification: Security on Product Attributes
Hi, If I have the following lines in a Python Product: def __init__(self, id): """initialise a new instance of product""" self.id = id self.title = 'Title!' self.anInt = 0 self.aString = 'testing' Are these attributes protected by the security machinery? If so, how so? Can I read them? I think the answer is yes for anInt and no for aString. Don't know the mechanics of title and id, I'm guessing they're going to be special cases whatever... Are they protectable by permissions? I do hope so although my experience is that, at best, it's not necessary, which is contrary towhat I thought the new security policy was. Should they have to be protected by permissions? Probably... Looking for comments-ly, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] MySQL : help !
I need the binarie file named _msql does anybody got it (for any Linux)? Because I can't build this file : I've got too many errors Thanks in advance Jérôme DIEBOLD ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] __call__ hell :-(
:-( Right, I have a Python product with a __call__ method that is (hopefully) going to be used to render a navigation tree. To do this (and have the tree expand in the right places) I need a list of objects that need to be expanded. I'm currently using the following expression to get this list: objects = copy(self.REQUEST.PARENTS) objects.reverse() Now, to this I need to append the PARENTS[0-1] object, if you see what I mean. In DTML, it would be this(), but I'm stumped as to what I should append in Python. self is just the navigator object. If I redefine __call__ as def __call__(self, client, REQUEST) I just get a TypeError: Error value: not enough arguments; expected 3, got 1 If I use a safer signature def __call__(self,client=None) then client is always None, and so not what I'm after at all. I had a look at DTMLMethod.py and PythonMethod.py to try and get a clue btu just got very scared. Can someone please help me out here? cheers, Chris PS: If there's a totally different way to get the containment list of objects that need to be expanded, I'd love to hear it :-) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] aq_inner: don't call it!
Chris Withers wrote: After more playing I've discovered that calling the resutl of aq_inner() appears to be a very bad idea ;-) The line: print self.aq_inner() in the __call__ method of a python product caused the python process to dump an 'unknown software exception'. Should that be so? No. Sound's like a bug. Would you mind submitting a collector entry? Also, I thought aq_inner gave the contaiment context (presumably as a list?) but it just returns a single object. It returns the innermost wrapped objects. IOW, it stips off all levels of wrapping except one. So, how can I get the containment context of an object as a list? See: http://www.zope.org/Members/michel/Projects/Interfaces/AcquisitionModuleInterface In particular: Acquisition.aq_chain(ob,1) More acquisition pointers can be found at: http://www.zope.org/Members/michel/Projects/Interfaces/Acquisition Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Technical Director (888) 344-4332 Python Powered! Digital Creationshttp://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] aq_inner crash: Python 1.5.2's fault? (also how to get the client)
Chris, Have you tried Christian Tismers Stackless Python, which has 'infinite' recursion capabilities? www.stackless.com Phil - Original Message - From: "Chris Withers" [EMAIL PROTECTED] To: "Jim Fulton" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, September 26, 2000 2:09 PM Subject: [Zope-dev] aq_inner crash: Python 1.5.2's fault? (also how to get the client) Jim Fulton wrote: The line: print self.aq_inner() in the __call__ method of a python product caused the python process to dump an 'unknown software exception'. Should that be so? No. Sound's like a bug. Would you mind submitting a collector entry? Not at all, but... Toby Dickenson wrote: I bet you are using python 1.5.2 on Windows. I am, Toby's explanation sounds accurate. So, does this go in the Zope collector or the Python collector? If the later, does anyone know if it is in there already? Jim Fulton wrote: http://www.zope.org/Members/michel/Projects/Interfaces/AcquisitionModuleInte rface http://www.zope.org/Members/michel/Projects/Interfaces/Acquisition ...very useful links :-) In particular: Acquisition.aq_chain(ob,1) How would this differ from getPhysicalPath(ob)? Is it just that getPhysicalPath won't contain any acquired objects, if you see what I mean? I think something ob.getPhysicalPath() is probably what I want, but if you read my post titled "__call__ hell :-(" you'll see I can't actually find the object I'd need to call getPhysicalPath() on. I think it's the 'client' I'm looking for but I have no idea for to get that in the __call__ method of my python product. Any ideas? (if it helps, the __call__ method is executed as the result of a dtml-var myObject which appears in standard_html_header) cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Testing Zope applications
On Tue, 26 Sep 2000 07:42:29 -0400, Jim Fulton [EMAIL PROTECTED] wrote: Toby Dickenson wrote: I'm not sure exactly what problem you are refering to. It sound's like an issue of depending on a specific acquired name and having the name overridden with something bogus. Is that it? There are two related issues that conspire to make the problem hard: A. What you descibe above, that looks like it will be fixed in part by NO_SUBOBJECTS_OVERRIDE (which looks great). The outstanding issue is what happens when a new version of a product wants to add a new NO_SUBOBJECTS_OVERRIDE name (when objects of that name may already exist in old subobjects). I think that there should be some discussion of this design pattern. Specifically, I'm not sure I like the idea of an application that depends on fixed names in a hierarchy. In fact, I know I don't. :) The technique isnt nice, but its hardly unconventional. the REQUEST object (as in self.REQUEST) is a good example. *I* would like to see this discussion happen in a Wiki, but I won't insist. :) FWIW, it will be much more likely for me to make comments in a wiki, especially if someone sends me the wiki link when they are ready for comments. I start something later this week. Toby Dickenson [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] aq_base, aq_base() and infinite recursion...
Chris Withers wrote: Phil Harris wrote: Have you tried Christian Tismers Stackless Python, which has 'infinite' recursion capabilities? I'm not sure this would be entirely helpful here ;-) I wonder what aq_base(), over aq_base, does that causes an infinite recursion? Maybe I should still stick this in the collector... aq_base is not a method (nor is aq_inner). "wrapped_object.aq_base()" just unwraps wrapped_object then tries to execute __call__() on the unwrapped object. If there is infinite recursion that results, there's a 99.9% chance that the object simply isn't supposed to be called when unwrapped (which DTML can't do anyway because of security checks.) Shane ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] more __call__ ...
On Tue, 26 Sep 2000 16:11:50 +0100, Chris Withers [EMAIL PROTECTED] wrote: So, if I give my product a class attribute of isDocTemp=1, what signature should I give my product's __call__ method so it picks up the DTML namespace? Interestingly, Ive just put a HowTo that does this http://www.zope.org/Members/htrd/howto/FunctionTemplate This is a wrapper that that lets an old dtml file be replaced with a python function, without having to update all the old dtml files that call it. In other words, Internalized External Methods ;-) Why? Because Ive only just realized how error-prone non-trivial dtml can be.(and how ugly error-free dtml is) hth, Toby Dickenson [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: more __call__ ...
From: "Jim Fulton" [EMAIL PROTECTED] We are going to provide an alternate interface, so that if an object has a special method, then this will be called instead. okay... which proposal/project is this in? I don't remember. Evan? PythonMethods, essentially, unless you'd really like me to make this a separate project. It's *such* a small change, tho. Cheers, Evan @ digicool 4-am ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] ZServer and ftp port-1 data channel
It appears we still have a problem with ZServer's port 20 data channel response behavior with the latest released Zope (Zope 2.2.1 (source release, python 1.5.2, linux2) and Active Mode ftp clients. In particular, when you select the port-1 behavior, medusa can't seem to bind to port 20 when port 21 command channel is specified. "ftp_server.py" line 278: if self.bind_local_minus_one: cdc.bind (('', self.server.port - 1)) After verifying that self.server.port - 1 = 20, the current behavior is that medusa simply hangs at the bind statement. If there was a permissions problem my understanding (and experience) is that one would receive: socket.error: (13, 'Permission denied') and not a process hang. Any idea why medusa simply hangs on the attempted bind? Thanks ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] more __call__ ...
Chris Withers wrote: Jim Fulton wrote: So, if I give my product a class attribute of isDocTemp=1, what signature should I give my product's __call__ method so it picks up the DTML namespace? def __call__(self, ignored, md): ... Right, now if I call other DTML methods from my __call__ method, can I just call them with: self.nav_header(self, ignored, md)? No: self.nav_header(None, md) In any case, what is self in __call__(self, ...) and what should it be in nav_header(self, ...)? Python method signatures always begin with an argument that is the instance to which they are bound. (snip) In either case, what do I need to go to get hold of what would be PARENTS[0-1], if you see what I mean? I don't see what you mean. http://a.site/folder/object/myobject myobject contains dtml-var standard_html_header standard_html_header contains dtml-var mynavigator Is myobject a DTMLMethod? Some kind of container? I don't see how it can contain a var tag if it's not DTML. If it is DTML, I don't see where mynavigator fits in. __call__ is a method of the Navigator product, of which mynavigator is an instance. Anyway, in that __call__, self.REQUEST.PARENTS = [zope-app,folder,object] (roughly) By PARENTS[0-1], I meant the myobject object, itself. Uh OK. Hurm, I'm finding this hard to explain clearly, let me know if I'm getting closer :-S OK, you've snipped the orignal question, so I'm off the hook. :) (I don't really know if you want me to comment on anything else here.) I think that if you say: dtml-var expr="foo.bar" that foo's namespace should take precedence over the DTML namespace, Okay, I see what you mean now :-) render? Well, a number of people have suggested that there should be a separate render (ie call as subtemlpate) interface. Maybe that's what what you meant. Nope... DT_Var.py line 258: def render(self, md): ...is what I think the people who mentioned it to me were talking about. Ok, well that's that's part of the DTML tag interface, which I assume you aren't interested in. (snip) If there's an easier way to get this from within the __call__ method of a python product, someone PLEASE tell me! ;-) aq_chain(x, 1)[-1:] should give this to you, I believe, or be very close. :) Won't that just return x? (hmm... does aq_chain return [child,...,parent] or [parent,...,child]?) [child ... parent] I think the hard part fo the problem I'm trying to solve is finding out what x is from within the __call__ method. Any help muchly appreciated, sorry this is takign such a long time to sort out in my head... ;-) The Zope debugger is your friend. It's a good way to find out some details like this. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Technical Director (888) 344-4332 Python Powered! Digital Creationshttp://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZServer and ftp port-1 data channel
Here's what Sam Rushing told me regarding this issue. Shane Hathaway writes: I hear that you have found a way to get Medusa to use the correct port in active mode FTP. This could be a great benefit to the Zope community. Anything you have (diffs, modified files, or any kind of info) on the subject would be very much appreciated. (Sam writes:) Is this the 'L-1' thing? Where the server-side port for the data channel is supposed to be '20' (I think that's right). I made some changes to the server to support it, but it's disabled by default; because 1) most people don't care 2) it has the potential to break the whole server in certain situations, depending on the OS. Other ftp servers get all acrobatic trying to Do The Right Thing, IMHO not worth it in medusa's case. See the 'bind_local_minus_one' variable of the ftp_channel class. This should be checked into the medusa cvs, but I'll attach a copy as well. --- The next email: --- Shane Hathaway writes: wu-ftpd solves this by temporarily restoring root privileges and actually tries more than once to bind to the correct port, which is ugly. (Sam writes:) It's even worse than that. Here's a quote from proftpd-1.2/src/inet.c: /* According to one expert, the very nature of the FTP protocol, * and it's multiple data-connections creates problems with * "rapid-fire" connections (transfering lots of files) causing * an eventual "Address already in use" error. As a result, this * nasty kludge retries ten times (once per second) if the * port being bound to is INPORT_ANY) */ (...) In other words, it's just bound to fail. A forking server can afford this sort of persistence, but in medusa I think it'd be overkill; I'd have to set up event timers, an object to maintain the retry state, etc [this alone it might add 50% to the size of ftp_server.py] --- I'd have to agree with Sam, it's just not worth the effort. Shane Kent Polk wrote: It appears we still have a problem with ZServer's port 20 data channel response behavior with the latest released Zope (Zope 2.2.1 (source release, python 1.5.2, linux2) and Active Mode ftp clients. In particular, when you select the port-1 behavior, medusa can't seem to bind to port 20 when port 21 command channel is specified. "ftp_server.py" line 278: if self.bind_local_minus_one: cdc.bind (('', self.server.port - 1)) After verifying that self.server.port - 1 = 20, the current behavior is that medusa simply hangs at the bind statement. If there was a permissions problem my understanding (and experience) is that one would receive: socket.error: (13, 'Permission denied') and not a process hang. Any idea why medusa simply hangs on the attempted bind? ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Soft links again
Hi all, First, I'm using Zope 2.2.1 (Debian package). I've been trying to implement zope objects that behave like unix soft links. The message http://lists.zope.org/pipermail/zope-dev/2000-July/005963.html by Shane proposes an implementation based in the __of__ method: class SoftLink (SimpleItem): def __init__(self, path): self.path = path def __of__(self, parent): ob = self.restrictedTraverse(self.path) return getattr(ob, 'aq_base', ob).__of__(parent) but it fails when I try to create an instance: Traceback (innermost last): File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/lib/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_addImportedSubject) File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: manage_addImportedSubject) File /var/lib/zope/Products/LLEU/subjects.py, line 1129, in manage_addImportedSubject (Object: Traversable) File /usr/lib/zope/lib/python/OFS/ObjectManager.py, line 250, in _setObject (Object: Traversable) File /usr/lib/zope/lib/python/OFS/ObjectManager.py, line 236, in _getOb (Object: Traversable) AttributeError: A00 A little of debug shows that the object has been added (line 249, see below), the exception raises when it tries to get the object (line 250). The hasattr function (line 234) returns false but the object has been added (it's in the __dict__) attribute and its __off__ method is called when the hasattr function is called. What I'm doing wrong? Thanks, david ObjectManager.py: class ObjectManager( ... def _setOb(self, id, object): setattr(self, id, object) def _delOb(self, id): delattr(self, id) def _getOb(self, id, default=_marker): 234 if not hasattr(aq_base(self), id): if default is _marker: 236 raise AttributeError, id return default return getattr(self, id) def _setObject(self,id,object,roles=None,user=None, set_owner=1): v=self._checkId(id) if v is not None: id=v try:t=object.meta_type except: t=None self._objects=self._objects+({'id':id,'meta_type':t},) # Prepare the _p_jar attribute immediately. _getCopy() may need it. if hasattr(object, '_p_jar'): object._p_jar = self._p_jar 249 self._setOb(id,object) 250 object=self._getOb(id) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: more __call__ ...
Evan Simpson wrote: PythonMethods, essentially, unless you'd really like me to make this a separate project. It's *such* a small change, tho. No, not at all, just where I can find some docs for this specific bit would be more than sufficient :-) cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Soft links again
"Ibañez Palomar Juan David" wrote: Hi all, First, I'm using Zope 2.2.1 (Debian package). I've been trying to implement zope objects that behave like unix soft links. The message http://lists.zope.org/pipermail/zope-dev/2000-July/005963.html by Shane proposes an implementation based in the __of__ method: (snip) but it fails when I try to create an instance. Try this. I failed to account for the fact that sometimes the object is not in context and therefore the linked object will not be found. def __of__(self, parent): try: ob = self.restrictedTraverse(self.path) except: # We're not in context or the object was not found. Default to self. return self else: return getattr(ob, 'aq_base', ob).__of__(parent) Keep in mind, though, that there are all kinds of security implications. Someone will have to think hard about security before this is viable. OTOH perhaps it's really simple. Try this as the last line instead: return getattr(ob, 'aq_inner', ob).__of__(parent) This way, the security context might be retained. If it doesn't work, try changing the last line to: return ob.__of__(parent) Shane ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZServer and ftp port-1 data channel
On 26 Sep 2000 12:50:00 -0500, Shane Hathaway wrote: Here's what Sam Rushing told me regarding this issue. Shane Hathaway writes: I hear that you have found a way to get Medusa to use the correct port in active mode FTP. This could be a great benefit to the Zope community. Anything you have (diffs, modified files, or any kind of info) on the subject would be very much appreciated. (Sam writes:) [...] See the 'bind_local_minus_one' variable of the ftp_channel class. This should be checked into the medusa cvs, but I'll attach a copy as well. /* According to one expert, the very nature of the FTP protocol, * and it's multiple data-connections creates problems with * "rapid-fire" connections (transfering lots of files) causing * an eventual "Address already in use" error. As a result, this * nasty kludge retries ten times (once per second) if the * port being bound to is INPORT_ANY) */ This does not occur just during 'rapid-fire connections'. AFAI can tell, it *always* fails to bind to port 20 in this case. So I don't think this is the problem. Back to my question - Why would a port 20 bind() lock up the medusa process when absolutely no other transaction is transpiring on the server? Under what condidtions woudla bind() simply stop? - not fail, just fail to return from the bind() call? In other words, it's just bound to fail. A forking server can afford this sort of persistence, but in medusa I think it'd be overkill; I'd have to set up event timers, an object to maintain the retry state, etc [this alone it might add 50% to the size of ftp_server.py] --- I'd have to agree with Sam, it's just not worth the effort. So you are saying ZServer just isn't ever going to support Active ftp clients in the correct port-1 manner? If so, you might want to put a LARGE BANNER disclaimer about this matter as this makes ZServer unusable from most ftp clients that try to access it from behind standard a firewall. (And yes, on checking, it appears that the only OSes we could locate that come with a passive ftp client by default are the BSD's). ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZServer and ftp port-1 data channel
Kent Polk wrote: So you are saying ZServer just isn't ever going to support Active ftp clients in the correct port-1 manner? If so, you might want to put a LARGE BANNER disclaimer about this matter as this makes ZServer unusable from most ftp clients that try to access it from behind standard a firewall. (And yes, on checking, it appears that the only OSes we could locate that come with a passive ftp client by default are the BSD's). I didn't say it, Sam did. :-) But I agree with him. Active mode is becoming deprecated and it would take extraordinary effort for Medusa to support it 100%. The most used FTP clients these days are browsers such as Netscape and IE. They always run in passive mode; in fact you can't turn off passive mode. "wget" runs in passive mode if you use the --passive-ftp option. Almost every FTP client you find on freshmeat or download.com supports passive FTP, including WS_FTP and FTP Explorer. At least in Mandrake 7.x, even the standard ftp command supports passive mode. After logging in, enter "passive". Shane ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: more __call__ ...
From: Chris Withers [EMAIL PROTECTED] Evan Simpson wrote: PythonMethods, essentially, unless you'd really like me to make this a separate project. It's *such* a small change, tho. No, not at all, just where I can find some docs for this specific bit would be more than sufficient :-) http://dev.zope.org/Wikis/DevSite/Projects/PythonMethods/NamespaceObjectInterface ...has the details, such as they are. Cheers, Evan @ digicool 4-am ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] New Proposal: PersistentBlob
Hi all, Yesterday I put up a new proposal on the http://dev.zope.org site that documents my vision of PersistentBlob. The main idea is the be able to mark blocks of strings (text or binary) content for storage in a file system as individual files. (Or blobs in a relation table.) The two motivations for this are keeping a ZODB FileStorage small and exposing blocks of string content to external processes (i.e. full-text indexing). Thanks for taking a look. John -- John D. Heintz DataChannel, Inc. Senior Engineer 512-633-1198 [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Proposal: Local ZClasses
Problem: Encapsulation for plugable brains and other purposes are too hard. ZClasses are a global kind of thing that requires going into a separate area of the site which you have to have permission to use. Also I find that I evolve my solutions. I will produce something in folders that works for what I want and then try and generalize it into ZClasses later. However if my solution in the folders itself wants to use classes then the only choice I have is external methods or ZClasses. Solution: Local ZClasses: A ZClass that can be created in any folder and is available with the acquisition path. It can then be used for pluggable brains with sql methods also where the Class can be reached in the acquisition path. e.g. I have a few fancy display methods that I use for display results of a sql query for getting phone contact info e.g. create a vCard for each entry. I create a ZClass with a property sheet matching those returned by the sql method. I create my display methods within this ZClass. I associate the sql method with the ZClass. I call the query with dtml-in. Within the loop I have access to the ZClasses methods. Second solution: Prototype objects: A folder is an object with methods etc. A ZClass is not much different except that it has a constructor and a list of the properties that are always there. With a bit of syntax we could make a local folder into a local ZClass. We just need a method that says, using this folder as a prototype, create me a new object. e.g. dtml-call "REQUEST.set('myobj',_.new(users_class, name='Dylan'))". This would effectively make a new non persistent object that inherits from the prototype folder I guess. This could be done with plugable brains as well by just specifying the folder as if it was a class and then new objects would created for each row. If you enable the ability to make these prototype objects persistent then you get the side effect that you can create symbolic links. You can access a whole other acquisition path using inheritance. In fact you could have a property of a folder which is its inheritance objects which you could change over its life time. In fact any object could have this property could affect an objects behavior without moving the object or modifying its underlying classes. Also it would mean overload any kind of object. Just create a folder that inherits from an object or class and add methods. Personally I think the second solution has a lot of merit. What do others think? ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope] Favorites
Hi rishi, rishi wrote: ... The following tihng is going on; they are uploading the bookmark file manualy, by exporting from IE or NS. There is a util called "ImportExportFavorites", a javascript syntax that gets the bookmarks and post them to the server. One has to have a glance at it to say more. --" javascript:window.external.ImportExportFavorites(false,'your server adress') "-- when I use this util, it will send it's data tru the http_user_agent called "favorites", is there a posible way for grabbing the data it is sending into zope ? it will send a file called 'img.fav' Depends. It would always helpful, if you make a dtml_method with just dtml-var standard_html_header dtml-var REQUEST dtml-var standard_html_footer to see whats going on. HTH Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Guess Who . . .
Hi, nice :-) "Spicklemire, Jerry" wrote: . . . has a opening posted on their Web Site for a C/C++ programmer with Zope / Python experience? http://www-3.ibm.com/employment/us/empl/jofK23137.html ... Experience Required Six years work related experience they must be from a different planet ;-) Regards Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Favorites
Thank dewd but dtml-var REQUEST doesn't give the info I'am looking for. I allready tried that and a lot more. I did get a asp script for this but I can't implement it into zope. -Original Message- From: Tino Wildenhain [mailto:[EMAIL PROTECTED]] Sent: dinsdag 26 september 2000 8:27 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [Zope] Favorites Hi rishi, rishi wrote: ... The following tihng is going on; they are uploading the bookmark file manualy, by exporting from IE or NS. There is a util called "ImportExportFavorites", a javascript syntax that gets the bookmarks and post them to the server. One has to have a glance at it to say more. --" javascript:window.external.ImportExportFavorites(false,'your server adress') "-- when I use this util, it will send it's data tru the http_user_agent called "favorites", is there a posible way for grabbing the data it is sending into zope ? it will send a file called 'img.fav' Depends. It would always helpful, if you make a dtml_method with just dtml-var standard_html_header dtml-var REQUEST dtml-var standard_html_footer to see whats going on. HTH Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] multiple ZOPE ...
We host zope using mutliple installations of zope. Yes, that's what we do for our "Professional" Zope hosting. For "FreeZope", you just get your own folder, and it lives under http://freezope.nipltd.net/yourplace. We have a standard list of products, and we don't allow people any more. It is better this way because then the clients can control which products they have installed, they can tweak their products without bothering anyone else, they can stop and restart zope whenever they please...the basically have full control. You can't do that with more than one client using the same instance. All the advantages you mention, plus you can let them upgrade their Zope version when they need it. We want to upgrade FreeZope to 2.2.x at the moment, and its something we need to be cautious about. There are a lot of people on FreeZope, and the move to 2.2 can break a fair number of things. Given its this painful on a free service, I'd hate to be trying to upgrade a shared server that had paying clients. Yes it does use a fair bit of memory, but you would expect your client to pay for it accordingly. Its also requires a fair number of configuration steps (raise the OS account, install Zope, configure Apache, configure MySQL, setup DNS, setup log analysis etc.), which takes time - although we'll probably automate some or all of this at some point. If you allow your customers shell access to the machine you also need much greater security awareness than you'd have for just a normal firewalled web server. Simon -- - My opinions are my own, NIP's opinions are theirs -- Simon J. Coles Email: [EMAIL PROTECTED] New Information Paradigms Work Phone: +44 1344 753703 http://www.nipltd.com/ Work Fax: +44 1344 753742 === Life is too precious to take seriously === ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Download Problems File Extensions
Suzette Ramsden wrote: I have had this same problem downloading squishdot zip files and I don't know if it is something I am doing. When I attempt to unzip the file, I keep getting: "error reading header after processing 0 entries" I've seen this happen due to a couple of things: 1. An archive not being completely downloaded (check the file size in Bytes matches that listed on the download site) 2. Windoze giving the downloaded file the wrong extension. This can get particularly tricky when Windoze plays it's game of hiding file extensions it thinks it knows about. Check the whole file extension matches that from the download site (usually .tar.gz) cheers, Chris You are usign WinZip, aren't you? ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Favorites
rishi, What does the ASP script look like? Send me a copy privately if you want, I'll scan through and see if I can make any suggestions. Phil (ex. ASP thingy 8¬)) [EMAIL PROTECTED] - Original Message - From: "rishi" [EMAIL PROTECTED] To: "'Tino Wildenhain'" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, September 26, 2000 8:29 AM Subject: RE: [Zope] Favorites Thank dewd but dtml-var REQUEST doesn't give the info I'am looking for. I allready tried that and a lot more. I did get a asp script for this but I can't implement it into zope. -Original Message- From: Tino Wildenhain [mailto:[EMAIL PROTECTED]] Sent: dinsdag 26 september 2000 8:27 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [Zope] Favorites Hi rishi, rishi wrote: ... The following tihng is going on; they are uploading the bookmark file manualy, by exporting from IE or NS. There is a util called "ImportExportFavorites", a javascript syntax that gets the bookmarks and post them to the server. One has to have a glance at it to say more. --" javascript:window.external.ImportExportFavorites(false,'your server adress') "-- when I use this util, it will send it's data tru the http_user_agent called "favorites", is there a posible way for grabbing the data it is sending into zope ? it will send a file called 'img.fav' Depends. It would always helpful, if you make a dtml_method with just dtml-var standard_html_header dtml-var REQUEST dtml-var standard_html_footer to see whats going on. HTH Tino ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Use of the :records variable type and ZSQL methods
Calvin Parker wrote: Error Type: Bad Request Error Value: ['Field1', 'Field2'] Here is the code I used and sqlTest is the ZSQL Method that just inserts the two fields into a test DB: dtml-in testlist dtml-call sqlTest /dtml-in What am I doing wrong? you'll have to feed a named argument to your Zsql method (that is in its definition). In this case that would be testlist. Then it should work as expected Here is the Z SQL Method. It takes the arguments Field1 and Field2. that's where the problem is: in your REQUEST there _are_ no Field1 and Field2: they are in the testlist (pseudo) dictionary. notreallytestedbutshouldwork Make you method (something like): dtml-in testlist INSERT INTO Test_Fields (Field1,Field2) VALUES ( dtml-sqlvar Field1 type=nb optional, dtml-sqlvar Field2 type=nb optional ) /dtml-in /notreallytestedbutschouldwork Am I calling testlist incorrectly? I have tried forcing the namespace with the dtml-with tag, but it doesn't seem to be making any difference. Are the arguments field in the Method what you are refering to when you say named argument? I think so (terminology is a bit confusing here). ZSQL methods only take named arguments. There has been quite a bit of threads on this on the list. SO you might want to search the archives for them. In this case the named argument would have to be testlist, as this is the argument REQUEST contains. Rik ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] WorldPilot has the bits...
Any ideas how the sync would be done? WorldPilot has the ability to do this, allegedly. WorldPilot's Palm side of things was still broken last I checked (last week, IIRC) - it was complaining of login errors, though you could login happily through other means. Get the freshest version of the software you can as it might be fixed now. John -- John Chandler / Software Developer / New Information Paradigms Ltd [ Linux in the office, AmigaOS in the home, PalmOS in the pocket ] The opinions above aren't those of my company... ...but then, they aren't really mine either. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Help needed with namespace
Hello all, after updating to Zope-2.2.0 I have problems with ZSQL methods. It seems as if the namespace of ZSQL methods has changed sind Zope-2.1.x. I cannot access the AUTHENTICATED_USER object anymore - it is not known to ZSQL methods: dtml-sqlvar AUTHENTICATED_USER gives an "Missing input variable, AUTHENTICATED_USER" error and dtml-var "AUTHENTICATED_USER.getUserName()" gives "error type: NameError error value: AUTHENTICATED_USER" The security mechanism of my application heavily depends on this object! What has happened to the ZSQL methods? I have already updated to Zope-2.2.2 but with no luck so far. Any help is greatly appreciated, Andreas ** This email message has been swept by MIMEsweeper for the presence of computer viruses. Francotyp-Postalia AG Co. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Newbie-question on ZCatalog
Hi, I'm trying to build a Catalog with a report table just as the one on http://classic.zope.org:8080/Collector/tableBrowse?cfDescAndTitle=catalog That's a table with document-title, date and the first 30 words of the document-content. My problem: how can I insert the content into the ZSearch report-file? Is there a simple way just like finding out the document-url ( here it is dtml-var "catalog.getpath(data_record_id_)" )? Thanks for your help Marc ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] RedHat site mentions Zope (SuSE too!)
I checked: Zope 2.1.6 is shipped with the DeLuxe and Server versions of RedHat 7.0, but not with the Standard edition. They have split Zope into a couple of separate packages. On the web page they mention Zope a couple of times! BTW: Zope (also the 2.1.6) is also on the SuSE 7.0 (Professional) distribution. So Zope is now on most of the major distributions (RedHat, SuSE, Debian)! Am Die, 26 Sep 2000 schrieb John: Yes I saw that too, but when I went to check the package list (to see what version it was) there was no mention of it. John Leach Original Message On 9/25/00, 4:51:04 PM, Stephan Richter [EMAIL PROTECTED] wrote regarding [Zope] RedHat site mentions Zope: Hello everyone, I just saw on www.redhat.com the following: Features for the developer: ... "Popular web application development tools like PHP and Zope" Link: http://www.redhat.com/products/software/linux/rhl7_standard.html Wow, pretty cool. It is only a five bullet list! I guess Zope is winning acceptance rapidly. Regards, Stephan -- Stephan Richter CBU - Physics and Chemistry Student Web2k - Web Design/Development Technical Project Management ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) -- Iuveno - Smart Communication Joachim Werner _ Marie-Curie-Straße 6 85055 Ingolstadt Tel.: +49 841/90 14-325 (Fax -322) Mobil: +49 179/39 60 327 E-Mail: [EMAIL PROTECTED][EMAIL PROTECTED] WWW: www.iuveno.de/www.iuveno-net.de ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] ZClass + ZSQLmethods bug in 2.2.2?
Hi, I've seen lots of ZSQLmethods patches and such and tried a few of them under 2.1.6, but thought upgrading to 2.2.2 would fix this problem. It didn't. Basically: 1. Create a ZClass 2. Inside create a DTML method and ZSQLmethod 3. from the dtml method call the ZSQLmethod 4. do a dtml-with "myClassInstanceObj" dtml-var myMethod /dtml-with 5. get a Unauthorized error no matter what the access privileges are set to This is with the "MySQLda". Is there a newer MySQLda somewhere that fixes this? Or some patch (that works with 2.2.2???)?! Running 2.2.2 from source... now with less hair... Sincerely, Alex. Zope Error Zope has encountered an error while publishing this resource. Unauthorized You are not authorized to access sqlGetValue. Traceback (innermost last): File /Zope-2.2.2/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /Zope-2.2.2/lib/python/ZPublisher/Publish.py, line 187, in publish File /Zope-2.2.2/lib/python/ZPublisher/Publish.py, line 171, in publish File /Zope-2.2.2/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: testmeth) File /Zope-2.2.2/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: testmeth) File /Zope-2.2.2/lib/python/OFS/DTMLMethod.py, line 172, in __call__ (Object: testmeth) File /Zope-2.2.2/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: testmeth) File /Zope-2.2.2/lib/python/DocumentTemplate/DT_With.py, line 146, in render (Object: testcrp) File /Zope-2.2.2/lib/python/OFS/DTMLMethod.py, line 168, in __call__ (Object: craptest) File /Zope-2.2.2/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: craptest) File /Zope-2.2.2/lib/python/DocumentTemplate/DT_In.py, line 633, in renderwob (Object: sqlGetValue(tableId='Artist',columnId='Name',keyId='3f69016017c39d5da0a1d60d0a98dbed55d46414')) File /Zope-2.2.2/lib/python/DocumentTemplate/DT_Util.py, line 331, in eval (Object: sqlGetValue(tableId='Artist',columnId='Name',keyId='3f69016017c39d5da0a1d60d0a98dbed55d46414')) (Info: sqlGetValue) File /Zope-2.2.2/lib/python/OFS/DTMLMethod.py, line 194, in validate (Object: testmeth) File /Zope-2.2.2/lib/python/AccessControl/SecurityManager.py, line 139, in validate File /Zope-2.2.2/lib/python/AccessControl/ZopeSecurityPolicy.py, line 209, in validate Unauthorized: (see above) 1010011010101001101010100110101010011010 0 Digital Garage$B!!%G%8%?%k
[Zope] 1000-record limit?
Greetings! I know I saw this discussed a long time ago, but I completely failed to find the thread anywhere, so here goes . . . We're running a somewhat older release of Zope with ZOracleDA, and we've run up against a 1000-record limit when returning data for reports, etc. I know that this is intended behavior (careful_range in DT_Util.py), but I'm wondering what the reasoning is, and if I should be even considering playing around with this (I'm assuming it was put in there for *some* reason . . . :) Thanks in advance for your help! -CJ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] 1000-record limit?
On Tue, 26 Sep 2000, Christopher J. Kucera wrote: We're running a somewhat older release of Zope with ZOracleDA, and we've run up against a 1000-record limit when returning data for reports, etc. I know that this is intended behavior (careful_range in DT_Util.py), but I'm wondering what the reasoning is, and if I should be even considering playing around with this (I'm assuming it was put in there for *some* reason . . . :) Take a look at the "Advanced" tab of your SQL methods... Petru ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] trouble with SiteAccess; can't manage subtree mapped to inaccessible domain name
Fred Yankowski wrote: I'm glad to have SiteAccess. In combination with the Apache ProxyPass method http://www.zope.org/Members/anser/apache_zserver/ it's been working well to host several domains from the same Zope/Zserver instance. Very cool. It _did_ take me while to realize that I needed version 2 of SiteAccess to work with Zope 2. http://www.zope.org/Members/4am/SiteAccess only has links to version 1 of SiteAccess, which threw me off for a while. Ok, well, SiteAccess2 is now the only "canonical" version. The only way to get to SiteAccess1 is by going to SiteAccess2 and selecting the old version. Hope that helps, mindlace Zopatista Community Liason ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] http://webcompare.internet.com/
Hung Jung Lu wrote: I just ran across this website: http://webcompare.internet.com/ Interesting that I did not see anything on Zope. Shouldn't we write something to [EMAIL PROTECTED] and let them know about Zope? (Look also under http://serverwatch.internet.com/appservers.html Thanks for letting us know about this. I'm looking into getting Zope mentioned here... ~ethan ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] ZFormulator -- how to make an SQL insert?
I looked in the archives for anything concerning this, and came up empty. I have zformulator set up with postgres, and it appears to work fine, except that I've not found the zen to make it actually do an SQL insert -- I know the GetSQL method will extract the proper code, but am I missing something trivial that'll let me actually execute the SQL code? Thanks. -- Mike Renfro / RD Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] PyGreSQLDA
Has anyone had significant speed issues using the PyGreSQLDA? It seems like I'm only getting one DB connection at a time. Is this an issue with the DA, with Zope, or am I doing something wrong? I have a pgsql db running just fine, and in Zope I have a connection instantiated at the top level that all of my ZSQL methods use. Shouldn't it still be able to establish multiple connections, though? I guess I'm confused as to how it works. Thought I was using it right, but if I execute a query through Zope it takes a few milliseconds unhindered. However, if multiple people try to run a query at the same time, it usually takes a few seconds, as if only one person were connected at a time. I'd love elucidation from someone educated on this subject, as I am most certainly not :) ~ Dave ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] [Fwd: Zope Question]
Hey gang, I'm posting this question here because I know a while back some people had mentioned they were using Zope. I'm trying to start using it, getting used to the DTML and all the other stuff. I can get it running with my Apache server, and that's all well and good. But I have these two questions which I can't seem to find answers to in current Zope documents and help. 1. How do I get the server process to run as a daemon? I've tried the one script for an rc process I found on a site, but my server just hangs and I never get a command prompt back. All other processes I've ever run at startup are either designed to be daemons, or have a specific switch to add to the program name. 2. OK, this is kind of two part. First, where does Zope actually store all of the directories and files you create for a site. If I have a fake directory as the "trigger" for the persistent CGI process, than where does it actually store this pages I'm creating? As an example, following the install instructions that comes with Zope, I've set Apache to send every request for /zope to the FastCGI process running in the background. That directory does not exist in my htdocs directory. Where is this stuff going? Two, can I get Zope to answer the general requests for a site (like www.bms.school my internal server and fake domain.) Rather than having to specify a directory, it would just send all requests to Zope. But to take that one step further, if I had user accounts set up with the /~username convention, would this stuff be able to pass through Zope and actually go to those directories? I don't think I'm making this question clear, but I don't know how else to state it right now. Thanks a bunch, Ryan Booz Belleville Mennonite School
[Zope] Re: Zope Question
- Original Message - From: "Ryan Booz" [EMAIL PROTECTED] To: "Comp Ed List" [EMAIL PROTECTED] Sent: Monday, September 25, 2000 3:03 PM Subject: Zope Question Hey gang, I'm posting this question here because I know a while back some people had mentioned they were using Zope. I'm trying to start using it, getting used to the DTML and all the other stuff. I can get it running with my Apache server, and that's all well and good. But I have these two questions which I can't seem to find answers to in current Zope documents and help. 1. How do I get the server process to run as a daemon? I've tried the one script for an rc process I found on a site, but my server just hangs and I never get a command prompt back. All other processes I've ever run at startup are either designed to be daemons, or have a specific switch to add to the program name. Removing the -D (debug) switch from the z2 line in start.py will cause Zope to release control of the terminal from which it was started. 2. OK, this is kind of two part. First, where does Zope actually store all of the directories and files you create for a site. If I have a fake directory as the "trigger" for the persistent CGI process, than where does it actually store this pages I'm creating? As an example, following the install instructions that comes with Zope, I've set Apache to send every request for /zope to the FastCGI process running in the background. That directory does not exist in my htdocs directory. Where is this stuff going? In the "ZODB" (Zope Object Database). See http://www.zope.org/Members/mcdonc/HowTos/gainenlightenment for some nuggets. This is a tough one to wrap your head around when you first get started. Two, can I get Zope to answer the general requests for a site (like www.bms.school my internal server and fake domain.) Rather than having to specify a directory, it would just send all requests to Zope. But to take that one step further, if I had user accounts set up with the /~username convention, would this stuff be able to pass through Zope and actually go to those directories? I don't think I'm making this question clear, but I don't know how else to state it right now. See the SiteAccess product on Zope.org ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] PyGreSQLDA
On Tue, 26 Sep 2000, Leichtman, David J wrote: Has anyone had significant speed issues using the PyGreSQLDA? It seems like I'm only getting one DB connection at a time. Is this an issue with the DA, with Zope, or am I doing something wrong? I have a pgsql db running just I have 3 connections just fine. Sometimes Zope timeouts a connection, but when someone touches it, Zope reopens the connection automatically. No problem thus far. Oleg. Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope Dies with FastCGI
I have the following set-up under which Zope occasionally dies. Zope 2.2.2 (same happened with 2.2.0 and 2.2.1) RedHat Linux 6.2 Apache 1.3.12 - with fastcgi/2.2.8 and OpenSSL/0.95a I'm running Zope with Fastcgi and using Apache rewrite rules to redirect all URLs that contain "manage" to https. It seems to work fine except on occasion Zope will die with the following error: "ZServer uncaptured python exception, closing channel FCGIChannel connected 127.0.0.1:2198 at 87195b (socket.error:(32, 'Broken pipe') [path_to_Zope/Zserver/medusa/asynchat.py|initiate_send||211] [path_to_Zope/Zserver/medusa/asynchat.py|send|274]) This doesn't always mean the server is dead but it is the only error I can trap with debug turned on. I am starting the Zope server with the -Z option. Ideas. I'm about ready to start making the server more widely available but cannot if the server is unreliable. Ideas, strategies, options? TIA Ron Roeber ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Nasty subtle security bug - Me Too
Shane Hathaway wrote: Martijn Faassen wrote: General problem description: For a ZClass instance/external methods that is only viewable by users with a particular role, the view operation fails if that role is only added to a user in a place deeper in the folder tree than the folder where the External Method/ZClass instance was defined. This occurs when the 'view' is occuring in the acquisition context of the folder. It succeeds if the role is added to the user in a folder higher in the tree, at or above the folder where the external method or ZClass instance is defined. This sounds 100% correct. When checking security, acquisition context is ignored. What matters is *containment* (which is also accessed through the acquisition machinery, but in a special way: aq_inner). A user can only access objects that are defined in a container where the user is granted access. How come it does work with DTML methods then? I can access a DTML method 'foo' defined in the root folder that is only accessible with role A, even if role A is only added to me in a subfolder (from this subfolder). You probably don't really want to change it to use context instead. It would open a mile-wide security hole. Depends on how you reason. I was reasoning context based -- I should be able to execute something in the context of the current folder, if I have the right role to do it. That's exactly how it works with DTML methods, so I didn't expect external methods to be different. If you're opening a mile-wide security hole with external methods, then why not with DTML methods? The view operation fails with a reauthentication request in Zope 2.1.6 (so authentication exception raised presumably). In Zope 2.2.2 the failure is a NameError for External Methods, and reauthentication for ZClass instances. Am I missing something terribly obvious, or is this a rather huge bug that's been unnoticed for a long time? I assume it *must* be a bug as DTML methods behave in a different way. I also want it to be a bug, as I don't like this behavior. It makes it very hard to delegate responsibility. The difference is a result of the change in the way security is handled. It now gets a NameError because the name lookups skip over entries to which you're disallowed access. That logic can be very puzzling, but you might try the ZDebug product which helps you make sense of it. Okay, I'll try that. I still don't see why DTML methods are different. Could you explain that? That's what initially caused much of my confusion; the DTML methods behave as expected, but call external methods that *don't*, which have *exactly* the same security settings. Note that this policy does make acquisition rather useless for delegating of responsibility, unless you're either using DTML only, or are coding for anonymous only. Regards, Martijn ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Set access rule
Quoting Martijn Pieters [EMAIL PROTECTED]: On Mon, Sep 25, 2000 at 01:52:26PM -0300, Mario Olimpio de Menezes wrote: I did an upgrade last week, from zope 2.1.6 to 2.2.1, using Debian packages. Almost everything was correct, but site access no longer works. Zope 2.2 requires SiteAccess 2 to work. Well, I forgot to say that, but of course, I'm using SiteAccess 2. Any other suggestion? Thanks! []s Mario O.de Menezes"Many are the plans in a man's heart, but IPEN-CNEN/SP is the Lord's purpose that prevails" http://curiango.ipen.br/~mario Prov. 19.21 http://www.revistalinux.com.br ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] String manipulation
Hi all, how can I manage it to cut a string. for example: a string property(testtext) with 500 words. but only want to give out 20 characters of tis text. Thank you Jens
Re: [Zope] String manipulation
Jens, You have a few options: 1.Cut the string, dtml-var "the_string[:20] 2.Use the size option of dtml-var, dtml-var the_string size=20 etc="..." hth Phil (ex. twinky-salesman) [EMAIL PROTECTED] - Original Message - From: jensebaer To: [EMAIL PROTECTED] Sent: Tuesday, September 26, 2000 8:28 PM Subject: [Zope] String manipulation Hi all, how can I manage it to cut a string. for example: a string property (testtext) with 500 words. but only want to give out 20 characters of tis text. Thank you Jens ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Set access rule
On Tue, Sep 26, 2000 at 03:55:58PM -0300, [EMAIL PROTECTED] wrote: Quoting Martijn Pieters [EMAIL PROTECTED]: On Mon, Sep 25, 2000 at 01:52:26PM -0300, Mario Olimpio de Menezes wrote: I did an upgrade last week, from zope 2.1.6 to 2.2.1, using Debian packages. Almost everything was correct, but site access no longer works. Zope 2.2 requires SiteAccess 2 to work. Well, I forgot to say that, but of course, I'm using SiteAccess 2. Any other suggestion? Thanks! Looking over your mail again, it seems that there is already an AccessRule registered, but it is of the wrong type. You can't remove it with the Add interface, because that triggers the error. Instead, you'll have to do this in your Zope root directory (I am assuming that the MOnitor client is running at it's default port of 8099): cat access # copy everything after the first ':'. This is your monitor password. python ZServer/medusa/monitor_client.py localhost 8099 # paste the monitor password import Zope from Products.SiteAccess.AccessRule import manage_addAccessRule app=Zope.app() manage_addAccessRule(app) get_transaction().commit() The Access Rule is now cleared. -- Martijn Pieters | Software Engineer mailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ - ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] String manipulation
"how can I manage it to cut a string. for example: a string property (testtext) with 500 words. but only want to give out 20 characters of tis text." Python sequence slicing syntax can be done with DTML, like so: dtml-call "REQUEST.set('first_20_char', '_['some_long"string'][:20])" dtml-var first_20_char wher the '[:20]' means from the begining of the string, through the 20th "slice". One thing to be aware of is that the positions start counting at 0, and are best thought of as falling "between" the individual characters, like so: a b c d e f g 0 1 2 3 4 5 6 7 So the 20th position ('slice') is just past the 19th character, if the first character is counted as 0. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Exceptions, exceptions...
Hi, Yesterday I posted the message below, and I'm happy to inform all that the problem was basically just my advanced braindeath. I decided to triple check everything today, after a good night of sleep, (and a so so day of real work) and found out that the variable I could swear was being used inside the external method wasn't really. It would be referenced only after the location where the exception was triggered, so it being undefined didn't trigger an error as I had naïvely expected. I just had forgotten to set it explicitly in the page that called the external method. The good news is that the exception machinery then seems to work exactly as one would expect, and quite wonderfully at that. Many thanks to all those that developed such a great system, Ramiro. Hi, I have a DTML document with the following structure: dtml-var standard_html_header dtml-try dtml-call "my_external_method(REQUEST)" p Report that everything was ok and wait for ack. form method=POST action=index_html input type=submit value="OK" /form dtml-except MyException p class="warning" Warn about problem found by external method. form method=POST action="treatError" input type=submit value="OK" /form /dtml-try dtml-var standard_html_footer and it works wonderfully, to be honest I thought it was quite uncanny to define and raise an exception inside the python module, and having it caught by the DTML document. Now, to improve the treatment of errors I need to refer, inside the dtml-except block, to some variables that were defined in the REQUEST variable (I'm pretty confident of this because I used them inside the external method), but it seems that the original REQUEST variable is no longer set inside the dtml-except block. Is this correct? What actually happens (in simple terms, please :) when an exception is thrown? I also tried the very few other tricks I know with DTML (dtml-with "_.namespace..." outside the dtml-try block, plus some other voodoo) but couldn't get it to work, either. Should I return these values as error values with the exception? I can do it if this is the only option, but I'm already using the return value for information related to external method things, and I'd rather not mix the two ``domains'', so to speak. Many thanks for any tips, -- Ramiro Brito Willmersdorf[EMAIL PROTECTED] GPG key: http://www.demec.ufpe.br/~rbw/GPG/gpg_key.txt ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] PyGreSQLDA
"Leichtman, David J" wrote: Has anyone had significant speed issues using the PyGreSQLDA? It seems like I'm only getting one DB connection at a time. Is this an issue with the DA, with Zope, or am I doing something wrong? I have a pgsql db running just fine, and in Zope I have a connection instantiated at the top level that all of my ZSQL methods use. Shouldn't it still be able to establish multiple connections, though? I guess I'm confused as to how it works. Thought I was using it right, but if I execute a query through Zope it takes a few milliseconds unhindered. However, if multiple people try to run a query at the same time, it usually takes a few seconds, as if only one person were connected at a time. I'd love elucidation from someone educated on this subject, as I am most certainly not :) ZPYGre is not threadsafe, so with it and all non-threadsafe da's zope uses a lock around access. (Thunked.py) The solution is to just use multiple DA connections and let postgres sort out the concurrency issues. Cheers Kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Download Problem
Shane Hathaway wrote: Suzette Ramsden wrote: I have had this same problem downloading squishdot zip files and I don't know if it is something I am doing. When I attempt to unzip the file, I keep getting: "error reading header after processing 0 entries" What archiver are you using? I'm guessing you're talking about some product I wrote, all of which are "tar.gz" files, not "zip" files. WinZip can read them, however. Shane I've seen this problem before. ie mangles the file name and winzip doesn't seem to like .tar.gz extensions (i think?) . just rename it with .tgz extension and winzip will be happy. Cheers Kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] PyGreSQLDA
ZPYGre is not threadsafe, so with it and all non-threadsafe da's zope uses a lock around access. (Thunked.py) The solution is to just use multiple DA connections and let postgres sort out the concurrency issues. i'm not clear about "use multiple DA connections". let's say i have several sql methods. it is meant for one particular app. do i create a few db connections and assign them to different sql methods? anybody know whether PoPy is threadsafe already? thanks and sorry to be a bone head :) Cheers Kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) -- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine Get the tables! ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] secure management with Site Access?
Is anyone using the Apache/mod_proxy/SiteAccess method of using Zope with the ability to access a given virtual host both with and without SSL encryption? If so, can you give me some pointers on how to accomplish this? I'd like to use SSL for all of my management activity but have the main site be available for non-encrypted viewing. The 'SiteRoot', though, will only rewrite the URLs with either 'http' or 'https', and isn't smart enough to do one or the other depending on the form of the original request. Is what I want to do even possible, or will I have to resort to using some sort of PCGI solution to accomplish my goal? thanks, rob ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] RedHat site mentions Zope (SuSE too!)
Oops, hit ALT+Enter when trying to paste in the URL at the end of that last message: http://www.stormix.com/partners/technical/index_html -- Kevin Teague, Zopista http://www.stormix.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] RedHat site mentions Zope (SuSE too!)
Joachim Werner wrote: I checked: Zope 2.1.6 is shipped with the DeLuxe and Server versions of RedHat 7.0, but not with the Standard edition. They have split Zope into a couple of separate packages. On the web page they mention Zope a couple of times! BTW: Zope (also the 2.1.6) is also on the SuSE 7.0 (Professional) distribution. So Zope is now on most of the major distributions (RedHat, SuSE, Debian)! We also included Zope 2.1.6 is also included in the new Storm Linux 2000 (which is based on Debian). We liked Zope so much, we put it on all of our editions (Starter, Open, and Deluxe) :) We also mention Zope on the list of included packages on the outside of Deluxe box. And we use Zope to power our web site: -- Kevin Teague, Zopista http://www.stormix.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] RedHat site mentions Zope (SuSE too!)
Not only that, they put Zope in at least one of their magazine ads! :-) Reading Linux Journal, did a doubletake when I saw the swollen Z. - Original Message - From: "Kevin Teague" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 27, 2000 12:05 AM Subject: Re: [Zope] RedHat site mentions Zope (SuSE too!) Joachim Werner wrote: I checked: Zope 2.1.6 is shipped with the DeLuxe and Server versions of RedHat 7.0, but not with the Standard edition. They have split Zope into a couple of separate packages. On the web page they mention Zope a couple of times! BTW: Zope (also the 2.1.6) is also on the SuSE 7.0 (Professional) distribution. So Zope is now on most of the major distributions (RedHat, SuSE, Debian)! We also included Zope 2.1.6 is also included in the new Storm Linux 2000 (which is based on Debian). We liked Zope so much, we put it on all of our editions (Starter, Open, and Deluxe) :) We also mention Zope on the list of included packages on the outside of Deluxe box. And we use Zope to power our web site: -- Kevin Teague, Zopista http://www.stormix.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )