[Zope-Checkins] CVS: Zope - test.py:1.2.2.20
Update of /cvs-repository/Zope In directory cvs.zope.org:/tmp/cvs-serv6383 Modified Files: Tag: Zope-2_7-branch test.py Log Message: Implemented a --nowarnings flag for test.py. Makes running CMF and Plone tests a lot less annoying. Usage: ./bin/zopectl test --keepbytecode --nowarnings --dir Products/CMFPlone === Zope/test.py 1.2.2.19 = 1.2.2.20 === --- Zope/test.py:1.2.2.19 Tue Oct 4 14:22:40 2005 +++ Zope/test.pySat Dec 3 09:31:33 2005 @@ -104,6 +104,9 @@ Keep running the selected tests in a loop. You may experience memory leakage. +--nowarnings +Install a filter to suppress warnings emitted by code. + -t Time the individual tests and print a list of the top 50, sorted from longest to shortest. @@ -740,6 +743,7 @@ global test_dir global config_file global import_testing +global no_warnings if argv is None: argv = sys.argv @@ -767,11 +771,12 @@ test_dir = None config_file = None import_testing = False +now_warnings = False try: opts, args = getopt.getopt(argv[1:], a:bcC:dDfg:G:hLmprtTuv, [all, help, libdir=, times=, -keepbytecode, dir=, +keepbytecode, nowarnings, dir=, config-file=, import-testing]) except getopt.error, msg: print msg @@ -843,6 +848,12 @@ config_file = v elif k == '--import-testing': import_testing = True +elif k == '--nowarnings': +no_warnings = True + +if no_warnings: +import warnings +warnings.simplefilter('ignore', Warning, append=1) if gcthresh is not None: if gcthresh == 0: ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/test.py Implemented a --nowarnings flag for test.py.
Log message for revision 40519: Implemented a --nowarnings flag for test.py. Makes running CMF and Plone tests a lot less annoying. Usage: ./bin/zopectl test --keepbytecode --nowarnings --dir Products/CMFPlone Changed: U Zope/branches/Zope-2_8-branch/test.py -=- Modified: Zope/branches/Zope-2_8-branch/test.py === --- Zope/branches/Zope-2_8-branch/test.py 2005-12-03 13:38:38 UTC (rev 40518) +++ Zope/branches/Zope-2_8-branch/test.py 2005-12-03 14:32:19 UTC (rev 40519) @@ -104,6 +104,9 @@ Keep running the selected tests in a loop. You may experience memory leakage. +--nowarnings +Install a filter to suppress warnings emitted by code. + -t Time the individual tests and print a list of the top 50, sorted from longest to shortest. @@ -759,6 +762,7 @@ global test_dir global config_file global import_testing +global no_warnings if argv is None: argv = sys.argv @@ -789,11 +793,12 @@ test_dir = None config_file = None import_testing = False +no_warnings = False try: opts, args = getopt.getopt(argv[1:], a:bcC:dDfg:G:hLmprtTuv, [all, help, libdir=, times=, -keepbytecode, dir=, +keepbytecode, nowarnings, dir=, config-file=, import-testing, coverage, profile, hotshot]) except getopt.error, msg: @@ -872,7 +877,13 @@ config_file = v elif k == '--import-testing': import_testing = True +elif k == '--nowarnings': +no_warnings = True +if no_warnings: +import warnings +warnings.simplefilter('ignore', Warning, append=1) + if gcthresh is not None: if gcthresh == 0: gc.disable() ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-dev] Zope tests: 8 OK
Summary of messages to the zope-tests list. Period Fri Dec 2 12:01:01 2005 UTC to Sat Dec 3 12:01:01 2005 UTC. There were 8 messages: 8 from Zope Unit Tests. Tests passed OK --- Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux From: Zope Unit Tests Date: Fri Dec 2 22:16:08 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003698.html Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Fri Dec 2 22:17:38 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003699.html Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Fri Dec 2 22:19:08 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003700.html Subject: OK : Zope-2_7-branch Python-2.4.2 : Linux From: Zope Unit Tests Date: Fri Dec 2 22:20:38 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003701.html Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Fri Dec 2 22:22:08 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003702.html Subject: OK : Zope-2_8-branch Python-2.4.2 : Linux From: Zope Unit Tests Date: Fri Dec 2 22:23:38 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003703.html Subject: OK : Zope-2_9-branch Python-2.4.2 : Linux From: Zope Unit Tests Date: Fri Dec 2 22:25:08 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003704.html Subject: OK : Zope-trunk Python-2.4.2 : Linux From: Zope Unit Tests Date: Fri Dec 2 22:26:39 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-December/003705.html ___ 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] AcceleratedHTTPCache and virtual hosting (collector 1447)
Hi folks, need some advice here. http://www.zope.org/Collectors/Zope/1447 (AcceleratedHTTPCacheManager doesn't PURGE correctly for virtual hosts) has been assigned to me like forever, and I've determined to not let another year go by with this one unfixed ;-) I'd like to apply the patch and commit, once I'm sure it works correctly, but - drumroll - AcceleratedHTTPCacheManager has no test suite at all. Which means, as frequently happens with Zope 2, I have to go through the pain of setting up a test suite for the current behavior before I go changing anything. The fun thing about this is that AcceleratedHTTPCache uses httplib to send purge notifications. I don't fancy launching a dummy server of some sort. So, I'm asking for advice: How in general does one go about setting up a unit test for network client code? One thought that occurs to me is to replace httplib.HTTPConnection with a mock object of some sort that allows easy verification of its input. So we assume that httplib works, as a proper unit test should I think. How to do this? One idea is to monkeypatch httplib during the course of the test case, and replace and then when the test finishes, restore the old httplib.HTTPConnection. But this idea smells pretty bad to me. Another thought: Maybe before doing anything else, I should make the client class used by AcceleratedHTTPCache configurable, so I can more easily get a mock in there. Something like: class AcceleratedHTTPCache (Cache): client_class = httplib.HTTPConnection ... def ZCache_invalidate(self, ob): ... h = self.client_class(host) ... Then I can just do something like this during afterSetUp(): cache = AcceleratedHTTPCache() cache.client_class = MockHTTPConnection Any better ideas? testing-network-stuff-hurts-my-head-ly-yrs, -- 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 )
Re: [Zope-dev] AcceleratedHTTPCache and virtual hosting (collector 1447)
On 3 Dec 2005, at 15:57, Paul Winkler wrote: One thought that occurs to me is to replace httplib.HTTPConnection with a mock object of some sort that allows easy verification of its input. So we assume that httplib works, as a proper unit test should I think. How to do this? One idea is to monkeypatch httplib during the course of the test case, and replace and then when the test finishes, restore the old httplib.HTTPConnection. But this idea smells pretty bad to me. Another thought: Maybe before doing anything else, I should make the client class used by AcceleratedHTTPCache configurable, so I can more easily get a mock in there. Something like: I like the secondary route, but I'm not sure the production code should contain testing only turds. :) I have done the first route on many occasions, mostly with the LDAPUserFolder where I actually replace a class in the python-ldap module with one that fakes out a LDAP connection object so I can operate on it: # Do some namespace manipulation to make use of FakeLDAP from Products.LDAPUserFolder.tests import FakeLDAP sys.modules['ldap'] = FakeLDAP This could also be done in setUp/tearDown, which I should really do because this code does not clean up after itself. If you happened to run other code after running the test and with the same running interpreter that just happens to use the python-ldap module you'd be in bad shape ;) 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: AcceleratedHTTPCache and virtual hosting (collector 1447)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul Winkler wrote: Hi folks, need some advice here. http://www.zope.org/Collectors/Zope/1447 (AcceleratedHTTPCacheManager doesn't PURGE correctly for virtual hosts) has been assigned to me like forever, and I've determined to not let another year go by with this one unfixed ;-) I'd like to apply the patch and commit, once I'm sure it works correctly, but - drumroll - AcceleratedHTTPCacheManager has no test suite at all. Which means, as frequently happens with Zope 2, I have to go through the pain of setting up a test suite for the current behavior before I go changing anything. The fun thing about this is that AcceleratedHTTPCache uses httplib to send purge notifications. I don't fancy launching a dummy server of some sort. So, I'm asking for advice: How in general does one go about setting up a unit test for network client code? One thought that occurs to me is to replace httplib.HTTPConnection with a mock object of some sort that allows easy verification of its input. So we assume that httplib works, as a proper unit test should I think. How to do this? One idea is to monkeypatch httplib during the course of the test case, and replace and then when the test finishes, restore the old httplib.HTTPConnection. But this idea smells pretty bad to me. Another thought: Maybe before doing anything else, I should make the client class used by AcceleratedHTTPCache configurable, so I can more easily get a mock in there. Something like: class AcceleratedHTTPCache (Cache): client_class = httplib.HTTPConnection ... def ZCache_invalidate(self, ob): ... h = self.client_class(host) ... Then I can just do something like this during afterSetUp(): cache = AcceleratedHTTPCache() cache.client_class = MockHTTPConnection Any better ideas? You could modify the testing code do an adapter lookup for a component used to do the HTTP client stuff, and then arrange to register your dummy object in a test. I imagine that this would be useful for more than just testing; for instance, if I want to purge a whole tier of Squids, right now the only way to do that is to write a proxy-proxy (one version I wrote once was called PageAssassin) which distributes the PURGE request to them. An adapter-based scheme would allow me to replace the stock version with one which distributed the PURGE directly. Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDkcf8+gerLs4ltQ4RAp1yAKCuIZDPKujDQR3qDxUn7Ik0y0u2tQCfXiWC iDSM7oV4ABVktTwCMzXfN8c= =MpSy -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: SVN: Zope/branches/Zope-2_8-branch/test.py Implemented a --nowarnings flag for test.py.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stefan H. Holek wrote: Log message for revision 40519: Implemented a --nowarnings flag for test.py. Makes running CMF and Plone tests a lot less annoying. Note that the CMF tests run clean at this point. Suppressing the warning output is not likely to improve the quality of a codebase. Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDkche+gerLs4ltQ4RAuj/AKDCRrBAqlMHdv8hBYeccKXPwREvngCgzsxi d543wvSFQvp63eVcmIeETWU= =yWgx -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] AcceleratedHTTPCache and virtual hosting (collector 1447)
On Dec 3, 2005, at 11:08 AM, Jens Vagelpohl wrote: On 3 Dec 2005, at 15:57, Paul Winkler wrote: One thought that occurs to me is to replace httplib.HTTPConnection with a mock object of some sort that allows easy verification of its input. So we assume that httplib works, as a proper unit test should I think. How to do this? One idea is to monkeypatch httplib during the course of the test case, and replace and then when the test finishes, restore the old httplib.HTTPConnection. But this idea smells pretty bad to me. Another thought: Maybe before doing anything else, I should make the client class used by AcceleratedHTTPCache configurable, so I can more easily get a mock in there. Something like: I like the secondary route, but I'm not sure the production code should contain testing only turds. :) FWIW, I put testing only turds all the time in production code. It's pretty sane as long as you put a comment in the code that says this dance performed to service unit tests or somesuch. And it makes life much easier than needing to dummy up *everything*. - C ___ 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] Re: Logging of ConflictError
Sidnei da Silva wrote: On Dec 2, 2005, at 3:51 PM, Chris Withers wrote: Sidnei da Silva wrote: I was looking at the same issue yesterday, and it's really a trivial change. Need to add a 'multisection' to zopeschema.xml that allows multiple 'logger' type entries. Then you can just do something like: Yes, that bit is simple. But in 2.8.something and above, the eventlog is plugged in as a root logger, meaning you can't get anything logged that doesn't go to it. Who made this change and why? Yes you can. Just set 'propagate' to a non-true value. Can you be a bit more descriptive? OS thisa zope.conf option? an option to the logger call? etc? 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] Re: Logging of ConflictError
On Sat, Dec 03, 2005 at 07:51:28PM +, Chris Withers wrote: | Sidnei da Silva wrote: | | On Dec 2, 2005, at 3:51 PM, Chris Withers wrote: | | Sidnei da Silva wrote: | | I was looking at the same issue yesterday, and it's really a trivial | change. Need to add a 'multisection' to zopeschema.xml that allows | multiple 'logger' type entries. Then you can just do something like: | | | Yes, that bit is simple. But in 2.8.something and above, the eventlog | is plugged in as a root logger, meaning you can't get anything logged | that doesn't go to it. Who made this change and why? | | Yes you can. Just set 'propagate' to a non-true value. | | Can you be a bit more descriptive? OS thisa zope.conf option? an option | to the logger call? etc? Heard of grep? *wink* From ZConfig/components/logger/logger.xml key name=propagate datatype=boolean default=true description Indicates whether events that reach this logger should be propogated toward the root of the logger hierarchy. If true (the default), events will be passed to the logger's parent after being handled. If false, events will be handled and the parent will not be informed. There is not a way to control propogation by the severity of the event. /description /key -- Sidnei da Silva Enfold Systems, LLC. http://enfoldsystems.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] Which Zope version is installed?
How do I tell which Zope version is installed by looking at the file system? Is there anything like a 'version' file which would identify it? -- John ___ 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 Message Board
What Message Board product is recommended for use with Zope? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Zope Message Board
John Poltorak wrote: What Message Board product is recommended for use with Zope? I think zForum at http://www.zforum.org is the only one alive. Michael -- http://zope.org/Members/d2m http://planetzope.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 )
[Zope] Re: Which Zope version is installed?
John Poltorak wrote: How do I tell which Zope version is installed by looking at the file system? Is there anything like a 'version' file which would identify it? In your SOFTWARE_HOME (check its value in /Control_Panel in ZMI) read the file 'version.txt' Michael -- http://zope.org/Members/d2m http://planetzope.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] Re: Python Classes and Zope.
On Fri, Dec 02, 2005 at 11:57:16PM +0100, Florent Guillaume wrote: Paul Winkler wrote: (snip) Well, the thing is, the declaration that makes the method public *has no effect* unless your class participates in acquisition. That's not true. The objects of this class will be perfectly accessible to a restricted user: from AccessControl import ClassSecurityInfo class MyStuff(object): security = ClassSecurityInfo() security.declareObjectPublic() security.setDefaultAccess('allow') def foo(self): return 'bar' InitializeClass(MyStuff) Which also can be written more shorly an less invasively: class MyStuff(object): def foo(self): return 'bar' from AccessControl import allow_class allow_class(MyStuff) So it is. Thanks for the clarification. What confused me is that the following *does* need the inheritance from Acquisition: from Acquisition import Implicit class Foo3(Implicit): security = ClassSecurityInfo() security.declarePublic('bar') def bar(self): return hello from foo3 InitializeClass(Foo3) In this case, if you remove the (Implicit), you get AccessDenied because The container has no security assertions. I mistakenly assumed that the same was necessary when using allow_class. Thanks for clearing that up. Oh, and the instance needs to be given an acquisition context, too. e.g. foo = foo.__of__.some_parent It's only if you want to protect a method with a specific permission that's not public or private that you'll have to provide acquisition context so that Zope can find out what roles have this permission and match them against the current user's roles: Apparently you're right about this too :-) I never knew that. Thanks. -- 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] Importing an image
Is there any way to import an image file using a url? -- John ___ 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] Importing an image
No. You have to write a script that download the URL with urllib On 12/3/05, John Poltorak [EMAIL PROTECTED] wrote: Is there any way to import an image file using a url? -- John ___ 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 ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.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] [ANN] TextIndexNG 3.1.1 released
Can TextIndexNG V 3 be used to provide full text search with content stored in a relational database or and accessed through zsql (or potentially other sources besides content within zodb)? I realize this sounds strange since postgres can be made to do a full text search but I am thinking broader than just postgres. If so, can the display of results be ranked and the output highly customized. Many thanks. Regards, David ___ 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 Calendar
Is there a Zope Calendar app available which looks and works like Plone Calendar? I can't use Plone because it is too heavy for the avialable resources. -- John ___ 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] [ANN] TextIndexNG 3.1.1 released
--On 3. Dezember 2005 15:20:12 -0400 David Pratt [EMAIL PROTECTED] wrote: Can TextIndexNG V 3 be used to provide full text search with content stored in a relational database or and accessed through zsql (or potentially other sources besides content within zodb)? I realize this sounds strange since postgres can be made to do a full text search but I am thinking broader than just postgres. If so, can the display of results be ranked and the output highly customized. Many thanks. TXNG 3.1.1 provides a documented API for object to be indexed. Look at the README.txt. -aj pgpnT4vOErbVQ.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] Re: Zope Calendar
John Poltorak wrote: Is there a Zope Calendar app available which looks and works like Plone Calendar? I can't use Plone because it is too heavy for the avialable resources. Depends on what you need: - http://www.zope.org/Members/teyc/CalendarTag - http://www.zope.org/Members/malikz/CorpCalendar/ Michael -- http://zope.org/Members/d2m http://planetzope.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 )
[Zope] zForum installation
Where can I find some installation notes for zForum? I haven't found anything in the package which tells me what to do. -- John ___ 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] Hooks for methods other than GET/POST on port 80?
Hi! I am looking for a way in Zope to receive HTTP-requests with, eg, DELETE and PUT in the object method. Zope (2.7.x) seems to intercept these and issue Not authorised. (I check REQUEST.REQUEST_METHOD to decide what to do in the object's method. POST and GET are fine, but others are blocked in Zope.) I do not want to do it the right way and create special kind of ZServer (like for WebDAV), I just want Zope to let me decide what to do if certain method is requested from a certain method of an object. An example. I want object X to receive a message Y with request method DELETE. This is the raw thing the server need to receive: DELETE /path/to/object/X/Y HTTP/1.1 Host: myhost.myorg.org Content-Type: application/myprotocol+xml Of course, I have a product Z which has this class: class Z: ... def Y(self, REQUEST): if REQUEST.REQUEST_METHOD == 'POST': # no problem elif REQUEST.REQUEST_METHOD == 'DELETE': # this is never reached... Zope doesnt call Y What do I tweak so object X will receive Y on a usual HTTP port 80? THANKS! Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.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] zForum installation
--On 3. Dezember 2005 19:50:34 + John Poltorak [EMAIL PROTECTED] wrote: Where can I find some installation notes for zForum? I haven't found anything in the package which tells me what to do. MAybe you should use Google. The first hit searching for zforum gives you this: http://www.zforum.org/ -aj pgpzU4sOXepXr.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] Re: zForum installation
John Poltorak wrote: Where can I find some installation notes for zForum? I haven't found anything in the package which tells me what to do. There is a whole zForum just for you to read and ask for info esp. checkout zForum 1.0 Installation/Usage / Installing zForum http://www.zforum.org/view_topic?topic_id=3 Michael -- http://zope.org/Members/d2m http://planetzope.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] Hooks for methods other than GET/POST on port 80?
Am Samstag, den 03.12.2005, 21:56 +0200 schrieb Roman Suzi: Hi! ... DELETE /path/to/object/X/Y HTTP/1.1 Host: myhost.myorg.org Content-Type: application/myprotocol+xml Of course, I have a product Z which has this class: class Z: ... def Y(self, REQUEST): if REQUEST.REQUEST_METHOD == 'POST': # no problem elif REQUEST.REQUEST_METHOD == 'DELETE': # this is never reached... Zope doesnt call Y What do I tweak so object X will receive Y on a usual HTTP port 80? THANKS! It seems you want the action and not the original request. When you use if ... why not just define manage_delObjects on your class? This works for PUT and most other request types as well. HTH Tino ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Zope Calendar
On Sat, Dec 03, 2005 at 08:37:31PM +0100, Michael Haubenwallner wrote: John Poltorak wrote: Is there a Zope Calendar app available which looks and works like Plone Calendar? I can't use Plone because it is too heavy for the avialable resources. Depends on what you need: I wanted something which looks like Plone Calendar - http://www.zope.org/Members/teyc/CalendarTag - http://www.zope.org/Members/malikz/CorpCalendar/ These don't seem to... Michael -- http://zope.org/Members/d2m http://planetzope.org -- John ___ 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] zForum installation
On Sat, Dec 03, 2005 at 09:05:08PM +0100, Andreas Jung wrote: --On 3. Dezember 2005 19:50:34 + John Poltorak [EMAIL PROTECTED] wrote: Where can I find some installation notes for zForum? I haven't found anything in the package which tells me what to do. MAybe you should use Google. The first hit searching for zforum gives you this: http://www.zforum.org/ I have already downloaded zForum, and foolishly expected to find some installation instructions included. -aj -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Zope Calendar
On 12/3/05, John Poltorak [EMAIL PROTECTED] wrote: I wanted something which looks like Plone Calendar How do you mean looks like? -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.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 )
[Zope] add multiple images to zope folder
Hello, Is there a way to add multiple images to a zope folder instead of adding one at a time?-- Take care, eh.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 )
[Zope] killing off individual Zope session
We just had an example of a run away process with one of our authenticated users. I would have liked to kill off the user's processing while leaving all the other users running. Any ideas as to how to accomplish this? I do know the user's login and password, but little else. We use the Cookie Crumbler and a slightly hacked UserFolder for authentication. -- ___ 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] add multiple images to zope folder
There's a script with zope called load_site.py that can do this. Alternatively, write your own Python Script that can do it for you from a input type=file form. On 12/4/05, Chris Purves [EMAIL PROTECTED] wrote: Hello, Is there a way to add multiple images to a zope folder instead of adding one at a time? -- Take care, eh. 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 ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.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] add multiple images to zope folder
Use FTP, Open Internet Explorer, type ftp://zopeusername:[EMAIL PROTECTED]:8021/directory/ and drag and drop from explorer to ie, zope assigns them as images automatically. Any FTP client will do, Filezilla is nice/free, as well. (filezilla.sourceforge.net) Substitute 8021 with your Zope's FTP port. I use it regularly for uploading website graphical components, a nice shortcut. HTH -Jon Chris Purves wrote: Hello, Is there a way to add multiple images to a zope folder instead of adding one at a time? -- Take care, eh. 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 ) -- Jonathan Cyr http://www.cyr.info http://www.weddingweblog.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: killing off individual Zope session
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dennis Allison wrote: We just had an example of a run away process with one of our authenticated users. I would have liked to kill off the user's processing while leaving all the other users running. Any ideas as to how to accomplish this? I do know the user's login and password, but little else. We use the Cookie Crumbler and a slightly hacked UserFolder for authentication. Can't be done. There is no safe way to interrupt an in-process request, even if you could figure out that it belonged to a given user; any attempt will likely leave your system hosed, requiring an appserver restart. Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDkkUt+gerLs4ltQ4RArxqAKCo+bU+KoO0fGslDrttCUfGeIBAigCfZjlM gg2zJZMjICst+ECc23xfELk= =EkrC -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 )
Re: [Zope] checking for elements in a list
Christopher Rivard wrote: Hello, I'm am trying to check for the membership of items in a list and think I'm missing something. How is this done in dtml? List allids: [15,16,17,18] Check for multiple items in the list: dtml-in allids prefix=loop dtml-if expr=loop_item == 17 something dtml-elif expr=loop_item == 17 and loop_item != 18 doesn't work /dtml-if /dtml-in The goal is to check for combinations: 17 and not 18 18 only 17 only 17 and 15 18 and 16 ...combinations. I don't think that I really want to loop through the list, just want to check membership in the list. In Python, you can simply ask:: 17 in allids 18 not in allids and so forth as boolean expressions. Just make sure that the elements of the list you're getting are what you think they are. If you ask about the integer 17 and the list actually has a string 17 they won't match. You can either adjust what you test or use something like the 'int' function to cast. --jcc -- Building Websites with Plone http://plonebook.packtpub.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] zForum installation
--On 3. Dezember 2005 20:42:39 + John Poltorak [EMAIL PROTECTED] wrote: I have already downloaded zForum, and foolishly expected to find some installation instructions included. As Michael pointed out: you'll find enough documentation on their site. And if you have a specific question it would be much better to ask in their forum. A fast look over the installation description on their site tells me that the installation description should be sufficient for most people. -aj pgpONml8ZNBWo.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 )