[Zope-dev] test, please ignore
test ___ 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] Fw: [Zope-dev] Storing session objects in a ZODB
Im storing session-like data pickled inside the URL. I end up with long, ugly-looking URLs, but it does mean that a browser's bookmarks and back button work as expected, effectively 'undoing' changes made to thier session state. This solution also avoids the problem of finding enough storage on the server to store multiple revisions of each session. This solution is common and works great, but Ive never really liked it myself since it involves munging URL's and making them look ugly. I like nice short URL's I can email. In my more situation specific solution I give access to the stored session snapshots along the lines of ?load_ssn=Default will load in the session named "Default" for that user allowing them to be bookmarked... -- Andy McKay. ___ 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] 2.3.0 bug in fmt=?
Nevermind. As usual, as soon as you post you figure it out. The value of the var was a string and not a float... Sorry for wasting bandwidth. Although, come to think of it, should it throw an error rather than silently eating the value? --RDM ___ 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] Changing Ownership
I have a folder inside a user_info_folder that allows users to store data (these fabled session snapshots of earlier posts). When I create it I want to set the Ownership of that folder to the user. Since a user is created by someone else (only admin can create users), the admin person is becoming the owner. Simple I thought, in python when the object is created, set the ownership obj.changeOwnership(user) where user is: user = self.acl_users.getUser(id) The error I get back is Error Type: AttributeError Error Value: aq_inner ... File d:\Zope23\lib\python\AccessControl\Owned.py, line 168, in changeOwnership (Object: Traversable) File d:\Zope23\lib\python\AccessControl\Owned.py, line 302, in ownerInfo AttributeError: (see above) It would seem ownerInfo is looking for the User context to find the path to the object. Anyway the end result is I can't seem to set the owner. Is there a simpler way to do this. Is getUser actually returning the wrong thing? Cheers. -- Andy McKay. ___ 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] test, please ignore
My golly are we back up? -- Andy McKay. - Original Message - From: "Michael Bernstein" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, February 02, 2001 8:06 AM Subject: [Zope-dev] test, please ignore test ___ 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 )
[Zope-dev] 2.3.0 bug in fmt=?
dtml-var somevar fmt=dollars-and-cents produces a blank, no matter what the value of somevar. I could swear this works in other versions of zope, but it seems like an awfully fundamental bug to have slipped through the 2.3.0 release process. Can anyone tell me what stupid thing I'm doing wrong? --RDM ___ 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] Python Script Wish
Hi, Python Scripts are great :-) I wish I could create them through FTP. Basically, if you try to save a something.py into Zope through FTP, it currently creates a file object with the MIME type set to x-python. It's be really great if it coudl create a Python Script instead. Is that hard to do? Are there any gotchas? 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] Fw: [Zope-dev] Storing session objects in a ZODB
A strategy for integrating this into the session-tracking stuff would be: 1. Write all of your code to use the session tracking API. 2. Pass separate state info in the URL like you're doing now. 3. Copy the URL state into the current session on every request. This is probably not very desirable for you Toby, especially as you already have something working! ;-) The session tracking stuff doesn't buy you very much. I'd be interested, however, to get a strategy down in writing for using the session tracking stuff to do what you're doing, as it's very useful. - Original Message - From: "Toby Dickenson" [EMAIL PROTECTED] To: "Chris McDonough" [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, February 01, 2001 9:00 AM Subject: Re: [Zope-dev] Fw: [Zope-dev] Storing session objects in a ZODB On Wed, 31 Jan 2001 14:28:09 -0500, "Chris McDonough" [EMAIL PROTECTED] wrote: This is a forwarding of an interesting session-related discussion between Andy and I... it covers the idea of storing session states as "snapshots" at a particular time, later allowing users to select a session state. This is useful if you wish to allow users to make incremental changes to data in a session and "bookmark" a session state for later copying into the current session. This is something that the "bare" session tracking stuff won't do for you, although it can facilitate it tremendously. Input welcomed! Ive been doing something similar for a while, which I know Ive mentioned to Chris before, but I think this was before Andy joined the list Im storing session-like data pickled inside the URL. I end up with long, ugly-looking URLs, but it does mean that a browser's bookmarks and back button work as expected, effectively 'undoing' changes made to thier session state. This solution also avoids the problem of finding enough storage on the server to store multiple revisions of each session. At the moment this isnt based on 2.3.0's session support. I havent yet looked at that and dont know how well it would integrate, although I do hope to do that at some time. 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] Broken FTP ZClass PUT 2.3.0
I have recently upgraded to 2.3.0 and it has broken my FTP support. When I try to do an FTP upload to an instance of my ZClass, it fails because it is calling the default PUT of a webdav.Collection instead of the PUT of my python base class. My setup is such: A Python product with a ObjectManger(ish) base class that overrides PUT to do special manipulation of large files. I have a bunch of ZClasses that inherit from my base classes for the management pages, meta data handling and 'live' updates. Now, instead of PUT being called on my base class, it is being called on webdav.Collection which throws an exception. In 2.3.0 ZClass inherits Base, webdav.Collection and SimpleItem where in 2.2.x ZClass only inherits from SimpleItem. Is there any way to get my old functionality back (without editing Zope)? Hmm - this is a tricky one :( One way might be to add a Python script named 'PUT' to your ZClass, which calls an alias that you could add to your subclass that calls that right PUT. Non-optimal, but might do the trick. python script, arguments REQUEST, RESPONSE return self.my_PUT(REQUEST, RESPONSE) /python script class MyBaseClass(...): def my_PUT(self, REQUEST, RESPONSE): # new alias to call the right PUT. you could # also just rename your custom PUT, but this # example tries to preserve the contract of # your base class in case something else # depends on it... return MyBaseClass.PUT(self, REQUEST, RESPONSE) def PUT(self, REQUEST, RESPONSE): # existing custom PUT handler ... We were trying to make life easier for the majority by adding FTP/DAV support to ZClasses, but as you point out this may cause difficulties for folks who are trying to handle certain HTTP methods themselves already :( I wonder if a better way to go might be to provide a mixin that people can use when defining a ZClass that adds the default FTP/DAV support? Then I suppose that people with existing ZClasses would then be mad (because there would be no easy way to add that support to existing ZC). Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ 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] [ANN] M2Crypto 0.06 snapshot #2 -- ZServerSSL
Hi, A new snapshot of M2Crypto is now available. The major change: ZServerSSL Rides Again Whew! It's been a year! ZServerSSL was last released on 1 Feb 2000 for Zope 2.1.3. It has now been dusted off and re-released for Zope 2.3.0. Tested with Zope-2.3.0-win32-x86 with M2Crypto for Python1. Tested with Zope-2.3.0-src on FreeBSD with M2Crypto for both Python1 and Python2. Interoperated with Netscape, IE and Opera on Win32, and also Netscape on FreeBSD. Beware browsers with broken HTTP/1.1 - they drive ZServerSSL to 100% CPU utilisation: An example is Netscape Communicator 4.72 on my FreeBSD boxen. (Or maybe it's ZServer's HTTP/1.1 that's broken. ;-) X.509 certificate-based client authentication for HTTPS and the encrypting monitor, both features of the ZServerSSL released a year ago, to come RSN! As usual, get M2Crypto here: http://www.post1.com/home/ngps/m2 Feedback is appreciated. Cheers. -- Ng Pheng Siong [EMAIL PROTECTED] * http://www.post1.com/home/ngps ___ 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] Poor programming practice?
In article 004f01c08c01$c984bf70$6401a8c0@home, Darrell Gallion [EMAIL PROTECTED] writes Doesn't this undo the damage? from medusa.ftp_server import recv_channel handle_close=recv_channel.handle_close import Zserver.FTPServer recv_channel=handle_close --Darrell There's only one method in the class, changing it, changes for all so far as I can tell. If I compete to set my handle_close with another it depends on the order of import. -- Robin Becker ___ 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 )