RE: [Zope] HELP: problems with ZServer Medusa!
does /usr/Zope-2.2.0a1-src/var/z2.pid exist? if not, touch z2.pid and try again. seb. > Hi All, > I have installed Zope on a Linux server (Slackware 7.0) apparently > without problems; but, when I start the server with the command: > ./start, I have in continuous this message error: > -- > INFO(0) ZServer Monitor Server (V.1.6) started on port 8099 > Raceback (innermost last): > File "/usr/Zope-2.2.0a1-src/z2.py", line 698, in ? > pf=open(PID_FILE, 'w') > IOError: [Errno 13] Permission denied > '/usr/Zope-2.2.0a1-src/var/z2.pid' > ___ 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] Reloading products
newbie time: I'm trying to write a product AlbumImage which extends Image to include a thumbnail. I was determined to slog it out without begging for help, but I've come up against a very strange brick wall. I'm getting problems with an import statement at the beginning of my product from OFS.PropertyManager import PropertyManager now then. I originally mis-spelled PropertyManager 'PropertyManageer' and got a traceback telling me it didn't exist. Fine. I changed it to the correct spelling, stopped and started my zope (n.b. is there any way of reloading a product without the tedium of stopping and starting zope?), and it still said 'no module named PropertyManageer'. So I tried changing it to ProoopertyManager, restarted Zope and sure enough the error was 'no module named ProoopertyManager'. BUT...I changed it to PropertyManager again and the error was *still* 'no module named ProoopertyManager'. Any clues, anyone? -seb > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of > Lindell Alderman > Sent: 24 May 2000 20:18 > To: Zope Developers; Zope Users > Subject: [Zope] Cannot rename or move my ZClass object > > > I have derived a ZClass from the Folder base class and it works > great, except I cannot rename or move my ZClass. How can I fix this? > > -L > > ___ > 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] Reloading products
Shane pointed me to the Refresh product, but I'm still baffled. The same problem that's stopping me from updating my product is stopping the Refresh product from doing its thing on my product (even though it appears in the product folder itself). I can completely add or remove my own products from the Products directory and they have no effect whatsoever on the ZODB. Am I missing something? Here's what I'm doing to create a product (following source for various things including the Boring product): 1) create folder Products/AlbumImage 2) add __init__.py 3) in __init__.py, import AlbumImage, initialise(context) stuff 4) create AlbumImage/AlbumImage.py 5) do stuff that is good in AlbumImage.py Now, as far as I can tell, this should be sufficient to make my product appear in the products folder. Why does it refuse to disappear or change? Is it stuck somewhere in the ZODB? Ek I'm confused. Seb. > -Original Message- > From: Chris Withers [mailto:[EMAIL PROTECTED]] > Sent: 24 May 2000 21:03 > To: Seb Bacon > Cc: Zope Users > Subject: Re: [Zope] Reloading products > > > Seb Bacon wrote: > >(n.b. is > > there any way of reloading a product without the tedium of > stopping and > > starting zope?) > > There is a very-alpha product for doing this floating around on the > zope-dev list. check the archives... > > Chris > ___ 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] ZOBD caching products?
Ladies and gentlemen, Some time ago I wrote to the list to ask for help on a product reloading issue. I'm still banging my head against it now, so i'm restating the problem again in the hope someone can help: I have a very simple product (and it works!) Any changes I make don't get reflected in the product, so... 1) I change the function name in order to break it on purpose 2) I stop and restart Zope (or use the refresh product) ...and... 3) Zope thinks the product still works ?!?!£?"$"" This behaviour exhibits itself in Zope 2.1.6 *and* 2.2.0. Since no-one else ever seems to have had this problem, I can only assume I am doing something wrong at a "doh!" basic level. Sounds to me like the product is getting cached in the ZOBD. I'm only a poor newbie, so I don't really know where to go from here in order to debug the problem. Any clues Thanks, Seb. ___ 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] request for advice
Hello folks, I'm just beginning to design my first big Zope application. I'm writing to ask zopististitiatatas for some advice, since I'm a bit of a newbie and I want to make sure: [a] I reuse as much code as possible [b] I make my code as reusable as possible [c] my application is stable and scalable 1. Background to the application I'm building an extranet product in Zope. Much of it will be centered around a 'VersioningObject'. An example of such an object might be an image, a Word document. The objects will have a preview view associated with them. For word docs, this will be a html-ised version, for photos it will be a thumbnail. Perhaps in the future each object will also have rudimentary online editing facilities. The objects will all support versioning. This means each object can be superceded by another object of the same type. The version number will be incremented. Versions will also have Confera forums associated with them, and ACLs. Now as I see it, I want a VersioningObject to be a Folderish object that can contain a set of Versions, which are just a load of File objects of the same type. The folder has a method which slects its most recent child file object and displays it by calling its preview method. Older versions are read-only and are listed by title only. 2) My questions: i) I'm worried about the sheer volume of binary data that would accrue in the VersioningObject: a single VersioningObject might be a Word doc of 25Mb. If it has 10 versions and there are 10 such objects, that's 2.5Gb in the ZOBD. I presume this would be a bad idea performance-wise; any suggestions? ii) I'm interested in using ZPatterns because I reckon they sound like they might enhance the reusability etc. of the code; I know there have been some pointers recently, but which ZPatterns could I benefit from? or are they too arcance to worry about for now? iii) Is there any other miscellaneous advice? e.g. has anything like this been done already? Thanking you all, ladies and gentlemen. Seb. ___ 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] tracebacks
A) your SQL is wrong, you want a VARCHAR not a CHAR there. and i doubt 'NOW' is a valid value for a TIMESTAMP type in your DB. You'll be wanting a SQL function like Date(), not a string. Probably. Look in your DB docs. Not that I'm much of a SQL person - someone else will probably correct me. B) Now why you'd get a pickling error when you've got bad SQL i don't know - and 'cannot pickle objects' is a blantant lie. Surely that's what pickling's all about. Anyway you read the traceback from bottom to top. The error occured on line 348 of Connection.py, which threw an error in Transaction.py, blah blah, which threw an error in Publish.py, which caused Zope to exit the publisher and print the stack trace. seb. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Tom > Deprez > Sent: 01 August 2000 12:41 > To: [EMAIL PROTECTED] > Subject: [Zope] tracebacks > > > Hi, > > Can somebody explain me how you can use the given tracebacks > to find the > possible error? For example, I get the following error and I know what > causes it, but I don't know where I must go to find the > code-line where the > error starts: > > I get the following error when I use a table in which a field > is defined > with a default string value. > > eg : > > MY_NAME CHAR(20) DEFAULT 'tom' > MY_DATE TIMESTAMP DEFAULT '6/07/2000' > MY_DATE TIMESTAMP DEFAULT 'NOW' > > --- > Zope Error > Zope has encountered an error while publishing this resource. > > Error Type: cPickle.PicklingError > Error Value: Cannot pickle objects. > --- > > > > > Thanks for any advice. > > Tom > > ___ > 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] Requested Zope feature
yup, this is how i work too. how about adding some javascript to the manage_* methods that reload the related window (if it's open) whenever the source changes, too? a problem with this might be ending up with a mass of windows all over your desktop, which is invariably horrible. otoh, there's (almost) no js in the management interface at the moment, and i generally think this is a good thing. i hate js. i presume this was a design decision from the start? however, if this was to guarantee browser interoperability, why are there lots of frames everywhere? and there is some js beginning to creep in now (e.g. help screens). however, this functionality would not replace any existing interface bits so perhaps it's not a bad thing. and although i hate js it can be a very useful piece of evil. a dynamic tree on the left instead of a yuk frame that hardly ever reloads would be a nice thing too. just thinking aloud. seb. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of J. > Atwood > Sent: 09 August 2000 16:16 > To: [EMAIL PROTECTED] > Subject: [Zope] Requested Zope feature > > > A lot of the time I end up going into a > document/folder/method just so I can > click on the 'view' tab popping up a new window so I can see > it (option > click / right click). > > It would be very nice if DC could add a icon (or take over > the existing > icon) to pop a new window with the object ( a target="top" > href="object" ) > so you could view the object without having to edit it. This > would save > about 2 steps for something that, personally, I do all the > time. The link to > the object would still be for editing it. > > Just a thought. > > Thanks, > J > > > ___ > 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] Requested Zope feature
> I am currently implementing Skinnable objects for Zope > that'll allow you to > easily define an alternative version of the management > interface, and switch > between these interfaces very easily. You could build your > own version that > doesn't use JavaScript at all. this is fantastic news. as a newcomer to zope, i have found the (lack of) distinction between the programming interface and the content management interface troubling when designing content management interfaces for clients. every now and again i start creating new, simplified management screens that fit in with the branding of the site they manage; but eventually i find i'm duplicating the management interface and end up by giving up and teaching clients how to use that. is there any info on zope.org about these skinnable objects, or about this issue in general? how will they interface with the zope api? have you decided on the default skin functionality? when can we expect to see a release? i'm all excited seb. ___ 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] file uploading from IE browser
What's the HTML you're using for the upload? > > Hi All, > > I'ved followed the online How-To on implementing a simple service for > parsing uploaded files via the browser. But strangely, it > only works for > Netscape browsers. When I test the uploading using IE, the > supposed file > object becomes a string object, causing all sorts of > problems. How am I > suppose to get the file object from IE browsers? Thanks in advance! > > 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 )
Re: [Zope] personal portal and Palm syncronization
Yes, this has been on my wish list for some time, but there's no way I'm going to get round to it right now... Take a look at pilot-link (http://sourceforge.net/projects/pilot-link) for interfaces to the mail, todo, etc software on your palm. This will only really deal with workstation -> palm syncs, though, so you probably want MAL, the open source networked application link thingum from avantgo: http://www.mobilelink.org don't know how it works or anything though :) seb - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: 25 September 2000 16:28 Subject: [Zope] personal portal and Palm syncronization > > > I was building a personal site to weblog my engineering and personal stuff > (based on Squishdot and Event Folder), and the thought occurred to me that it > would be really neat > if I could syncronize my Palm to this personal site. Using the Event Folder, I > have a calendar, Squishdot provides the memos, I would need some other product > to do the ToDos, and some other product could provided the contact management > list. All that would be needed would be a way to sync between the Palm and the > Zope site. Any ideas? (Heck, I could even see a company providing this as > MyPalmPortal or something like that! Then I would not have to depend on a > particular computer to sync my Palm with and I would have a better way of > entering memos when I had access to a web browser. > > Any ideas how the sync would be done? > > > > ___ > 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] Product Testing
http://www.zope.org/Members/hathawsh/Refresh is the only way I know of to take away the pain of testing products. Seb -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Nestor A. Diaz L. Sent: 05 October 2000 01:06 Cc: [EMAIL PROTECTED] Subject: [Zope] Product Testing HI, i'm trying to learn how to make products, i have been able to modify the poll product that comes with the product tutorial, and now i'm creating a new product however i need to restart zope for the changes to take effect, i think i can omit this if i can compile (generate the *.pyc) in the product directory, can anybody send me a few bits of how can i made that? thanks, -- Nestor A. Diaz Ingeniero de Desarrollo Engendro.com - Comercio Electronico sobre Linux Email: [EMAIL PROTECTED] - WWW: http://www.engendro.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 )
[Zope] Base ZClass propertysheet management
I've got a ZClass "A" that subclasses another ZClass "B". I can use the default propertysheets/B/manage method to update B's properties; but how do I access the properties of A through the management interface? Many thanks Seb. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of knight Sent: 06 October 2000 10:05 To: [EMAIL PROTECTED] Cc: Mark Twiddy Subject: Re: [Zope] external method database connection Also, you could always import the specific module for your database, and create a db connection, then execute() and fetch() directly. Although, if you are putting this in an external method, it would be wiser to use your existing ZSQL methods ;] Knight [EMAIL PROTECTED] On Fri, 6 Oct 2000, knight wrote: > > > How do I get a zope database connection from an enternal method? > > You can access your db using your existing ZSQL Methods by calling them > from the namespace passed in, specifically self. > > Example: > > def myextmethod(self): > mfl_id = 3 > results = self.sqlCountUsers(mfl_id=mfl_id) > for result in results: > print result[0], result[3] > > > > Keep in mind that a list is returned, not a dictionary. > > Knight > [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 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] Base ZClass propertysheet management
Thanks, I'll rephrase it using my real life problem: I have a Picture class, which comprises image, title, description, etc. I also have a ProductItem class, which subclasses Picture to include a price, etc. So finally I have got a ProductItem class, which has a title, image, price, ... I can access properties inherited from the Picture no problem. The problem is that the default management screen for editing the properties of ProductItem, propertysheets/Details/manage, only provides a means of editing the unique properties of ProductItem. Is there a means of managing all the properties of a ZClass, including those of its parent class? Or do I have to code my own management screen to do this? And if so, what is the correct way of refering to these properties in DTML? Feeling a bit dumb...cheers, Seb ___ 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] overriding __str__ method?
Hi, What I'd really like to do is have inline content-management. I don't know if I'm completely up the wrong tree, and some advice would be much appreciated. My reason: Correct me if I'm wrong, but the zope security model does not allow me exclude an authenticated user from knowing that an application-logic object (e.g. 'view_status') exists, when she's in the 'manage' interface. This means she gets to see lots of horrible things which it would be better to hide from her. Apart from that, the whole interface-skinning project doesn't seem to have happened yet, and I think the present interface is a bit ugly. My strategy: Each element that I want the user to be able to edit is a ZClass with a manage_content method. This provides the custom management view (e.g. combines properties and title/data into a single form). Now I want a way to give the user access to this screen. I could do a new version of the folders tree view (manage_menu), but what I'd really like to do is have a button next to each of these elements ("edit this") which calls its manage_content method. The button would only appear when the user was authenticated / authorised. My problem: The only place I can think of doing this is in each object's __str__ method. But AFAIK there's no convenient way of overriding its default behaviour. What I'd like to do is override it in the ZClass views interface. I can override the 'View' method (from the ZClass 'views' tab), but that doesn't get called in the course of rendering a component in a page. The problem would seem to be that there's no equivalent of the __str__ method available to override... Or is there? Otherwise, I suppose I'd have to edit each object type's __str__ method directly. Or patch the publishing mechanism, but I've not had the guts to look at that yet. yuk. I'd rather not. Can anyone shed any light? Cheers, seb ___ 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] security quickie
Does Zope security provide a way of restricting what objects are listed to an authenticated user inside the Zope 'manage' interface? I'm getting my head all twisted up over this security / proxy roles /local roles lark. Thanks, seb ___ 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] overriding __str__ method?
Thanks for the reply, > Either I don't understand the problem or you're making it too > complicated. I think both, but mostly the latter ;) Explanation MK II: I know how to create a form that does what I want (update properties, whatever). What I don't know is how to include it as part of the rendered content programmatically. At the moment users have to go to www.widgets.com/manage_content, log in, and see a set of forms loosely based on the Zope manage interface. Instead, I'd like them to go to the same url, and see exactly the same website as someone who's not logged in, except they have these lovely little "edit this" buttons next to each editable content element (by which I mean image, text snippet, etc). Now I *could* do a edit this in each content element. But I'd much rather be able to subclass or mixin an 'editable' class for each content element in question. The question is, what methods should I be providing to manipulate how the content is rendered? For example, I can provide a new 'view' method in the 'views' tab for a ZClass, but this does not get called when an object is rendered as part of another document. The reason I was going on about __str__ is because that seems to be the only place that you can interfere with how the content is rendered inline? Hope that's clearer, seb. > > You have a form to edit the properties. > ... > > ... > > The action method of this form sets the REQUEST variables to the > property names: > ... > > ... > (I generally use the same names for form vars and property names > to avoid confusing myself) > > then: > > > Does this help? > > > > Seb Bacon wrote: > > > My strategy: > > Each element that I want the user to be able to edit is a ZClass with a > > manage_content method. This provides the custom management view (e.g. > > combines properties and title/data into a single form). > > Now I want a way to give the user access to this screen. I > could do a new > > version of the folders tree view (manage_menu), but what I'd > really like to > > do is have a button next to each of these elements ("edit > this") which calls > > its manage_content method. The button would only appear when > the user was > > authenticated / authorised. > > > > My problem: > > The only place I can think of doing this is in each object's > __str__ method. > > But AFAIK there's no convenient way of overriding its default behaviour. > > What I'd like to do is override it in the ZClass views interface. I can > > override the 'View' method (from the ZClass 'views' tab), but > that doesn't > > get called in the course of rendering a component in a page. > The problem > > would seem to be that there's no equivalent of the __str__ > method available > > to override... Or is there? ___ 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] Animated GIFs
> > I also tried to name the animGif explicitely animGif.gif instead > of animGif - guessed what? - same problem! > > Any more ideas, please? > have you tried doing a diff on the zope and non-zope versions to see if zzope's somehow mangled it? seb ___ 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] Animated GIFs
right-clicking the image in question and "save image as..." should give you the precise data that zope's storing internally - that's what you did, right? it seems very unlikely to me that zope does mangle images though. and doubly unlikely that it unmangles them again just for your diff. is it a browser-related issue? have you tried it in IE & netscape? if you want to send me the gif i'll try it out, when i get some time (tomorrow probably) seb > -Original Message- > From: Lars Heber [mailto:[EMAIL PROTECTED]] > Sent: 09 October 2000 15:29 > To: Seb Bacon > Cc: [EMAIL PROTECTED] > Subject: Re: [Zope] Animated GIFs > > > Seb Bacon schrieb: > > > > > > > I also tried to name the animGif explicitely animGif.gif instead > > > of animGif - guessed what? - same problem! > > > > > > Any more ideas, please? > > > > > > > have you tried doing a diff on the zope and non-zope versions to see if > > zzope's somehow mangled it? > > > > seb > > Yes, I did. They were absolutely identical! > > I 'diffed' the original and the up- and redownloaded version. > > Perhaps I should 'diff' the original with the version which is inside Zope > - but how to do this?!? It's an object, isn't it? > > ___ 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] tell-a-friend product?
> Hi, > I am still new to zope and am wondering if there is a tell-a-friend > script/product/example floating around for me to look at? If not, > and I made my own form with Zope (which I have not done yet), > what variable would call the existing page the user was on ? > The url of the current page is URL0. Check out the environment variables in the Zope Quick Reference or do a to dump them all. You'll want to use the sendmail tag to send the link to the friend. good luck, seb ___ 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] dtml-tree advice, please
> I think you mean seb ___ 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] expr="id <> 'index_html" issue
> > try : > > > > title_or_id> > > > that should be (quotes round id) would also work. This is because sometimes id is a property, sometimes it's a method. The former version would work in every case; the latter only where id is a method. It's annoying, but there's talk of providing a getId() method for every object to sort this inconsistency out. seb ___ 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] Access Control vs Publishing Protoco
> > This is because the thing which makes > > the problem hard is that something like standard_html_header > wants to be > > editable by Managers TTW, which means it also has to be visible TTW. > > However, it's probably not something you want exposed to anonymous > > users, especially as a TTW enitity in its own right. objectIds is my > > other favourite example ;-) OK, I'm still a newbie, and in particular I have yet to get my head round zope security properly. But I'm going to attempt to comment on this anyway. For me, the 'visibility' problem is a real bugbear. Apart from the 'security' issue of anon. users being able to list objectIds, it means I am loathe to allow clients to manage their sites through the manage interface. This is because they'll see it littered with methods which pop up a login box whenever they click on them. It looks horrible and unprofessional. Anyway, I agree with Dieter / Chris. Adding a 'URL Traversable' ('listable'?) permission to all objects and then tweaking methods that do the traversing (objectIds, objectValues) would presumably fix this? Would this be easy? I've never had a look at the security internals, but I'm looking forward to having a go... Chris W was talking about adding security on a protocol level as well as an object level, but I can't really see why you would only want to be able to edit a document through webDAV but *not* TTW. In my mind, you're either authenticated to do a task, or you're not. It doesn't matter *how* you do it. That's why 'listable' or something like it would be a better name for the permission than 'URL Traversable', IMHO (although they both sound *ugly*). Someone mentioned they found the ftp access permission useful - I'd be interested to know how / why. seb. ___ 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] Quoting
> Quote all characters not allowed in a > cookie wouldn't do the job? That reminds me, it's silly that there's not , so I patched my zope to provide it. I was wondering if there's a mechanism for getting this kind of simple tweak into the source tree? seb ___ 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: Upload just file headers?
Hmm, well you certainly can't do it at the browser side. A well-formed HTTP header should contain a content-length attribute which you can examine. However, deciding whether to accept the file or not would I imagine not be possible inside zope since the whole POST operation is handled by ZServer, so you probably have to write a cgi script to do it. For example, if you wanted to stick with python, you could use the cgi module. You'd examine the header, and if you were happy, you could pass on the data in a new POST to zope. If you were unhappy, you could return a value from the cgi. This is all off the top of my head, and I'm sure there must be a nicer way of doing it than that. It's not nice having it all outside zope. but it should be a start, at least. seb > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Paul Winkler > Sent: 11 October 2000 06:52 > To: Zope mailing list > Subject: [Zope] Re: Upload just file headers? > > > Still haven't found an answer, after 4 hours searching the > egroups archive. > > Just to clarify: > I need to read the headers of the files BEFORE I upload the > entire file, because the files may be very large and I need > to be able to give a warning if the file does not meet > certain criteria. Example: a jpeg file of 500x400 pixels, > approx. 200 kb when the application, to be used in an > application that needs much higher resolution in order to > look good. I want to avoid wasting 50 seconds or so > uploading this file just to find out that it's no good. > > If I could upload the first bit of the file (1k should be > plenty), I could open it with PIL and check the size > attribute. (I've verified this by doing head --bytes 500 > foo.jpeg > test.jpeg and then opening test.jpeg in python - > it works even though the file has been truncated.) > > > I wrote: > > > > I'd like to make a form that looks like the typical file > > upload form, but will upload ONLY the header of the chosen > > file. > > Anyone know how / if this can be done? > > > -- > .paul winkler.. > slinkP arts: music, sound, illustration, design, etc. >web page: http://www.slinkp.com > A member of ARMS: http://www.reacharms.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 )
RE: [Zope] int and string comparisons
if you're submitting from a form, you can coerce strings into other data types by giving the form items special names, e.g.: Your REQUEST then has variables called foo and bar which are ints and floats, respectively. also, don't post html mail - not everyone can read it. seb. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Manuel Amador (Rudd-O) Sent: 12 October 2000 09:12 To: [EMAIL PROTECTED] Subject: [Zope] int and string comparisons This is the snippet selected CONVERTIR A INT >&dtml-sequence-item; The comparison fails because item is an int and REQUEST.begin_day is a string (i guess). How can I coerce item into a string, or REQUEST.begin_day into an int? I tried python's builtin int() function around REQUEST.begin_day. Won't work. Any suggestions? -- Manuel Amador (Rudd-O) ___ 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] Content Management System
This query started out in a separate thread about permissions, but it's sufficiently important to me to pose again here. I've been struggling to make the CMS abilities of zope user-friendly enough for 'joe average' end-users. Really it's designed for a 'power' content manager who delegates, secures, and generally has taken the time to study all the Content Management docs, etc. However, most of my clients don't have those kinds of requirements and aren't that technologically savvy, so I end up coding ultra-simplified interfaces for them on a per-project basis. I know you can restrict permissions on just about every available method, and I am aware of the current skinnable zope project, which may improve the situation drastically. But I'm interested to know, how many of you offer the Zope TTW interface to clients as a content management system, and how many just use it as a development interface? I'm beginning to wonder if content management and system administration should be split out into separate subsystems. Or if a CMS Tool Kit should be developed. (workflows, syndication, etc...). But I'm still far from being a zope power user myself, and have yet to appreciate the range of its potential. What do you people think? Seb. ___ 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] Access Control vs Publishing Protoco
oops, I forgot to foward my last mail on this subject to the list. My response here to Dieter's response captures contains the main points though... > > > I think, the implementation would be easy. > > > Management, however, would be more difficult, as there are no > > > good defaults for the "URL Traversable" permission. > > > It is not easy, to determine (e.g.) for a DTML method/document > > > whether it is only used as a component (such as > > > "standard_html_header") or is a full grown presentation method. > > > > Um, I don't think I understand. [ snip ] > Currently, Zope tries to have very few explicit, object specific > permissions. The ideal is that permissions are specified high above in > the hierarchy and acquired by lower objects. > This is quite possible with the current scheme. > Implementing an "URL accessible" permission would require > much more tweaking of single object permissions. > > There are other ways to solve your problem by organization > (putting things that should not be seen somewhere else) > that do not require an additional permission. Now I understand... I would disagree, however: I think there is a sensible default value. The default would be that anonymous does not have 'traverable' permission, but the manager / owner does. The cases where an authenticated user is able to traverse some objects but not others would, as you point out, be rare, because you could instead manage these by organisation. You would still use organisation to avoid having to set too many additional permissions. However, this solution would solve the 'security' issue of the anonymous user being able to list objectIds in any folder TTW. It would also allow the developer more flexibilty in how they designed their application, which can only be a Good Thing? seb. ___ 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] Access Control vs Publishing Protoco
Oh dear, I fear that this is going round and round and round in circles a bit, and that no-one else is following it, but here goes anyway :> > The "traversable" permission would be an additional requirement > to view any object. Its main purpose would be to distinguish > between "use via Web" and "use in DTML only". > "standard_html_*" would be usable in DTML but could not be viewed > via the web. They would not give "traversable" permission to > Anonymous. > Many DTML objects, however, would need to give the "traversable" > permission even to Anonymous in order to be useful. OK, I think we're talking about the same thing now...but could you give me an example of any object that would need to be traversable by Anonymous? index_html, for example, doesn't need to be traversable (I still prefer 'listable'). Viewable TTW, yes, but that's all. seb. ___ 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] product.dat
In the Zope PTK there are a couple of products that have been packaged as product.dats. What format are these? How do I do it? Cheers seb ___ 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] Dymanic sort="&dtml-a_dtml_var;" in DTML?
I needed to do this a while back and a kind fellow sent me some patches to do just this. Unfortunately my old email is unavailable at the moment, so I've forgotten who it was. The syntax was I'll dig out the patches as send them to you. seb > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Joel > Burton > Sent: 17 October 2000 19:22 > To: [EMAIL PROTECTED] > Subject: [Zope] Dymanic sort="&dtml-a_dtml_var;" in DTML? > > > I'd like to create a DTML method that lists objects, sorting either by > name or modified-date. I know I can do this by: > > > >... > > >... > > > > However, this requires lots of code. I'm trying to do it like this: > > > Sorted by &dtml-sortby; > > >() > > > > I have a property, sortby, of the enclosing folder set to > "bobobase_modification_time"; when this method is called, it > dutifully reports that sortby=b_m_t; however, it doesn't sort things > this way (I can't tell exactly how it is sorting them, and when I > refresh, the order occasionally changes.) > > Any ideas? > > -- > Joel Burton, Director of Information Systems -*- [EMAIL PROTECTED] > Support Center of Washington (www.scw.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 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] Hosting?
You could DIY: I bought myself a server (256Mb RAM, 20Gb RAID1, Athlon Thunderbird 850Mhz) and I'm getting it colocated at one of the best-wired places in the UK. The bandwidth can be upped on a month-by-month basis. This way you get full control over everything. My costs: server ?650 (that's about $500 I think) hosting ?37.50 / month for 1 Gb / 512k burst (about $30) time to set it all up :S Of course, the hosting gets *much* cheaper as you buy more, but this scheme suits the way I intend to grow. I believe hardware and bandwidth is even cheaper in the states, so why not consider something like that? seb. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Paul Winkler > Sent: 26 October 2000 20:16 > To: Zope mailing list > Subject: [Zope] Hosting? > > > Hi, > > I'm wondering if anyone can recommend a commercial Zope > hosting service for me. > I've looked at the resources page on zope.org, and I have a > couple feelers out, but I'd like to ask the community for > recommendations as well. > > Requirements: > > I need a system that can handle a potentially very heavy > load, though at first it will be quite small - we're a > startup and have no customers yet. > > Location: We're in the northeast USA and most of our users > will probably be in the US as well, so I'd prefer a service > in North America. > > Zope: 2.2 at least, and access to install new products and > external methods. > I'm currently on codeit.com, but they have zope 2.1 and I > need zope >= 2.2 so I can use my custom product derived from > PTK 0.9. > > Storage: We're doing things with digital images - *big* ones > - so we need to start at about 100 MB and will need to grow; > we'll be storing a *lot* of data for our users. Eventually > (probably not until later in 2001) we'll need MUCH more - > possibly up to 1 GB eventually. (Beyond that point we will > probably just rent a server at rackspace.com or somewhere > but first we need to be able to develop a big enough > customer base to pay for it.) > > Data transfer: Several times greater than storage. Users > will upload large files which we will then download to our > local network, so that's at least 2x our storage needs, plus > there's the transfer involved in just using the site. > > Pricing: since our storage requirements will be continually > growing, I'd like a payment plan that enables us to pay for > the storage we need and add more as needed. > > -- > .paul winkler.. > slinkP arts: music, sound, illustration, design, etc. >web page: http://www.slinkp.com > A member of ARMS: http://www.reacharms.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 )
[Zope] wondering about rendering
A simple question that's been bugging me: Regarding a "FooDocument/BarMethod": How do I reference the content of FooDocument inside BarMethod? At the moment, I'm using which seems to call the __str__ method of FooDocument; or in both view_1 and tableise, I get infinite recursion, of course. But I can't think of how else I might do it. Putting in tableise makes all the HTML in view_1 render html-safe (< > etc). I was tableise to display view_1's HTML but not render its DTML. Any idea, anyone? Thanks, seb ___ 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] ZMailIn
It sounds like you're thinking about a project management thing. Depends what you want to do with it, and what your zope setup is, but if you've got enough control over the zope box you're using, you could consider worldpilot + imap. You could customise it to your specific needs, plus have the all the benefits of a webmail type application. Might be worth a look. seb. > [EMAIL PROTECTED] wrote: > > > > Has anyone thought of using SendMail (or any other e-mail > program) to send > > e-mail to Zope and have that e-mail be loaded directly into a > specific folder > > (say, based on the e-mail address or subject line)? > > You could probably build something using ZMailIn: > > http://www.zope.org/Members/NIP/ZMailIn > ___ 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] product permissions problem
hello all once again, I've got a DTML method in a product, which calls objectValues('Folder') to list some folders that are contained within the product itself. When I try it out inside the product, it works. When I use it as part of the constructor form, called from an other location, I get an unauthorized error. objectValues('Image') doesn't throw the error, so I think this must be to do with the 'Access contents information' permission mapping on the folder inside the product. (?!) I've tried giving the method a Manager proxy role to no avail. Any hints received with gratitude. seb. ___ 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] Products : dependencies (or who's on first?)
> Okay, here goes : > > I installed the PTK product some time ago, decided that it wasn't where I > needed to be right now and moved on to something else. > > Today I finally decided to delete it from my Products folder. Shortly > afterwards, I noticed that both my existing FlexFAQ and ZDiscussion > objects were "broken" (with the little broken icons in the manager > view.) and Zope was spewing errors to STDOUT complaining that it "Could > not load oid" (I'm sorry, I don't have the traceback...doh!) OK, here goes for an almost completely useless answer based on guesswork and half-memories. More of an extra call for help from the zope experts, really. AFAIK this kind of problem is caused by incorrect management of products. For example, you'll get grief if you delete a product from the control panel but it still exists in your products folder in your zope distribution. I guess the ZODB is somehow out of sync with the filesystem, and this is why you're getting 'dependency' errors. Umm, help me out someone - this is all guesswork on my part... As for solutions, some people have suggested sorting the problem out by going into the ZODB itself via an interactive python shell and poking around (there was a recent mail about this on the list). If all else fails, you could try getting a fresh Data.fs and importing your old data into it, and reinstalling the products you use. I too have learned the hard way, and now I back up my Data.fs before messing with products beyond my ken, but this is of course not helpful advice for you right now. This problem comes up again and again. If my guesswork is right then this is all because the product management process is ambiguous, undocumented (...), and lets you do things you shouldn't. Is there a HOWTO on this anywhere? Should product management be easier? Should there at least be some warnings added at appropriate places in the interface? Or have I got the whole thing totally wrong?! Hope that helped just a little bit at least ;> seb ___ 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] Help wanted on Zope ZClasses/DTML please.
Hi, just some quick pointers (I'm in a hurry...) refer to http://zdp.zope.org/projects/zqr/ZopeQR for more details > > > What is the correct way to use manage_delObjects? should work. What you wrote looks for an object with id "the_id". In fact you want the value of the_id, which is evaluated for you when it's in quotes (think of everything in quotes as python). > Is there a way to get the > name of an object's parent (or its own name for that matter) and use it to > construct a URL? gives you the parent > 3) When redirecting or linking to a page I have already visited, how can I > force a refresh? I tried the JavaScript window.location.reload(true) but I > think that is only supported by Netscape. It didn't work in IE5 for me > anyway. window.location.reload() works for me... > 4) What is the best way to handle security with ZClasses. In my example I > want the index_html pages to be public but everything else to require a > password. I managed to require a password for a particular instance of the > UAPage, but that affects both the index_html and the edit pages. you can attach permissions to specific methods in a ZClass by mapping them to existing permissions in the 'define permissions' management tab. cheers, seb. ___ 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] Can somebody please help me....
> )"> seb. ___ 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] Help wanted on Zope ZClasses/DTML please.
> I have worked out thanks to Seb's comments that the problem I > have with the > use of manage_delObjects is (I think) that I am passing in the title or id > of the object to be deleted rather than the object itself. Not quite... manage_delObjects takes a string which is the id of the object to be deleted. Your example was passing a string 'the_id' to the method. I might have interpreted what you were trying to do wrongly, but I believe you actually wanted to pass the _value_ of the_id. > I want to put the object into the REQUEST so I can still access it from a > different namespace - at the point I want to do the deletion, my target > object is out of scope. In fact you just have to put the correct string into the REQUEST and then make sure you have the object you're trying to reference in your current namespace, e.g. by using . If you need more help, post the snippet you're working on again. seb. ___ 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] User Source choices
This is a bit off-topic, but I wondered if anyone has any opinions on the matter. I'm going to use LoginManager for my user folder stuff, and I'm wondering which type of DB to use to store user information. Has anyone any advice about this? Here's some of the free choices with what I know about them: MySQL is my first choice because I know it well postgres has transactions, stored procedures, but can scale badly SyBase I know nothing about LDAP (e.g. OpenLDAP) is optimised for this kind of thing, but I'm not sure I've quite grokked it yet Should my choice be dependent on the quality of the adapters available, or are all the adapters much the same? any comments appreciated, seb ___ 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] Python Methods Vote
> Is there any way you can see what the results are looking like without > having to vote again? Don't worry, there's no need actually to count the votes. Despite the fact that this race went right down to the wire, according to my complex computer-based prediction models (based on exit polls and incredibly detailed statistical analysis) I can hereby announce that "Python Script" is the outright undisputed winner :) ___ 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] Product removal stress: a plea for help
If anyone can shed some light on this it would be a great help to the newbies out here. Perhaps I could even do a HOWTO, and lighten the load on the list considerably ;) I don't have a solution to Alexander's problem quoted below, but it's one I keep hitting and one that is frequently asked on this list. In fact it's one I recently asked for more info on, to no avail. So I thought I'd add my voice to the clamour. Deleting products seems to be a very risky business in Zope. Things apparently get left behind in the ZOBD which shouldn't be there. If I delete a product that was used at some point elsewhere, I don't just get broken objects, I get pickled data streaming out of my Zope most of the time. Today I had an interesting one: I thought I had cleaned up thoroughly after an unwanted product, and I was getting no error messages and no pickled junk on stderr. The only thing I couldn't do is add ZClasses, for which I got the error message quoted by Alexander below (could not load object oid=[random character]). Please, can any Master Zopician give an explanation: 1) what causes this kind of error? 2) how do you debug it? 3) how do you fix your Data.fs? Thanks! Seb. * Alexander Chelnokov <[EMAIL PROTECTED]> [001108 18:21]: > Hello All, > > After a linux machine crash or cold restart something strange is going > on with Zope (2.2.2) - all objects built on ZClass-based products like > Yihaw or QSurvey are broken. Products are in Product folder, and i > even can add an object and it works, but when i try to access it in a > new browser window it reports > == > This object is broken because the unknown product that created it is > no longer installed or is installed incorrectly. Please contact your > product vendor for assistance. > Note that the data associated with this product has not been lost, and > will be accessible again if the product is reinstalled. > == > > Well, i removed QSurvey and tried to re-install its current version - > something goes wrong again: > > == > Zope Error > Zope has encountered an error while publishing this resource. > > Error Type: Could not load oid ={, pickled data in traceback info may > contain clues > Error Value: None > == > > Is there any way to fix ZODB less radical than complete reinstall? > > -- > Best regards, > Alexander N. Chelnokov > Ural Scientific Institute of Traumatology and Orthopaedics > 7, Bankovsky str. Ekaterinburg 620014 Russia > ICQ: 25640913 > > > > ___ > 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] Is data.fs corrupted?
Could I just butt in here and try and clarify what I've understood from this thread so far? I'm feeling a bit dumb about it but I'd really like to sort it out. 1) This problem is definitely a programming error 2) It arises when a product has a component which isn't 'registered' as a zope object, so it's not cleaned up when the product is deleted Is that right? What would 'registered as a zope object' mean in this situation? Are there any other circumstances under which you end up with orphaned instances? *how can it be fixed?* What I really don't understand is why seemingly unrelated products fail as a result of the orphan instances. Is is because new products are trying to get an oid which happens to be used by the orphan? If so, I don't think it's really so wrong to call this ZODB corruption, although I take your point about the ZODB being stable. In your perl analogy, it's as if you are using two tables to create a parent / child , one to many relationship. You then deleted a parent row but forgot to delete the corresponding child rows. You data is now corrupted. True to your analogy, this arises in sloppy programming, not in Oracle or whatever. However, when you create the tables in Oracle, you can place constraints on the tables so enforce the integrity of your data, to protect against this kind of programming. In a similar way, I think it's too easy to end up with corrupted data in the ZODB. Or perhaps I'm just particularly unlucky in the products I choose to use? cheers, seb > > I'd argue that the ZODB is a very independent component of Zope, and it > shouldn't be blamed for this. Devil's advocate question: if your Perl > application failed because it couldn't find a record in an Oracle database, > would you immediately chalk this up to database corruption and Oracle? > > We do clearly need to work on Zope tools to make it easier to find and clear > "orphaned" instances in the ZODB. We should also try to weed out the > programming errors which cause interdependencies of seemingly unrelated > components of the same Zope instance that cause failures like this. > Transactions are only tangentially related to this issue (I'm not sure how > the "Added globals" transaction 'referred to' the "Installed product > DemoPortal" transaction in your example, BTW). > > BTW, I'm being sort of pedantic because when people hear "ZODB" and > "corruption" in the same sentence, they tend to get scared and think of ZODB > as "unstable" which is really not the case... most purported "ZODB > corruption" issues are caused by programming errors in Products. This has > been the case for at least every one but one (the >2G pointer bug) that I've > personally seen. > > - Original Message - > From: "Bill Welch" <[EMAIL PROTECTED]> > To: "Chris McDonough" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Wednesday, November 08, 2000 2:59 PM > Subject: Re: [Zope] Is data.fs corrupted? > > > > In my case, I couldn't import DemoPortal.zexp or Wizard.zexp from PTK > > because oid 1377 was already in use. The pickle dump that followed > > contained references to ZDiscussions, which I had deleted some time > > before. > > > > After deleting the offending products and their directories, restarting > > zope, and packing, I ran tranalyzer -r on my problem Data.fs. I found that > > the problem oid was in this transaction: > > > > "/Control_Panel/Products/manage_importObject > > > > import into /var/lib/zope/var/Data.fs from > > /var/lib/zope/import/ZDiscussions.zexp" > > > > referred to by this transaction: > > > > "Installed product DemoPortal" > > > > in turn, referred to by this tranaction: > > > > "Added Globals" > > > > I think ZODB corruption when I see a record in one product refer to > > a record in an independent product and when the transaction of a deleted > > product doesn't go away. > > > > On Wed, 8 Nov 2000, Chris McDonough wrote: > > > > > > I think it is ZODB corruption. > > > > > > This is very unlikely. What makes you think this? > > > > > > > > > ___ > 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] zope.org down from Thu Nov 9 12:00:00 GMT 2000 to present?searchable list archive not linked to from mailman page; console-based zope development. list archive not linked to from mailman page; console-based zope development.
* Colin Leath <[EMAIL PROTECTED]> [001109 14:00]: > I'm trying to figure out ways of managing/developing with Zope from a > unix console, using text editors, text browsers and so on. I often work from emacs, accessing the ZODB through the Zope FTP Server on port 8021. The syntax for ange-ftp is /user@localhost 8021:/your/zope/object (you can get the space with C-q ) seb ___ 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] newbie question
* Stephan Goeldi <[EMAIL PROTECTED]> [001109 16:49]: > > > This is not much! > > > This is ok! > > > This is very much! > > > > I am sure that there is an error in my thinking of these tags. yup :) try This is not much This is OK This is very much This is not 1000, 5000, or 1 the tag iterates over a list, which isn't appropriate here. seb ___ 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] Is data.fs corrupted?
* Stephan Goeldi <[EMAIL PROTECTED]> [001109 13:30]: > I just asked the question lately, if it is safe to simply delete a Product > in the lib/python/Product folder, if it is not deletable via the > Control_Panel. Some told me that it is no problem. Now I am more unsure to > delete the stuff. for products that are not ZClass-based, the correct way to remove them is to delete their folder in lib/python/Products. seb. ___ 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] bad expression evaluation
I'm trying to compare two page titles, using this code: &dtml-my_title; : &dtml-get_page_title Now I can see on the page that my_title and get_page_title are the same. I have also tried comparing _.str(my_title) and _.str(get_page_title) just to make sure I was comparing strings. But the if clause always evaluates true. Any ideas? cheers, seb. ___ 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] Authentication
This is strange: when I type http://www.foo.com/roles as an authenticated user, Zope thinks I'm just an Anonymous user. When I type http://www.foo.com/roles/ It realises I'm authenticated. I'm using Apache / ProxyPass on Zope 2.2.2. Any ideas? seb. ___ 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] Deleted product breaks SQL_Method Advanced tab - How to fix?
> > How can I remove this object from the zodb? How do I find it? > > Any idea why SQL_Method even cares about this? there was a longish thread about this recently (search for something like 'Data.fs corrupted?!'). the upshot was, i think, that products that haven't been written carefully can cause problems like this because they don't get cleaned up from the DB when they're erased. seemingly random relationships between products (like yours) are often reported but rarely investigated. the possible solutions suggested were: 1) truncate your FileStorage (yuk) 2) reinstall the offending product, then go into the ZODB via the debugger, and do some surgery (yuk) 3) export all your objects, get a fresh Data.fs, reimport them (yuk) ___ 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] _delObject errors
When I try to call self._delObject('foo') from my Product, it seems to work, but I get an error logged: AttributeError: 'string' object has no attribute 'manage_beforeDelete' The offending line is in ObjectManager.py: def _delObject(self, id, dp=1): object=self._getOb(id) try: object.manage_beforeDelete(object, self) So, it would appear that self.getOb('foo') returns a string rather than whatever it's expecting. I presume this is because the object I'm deleting doesn't have some requisite base class to make it zope-manageable. It's a ZClass which has ZObject as its only base class. Am I missing something? Cheers, seb ___ 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] Web mail with POP3
* Aleksander Salwa <[EMAIL PROTECTED]> [001116 09:00]: > I need to build a web mail product with pop3 back-end. > There is WorldPilot, but AFAIK it has no pop3 support. > I'm thinking about taking web inteface/application design from WorldPilot > and writing code to talk to pop3 server (probably based on POPMail > product). What do you mean, 'pop3 support'? If you want people to access their mailboxes both through the web and from a pop3 mail client, then all you need to do is use a mail server like UW-imap which speaks both pop3 and imap. Then you can just stick with WorldPilot, for now at least. That's what I do, anyway. seb. - End forwarded message - ___ 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] Stupid Installation Question
* Ben Ocean <[EMAIL PROTECTED]> [001118 09:51]: > Hi; > Okay, hope I did this right... Installed Zope in a directory at doc root > (called zope) and untarred it. Now I have a directory called Zope-2.2.2-src > with a bunch of stuff in it. What do I do from here? How do I see it working? > TIA, > BenO umm, try reading the the README.txt file in that directory. and the INSTALL.txt file in the docs directory. seb ___ 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] Stupid Installation Question
* Ben Ocean <[EMAIL PROTECTED]> [001118 09:51]: > Hi; > Okay, hope I did this right... Installed Zope in a directory at doc root > (called zope) and untarred it. Now I have a directory called Zope-2.2.2-src > with a bunch of stuff in it. What do I do from here? How do I see it working? > TIA, > BenO umm, try reading the the README.txt file in that directory. and the INSTALL.txt file in the docs directory. seb ___ 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] Image Maps
* CURTIS David <[EMAIL PROTECTED]> [001120 16:46]: > I am looking for information on Image Maps using Zope. I know that you need to use >a CGI script to get the results that you need. The search engine displays some >products that seem similar, but not exactly. Is there a better way? I'd recommend doing imagemaps on the client side, and leave zope out of it. No CGIs, no page reloads to find out the target url. try http://www.december.com/html/demo/imagemap.html for an example. seb. ___ 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] Javascript & dtml tags
* Kini Natekar <[EMAIL PROTECTED]> [001121 07:36]: >Is there a way to include dtml tags with a > javascript ? If there is please let me know. if you mean, you want to insert a dtml tag into a document using javascript, then no. zope's a server-side technology; javascript is client-side. seb ___ 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] Support for PHP?
* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [001121 21:02]: > > This was discussed about a month ago. check the archive. > > conclusion was that you can do anything with dtml that php does, > though with perhaps a little bit more indirection. and you can do _more_ in python than in php. python's a 'proper' language suitable for writing whole apps (e.g. Zope, Medusa) - PHP's going that way with Zend but it's not there yet. seb ___ 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] Exception msg rendering
LoginManager displays a login form by calling a page something like this: this works fine on one of my boxen but not the other. The bust one raises the exception but doesn't print the message. Instead it renders my standard_html_header and standard_html_footer, with the stack trace in comments at the bottom of the page. Please! Can anyone point me a what might be causing this to happen? cheers seb ___ 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] Re: [Zope-dev] SQL-Methods Through-the-FileSystem
Hi Johan, > Does anybody have a good suggestion how to > develope SQL Method ftfs (through the filesystem) > rather than ttw. > > Perferably in someway similare to the HTMLFile way try something like this: from Products.ZSQLMethods.SQL import SQL import PoPy def manage_add_user(self,email,password): conn = 'PoPy_database_connection' self.sql_add_user=SQL('sql_add_user', '', conn, 'email password', _sql_add_user) _sql_add_user = """ insert into tbl_users(email,password) values ( , ) """ hth, seb ___ 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] LoginManager Help.
* Jason C. Leach <[EMAIL PROTECTED]> [001126 20:46]: > hi, > > So I have LoginManager installed. The easy part. Now I'd like to know how > to use it. To start with, I'd like to authenticate against a standard > acl_users folder or a plane text file w/ username/passwords in it. OK, I've just struggled with this and won. I wanted to write a How-To but it's too late in the evening to consider right now. So, here's some notes that might become a HowTo: 1) Why LoginManager "LoginManager is a User Folder workalike and replacement which solves the "N * M" problem seen with previous User Folders." (http://www.zope.org/Members/tsarna/LoginManager) Hmm, OK. What I *think* this means is that you can use LoginManager to do all the security heavy lifting for you. All you have to do is tell it how to decide if someone's authenticated or not. A bit like PAM in Linux, if you know about that. With other types of UserFolder, you're stuck with SQL or LDAP or some other flavour of user storage you decided on a couple of months ago. If you want to change the type of user store, you have to tinker with the business logic too. With LoginManager, it's more or less just a case of plugging in a new data source. You can have more than one data source and have LoginManager authentivate against each of them in order. You can do even cleverer things but I'm not sure about that yet. 2) How This is the only way I've worked out how to use it. I know there's better ways of doing it because I've seen mails to thateffect from Ty. My way is the GUF-compatability way. - Add a LoginManager to your test folder that you created so you didn't mess any other folders up in your Zope by accident. Have it generate a GenericUserSource for you. - Click on its UserSources tab. This is where you can add UserSources, like your LDAP User Source and your Plain Text File User Source. - There's a UserSource in there already for you (a GenericUserSource, indeed) - Add 4 methods to it: userAuthenticate, userDomains, userExists, and userRoles. (see example below) - That's it! Watch your folder become inaccessible because you made a mistake in your authentication methods! - The methods tab of the LoginManager has some default forms. - If you want to log in a user from another page, create a form which posts fields called __ac_name and __ac_password to a method which doesn't have anonymous user access. (see the example loginForm for an example) Here's an external method which authenticates against a SQL database with a ZSQL method that's in the UserSource. Commented out is a cheesey hardcoded username and password example: def userAuthenticate(self,REQUEST,username,password): if self.SQL_authenticate_user(username=username,password=password): #if username=='seb' and password=='boogaloo': return 1 else: return 0 def userExists(self,REQUEST,username): return 1 def userDomains(self,REQUEST,username): return [] def userRoles(self,REQUEST,username): return ['Editor','Manager'] If you want to authenticate against a plain text file, it should be fairly easy to work it out from this example. OK I've got to go to bed. If anyone who knows more wants to let me know, I'll try and compile it into a better guide. I'm sure I've got most of this wrong - but it seems to work for me, so maybe not... There's already a SQL-LoginManager Howto which I don't want to repeat, but I already have. It's at http://www.zope.org/Members/jok/SQL_based_LoginManager. seb. ___ 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] newbie question: Redirect from Python?
* Paul Winkler <[EMAIL PROTECTED]> [001127 19:54]: > I want the user to be sent to a particular URL after calling the > product's manage_add method. How can I do that? > The URL I want is REQUEST['URL3']. > > I've tried RESPONSE.redirect(REQUEST['URL3']) but that's not it - the > RESPONSE doesn't seem to exist here. sounds alright to me. are you calling it in quotes, e.g. ? you shouldn't have to use the REQUEST to look up the variable, 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 )
Re: [Zope] security
* Dieter Maurer <[EMAIL PROTECTED]> [001128 00:12]: > Bowyer, Alex writes: > > Can some one explain how the Define Permissions screen works. I really don't > > understand the concept behind it, what does it mean for a permission setting > > to own a permission? > > > > All I need to do is to make certain ZClass methods have a certain level of > > security and the other methods of the class have no security. > It is quite good explain in the upcoming Zope book. In fact, I think Alex was referring to ZClass security, which isn't covered in the book, and is something I've never go to the bottom of either. on the 'define permissions' tab, it says: The table below has two columns. The first column lists the permissions for this object. The second column specifies the permissions that should have this permission in this product or ZClass. I'm probably being intellectually lazy or something, but that doesn't make any sense to me at all. seb. ___ 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] VHost logs.
> In a manner of speaking, yes. That is, Apache needs to have correctly > configured VirtualHost directives to handle the requests from the > outside world appropriately, and Zope needs to have the SiteAccess > product installed with correctly configured SiteRoots and access rules. > It takes a little bit of time to figure out, but it works like a charm > and is really quite simple, once you wrap your head around it. There's > a great HOW-TO on this at http://www.zope.org/Members/anser/apache_zserver. I would also point you to http://www.apache.org/docs/vhosts/mass.html for more info on the apache side, particularly this bit: The main disadvantage is that you cannot have a different log file for each virtual host; however if you have very many virtual hosts then doing this is dubious anyway because it eats file descriptors. It is better to log to a pipe or a fifo and arrange for the process at the other end to distribute the logs to the customers (it can also accumulate statistics, etc.). > Another benefit of this setup is that it can allow for both regular HTTP > and SSL connections to all of your sites, so you can remotely access the > manage screens without sending your passwords in the clear. A HOW-TO > for this lives at http://www.zope.org/Members/unfo/apache_zserver_ssl. > I still haven't figured out a clean way to make it impossible to access > sensitive areas UNLESS you're using SSL, however. Anyone out there > doing this? mod_rewrite is your friend. You just make a Rule that redirects anyone accessing your site on port 80 to port 443, something like this: ServerName www.foobar.com RewriteEngine on RewriteRule ^/(.*)https://www.foobar.com/ seb ___ 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] ZClass security : a solution
* Bowyer, Alex <[EMAIL PROTECTED]> [001129 22:21]: > Essentially what we are doing is saying "If you want to View this object, > you have to have the Manage Properties permission" > > There are probably better ways, but if it ain't broke don't fix it. > > I don't understand why you have to choose a permission for each permission > (which is a very confusing concept). It would be much better if you could > choose a role to say e.g. "If you want to View this object, you have to have > the UAAdmin Role" yep, that's what I figured it had to mean. however, I tried it and it didn't work. This is probably because I messed up where the user was defined or something, but the whole thing took so long even to try out that I gave up. Are we the only ones who find it counter-intuitive?! or at the very least, downright unpleasant... perhaps it's just ZClasses. It usually is :) I gave up and did it in a product eventually. seb ___ 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] User mangement
* Sven B. <[EMAIL PROTECTED]> [001130 10:34]: > Zope has a function "get_valid_userids()". > Now my question; > How is it possible to get something like (username;role;path)? sven, refer to the ZQR: http://zdp.zope.org/projects/zqr/ZopeQR and look for the section describing the AUTHENTICATED_USER object. seb ___ 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] VHost logs.
> > ServerName www.foobar.com > RewriteEngine on > RewriteRule ^/(.*) https://www.foobar.com/ > of course i actually meant: ServerName www.foobar.com RewriteEngine on RewriteRule ^/(.*) https://www.foobar.com/$1 ___ 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] VHost logs.
> > mod_rewrite is your friend. You just make a Rule that redirects > > anyone accessing your site on port 80 to port 443, something like > > this: > > > > > > ServerName www.foobar.com > > RewriteEngine on > > RewriteRule ^/(.*)https://www.foobar.com/ > > > > I don't want to force ALL access to port 443, only certain sections of > the site which require authentication to access. I guess the above > still holds true (your correction in a later message is noted), I just > need to get more creative with my rewrite rules. Thanks for the tip. FYI, in these situations I put bits I want to enforce SSL on in a folder called secure, and then do mod_rewrite variations on RewriteCond %{REQUEST_URI} ^/.*secure.*/ RewriteRule ^/(.*) https://www.foobar.com/$1 seb ___ 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] Fragments of html in IE (Was: Why Not Zope? ...)
* Riku Voipio <[EMAIL PROTECTED]> [001201 10:46]: > Besides, the zserver on 2.1.6 seems to have bugs that sometimes let > the page only 90% through. I don't know if your 90% problem is the same as the one I've been having, but I'm scratching my head a lot here: When I test my site using IE5.5, the page seems to get fragmented somewhere along the way. Usually, all but the last few bytes arrive at the browser. Sometimes _only_ the last few bytes arrive at the browser. But using NS under 'nix, everything's fine. I've tried running the HTTP headers from each browser through a telnet session and I seem to get all the data every time. Has anyone else seen this behaviour? You can check it out at http://test1.jamkit.com and if you're running IE you may see either a stray on a white background. Cheers, seb ___ 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] IE5 / Medusa bug?
Tempting fate by claiming a bug...but although I'm sure I'm at fault here, there's no sensible reason for the results I'm getting. When I view one of several different pages with IE5, the last 11 bytes don't reach the browser. I've got a couple of other people to try it out. One of them reported the same symptoms, the other didn't. I don't get it with Netscape. I'd *really* appreciate it if anyone who has IE5 could have a go at http://test.jamkit.com and let me know (you can tell if the bug's happened if the source ends abruptly with something like 'http://test.jamkit.com/index_html works :S - It's not related to the bad HTML in that example page (I've tried pages with perfect HTML) - It's related to how I've built the page (the Zope Welcome screen is fine, other pages built using the same product don't work. The product I'm building is a folderish thing with lots of extra navigational services) - it's always the last 11 bytes that are missing, however large the page is - I've sent exact copies of the HTTP headers to the server, using telnet, and there's no problem there I imagine the fact that I can make it work by adding index_html is the most telling point, but it's not telling me anything ;) I'll continue my research by eliminating elements until I've nailed down exactly the bit that's messing it up. Right now, though, I have to go to bed. Meanwhile, any comments? Cheers, seb ___ 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] IE5 / Medusa bug?
Firstly, apologies for cross-posting - this should probably move over to zope-dev henceforth. Secondly, thanks for the replies. In my small sample, it appears that 3 out of 7 IE browsers got the bug - no other flavours had a problem at all. They were mostly versions 5 and 5.5. If there was any pattern, it's possible that 56-bit versions were the baddies, but that's not clear yet. As Martijn correctly pointed out, there seems to be a Content-length problem going on here. I did a lot more tests on two different 2.2 servers, and have come closer to isolating the bug. Contrary to what I said, it *is* triggered by bad html: the tag was missing. In documents of a certain length (at least 2000 bytes), which contain the tag, but don't have a tag, the Content-length is consistently reported as 14 bytes too short. This is regardless of the actual length of the document. Why this should have a knockon effect on a small subset of MS browsers, I don't know. Especially confusingly random is the requirement for a certain amount of data to break these browsers. Even more mysteriously, if I replicate the data which zope is sending to the browser using netcat (bad content-length, same content), IE doesn't complain. Things like Keep-alive perhaps spring to mind? Anyway, I have fixed the problem in terms of my users by adding the tag, but this looks suspiciously like a ZServer problem as well as an IE rendering problem. I'm off on holiday tomorrow evening and I don't have any more time to investigate. I haven't checked against other versions of Zope, but the one I'm using is only patched in DT_Util.py. This is such a dumb problem it's just *got* to be my fault somewhere down the line :) I'll check against other servers when I get back (mid Jan - long holiday :-) cheers, seb ___ 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] Pesky DateTime problem
> The problem lies in adding an instance of the job board ZClass at which > point Zope reports an "Invalid Date-Time String". You might have considered this already, but you're not supplying a default date in the DateTime field of the form. This can cause problems, because there's a bug in zope that won't allow null values in DateTime properties. hth seb ___ 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] commit_sub error in Product
I'm writing a minimal product for which I'm getting a Error Type: AttributeError Error Value: commit_sub from the transaction machinery. The traceback's no help. The offending code, however is: class Foo(SimpleItem) def __init__(self, id, title, file): self.file = Image('file',title,'') self.file.manage_upload(file) Can anyone tell me what's wrong here? Cheers, seb ___ 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] Editors [OT]
> - class browser for python, with expand/collapse of code (like the editor for > Python 2) would http://www.beopen.com/products/oobrowser/oobrowser_overview.html be any use? ___ 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] user creation & authentification
ralf, > is it possible to create users "not using" the zope management interface ??? > i would like to log in some user with my own login screen or how can i edit > the default userauthentification screens from the browser (Netscape/IE/opera) ? my advice: in order to accomplish the second task effectively you should look at LoginManager; in doing so you will find answers to your first question. however, you may find you need to refer a lot to the mailing list archives to get LoginManager installed ;) seb http://www.zope.org/Members/tsarna/LoginManager ___ 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] CacheManagers are cool :)
I've just been experimenting with the RAM Cache manager, and FWIW I thought I'd share my findings: I ran some simple tests using ab against a single, dynamic page which has some display logic both in the filesystem product and dtml. I cached the index_html using the default RAM Cache Manager settings. Without caching, response time appeared to increase in direct proportion to the number of simultaneous requests up to 10. Above 10 connections, response time worsened dramatically. When there were 15 simultaneous connections, the response time averaged at approximately 10 seconds. The relationship looked logarithmic, but I didn't really take enough samples to be sure. Plus, the system I tested it on only has 96Mb RAM, and it was swapping a bit. In all cases the cache improved performance. The average response time was improved by up to 70% where more than 10 concurrent users were simulated. There was an improvement of 20% - 25% between 5 and 10 concurrent requests. There was no significant improvement where there were no concurrent requests. The relationship between the number of simultaneous requests and the response time remained linear across all measured levels of concurrency. Not exactly a real-life usage scenario, but it sounds impressive :) Not sure I understand what the cache keys are for though... is there any more documentation forthcoming on this? ___ 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] CacheManagers are cool :)
> > I've just been experimenting with the RAM Cache manager, and FWIW I thought > > I'd share my findings: ... > > There was no significant improvement where there were no concurrent > > requests. > > very cool. although i find the lack of improvement on a non concurrent > requests a bit strange if its a the dtml is doing real computation vs. > serving a string from memory. so do I :) the dtml only iterates over some objects. each object has a method which checks the authenticated user and serves up content accordingly. in the test case the user is served the default view of the object, so there's not really all that much logic going on. perhaps this is why non concurrent, cached requests showed only a 1.3% speed improvement over uncached requests. anyone? > > Not exactly a real-life usage scenario, but it sounds impressive :) Not > > sure I understand what the cache keys are for though... is there any more > > documentation forthcoming on this? > > > so you can cache requests based on dynamic input. > > useful for authentication to present different cache pages to different > users, and also to present common request dependent information from cache. I already read this in the online help, but for some reason my brain only chose to understand it just now ;) > as for real documentation, use the source luke hmm, just had a quick 20 minute poke around, and I get the gist, but I'd be happier if some obi-wan could guide me with the api docs promised in the fishtank proposal seb. ___ 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] CacheManagers are cool :)
> anybody tried expiring an object,? say after 300 secs, the cached object > expires, get invalidated and a new cached object is created when somebody > requested the page. > is there any simple way to expire a RAM Cache? haven't tried this yet. > also, for those who tried caching. what do you guys do? cache > the methods > that make up the bigger method? or just cache the bigger method? > > e.g dtml method a is made from method b, c, d,...n > do you cache a, or selectively cache b and/or c, d, ... it depends on what's in each element. the design of the caching system is such that you can have as fained-grained a control as you wish. the decision is entirely up to you. my fairly amateurish tests suggest that the benefits of caching only really manifest themselves at high levels of concurrency. if the method (a) contains a little logic, items (b),(c) and (d) are images, and the whole page is very frequently accessed, you'd probably benefit from caching (a) in RAM, and using the HTTP Cache manager for the other elements. OTOH, you could expect proxies and browser caches to handle elements such as images fairly well, so I imagine most of the benefit would come from caching only the element of the page which contains the logic. If the page is accessed only a hundred times a day, you will see little benefit from caching it, at the cost of some memory on your server. in a scenario where (b), (c) and (d) each contain their own snippets of logic, you would be wise to cache them all. Otherwise you would lose the benefits of caching (a), because to build the page, Zope is still making hits to disk each time. well, that's how I assume it works, anyway. time for more tests, i think... seb ___ 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 )