[Zope] BUG? was Re: [Zope] Problem with Cut and Paste
Good evening again, On Tue, Jan 30, 2001 at 08:45:06PM +0100, Jerome Alet wrote: > > On Tue, Jan 30, 2001 at 02:24:50PM -0500, Brian Lloyd wrote: > > > > This is your problem - Netscape allows a maximum of 4k of > > cookie data for a given site (and silently truncates the > > rest). > > I'm sorry but AFAIK there's nothing sending cookies to my browser from this > installation. More than that, if I manually cut then paste the same > object with the Cut and Paste buttons in the management interface > it works perfectly, and in this situation the cookie data should be > exactly the same, correct me if I'm wrong. I think I've found where the problem comes from, it has nothing to do with browsers or cookies (or me) AFAICT. When manage_cutObjects() is called with REQUEST != None (i.e. when used from the management interface) then instead of the cut objects it returns the value returned by manage_main(), this explains why my cb_copy_data was bad. I've sligthly modified manage_cutObjects() to confirm that's the problem: I've added a fourth parameter called noredirect to this method, this parameter is a named one and defaults to 0, then at the end of this method, I've just done: if not noredirect : return self.manage_main(REQUEST) return cp Now it works fine both from my new management interface (Zope's modified one) and from python scripts, with a method which does essentially the following: cb_copy_data = self.manage_cutObjects(ids, REQUEST, noredirect = 1) return self.aq_parent.manage_pasteObjects(cb_copy_data, REQUEST) In other terms manage_cutObjects() wasn't designed to be immediately followed by a call to another method when used from the management interface. Not sure if this is a bug, however it seems this is a common problem in Zope manage_() methods. hoping this will help bye, Jerome Alet ___ 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] Problem with Cut and Paste
On Tue, Jan 30, 2001 at 11:13:52AM -0500, Brian Lloyd wrote: > > I'm trying to modify OFS/dtml/main.dtml and OFS/CopySupport.py > > in order to create a shortcut button to cut an object and paste it > > in the parent object in one click, because I think this may > > save lots of boring clicks, at least for me. > > > > When I call the following method from the management interface > > (OFS/dtml/main.dtml) then I receive this error: > > > > "The data in the clipboard could not be read, possibly due to > > cookie data being truncated by your web browser. > > Try copying fewer objects."] > > Jerome - most Web browsers have a maximum limit to the amount > of cookie data that they will preserve from a given site > (usually around 4k as I recall, though this may vary from > browser to browser). If you have a lot of cookies from this > site already, your browser may be silently truncating the > cookie data sent. You could check this by looking at the > length of the data you get from manage_cutObjects as > cb_copy_data. I've done this modification on a fresh 2.3.0-final installation with no other products installed, on localhost, and no special content other than a folder and an index_html document to test my modifications. However I've tested what you suggested, after deleting my Netscape 4.75 cookies file under Linux (2.2.18 kernel), the problem remains. If I check the cb_copy_data length then it returns: 16765 under Netscape and 14xxx under Lynx With Lynx I've got the time to see a message saying "500: Internal Server Error" but then it disappears and the message about the cookie length appears. Please could you test my method and see if it works for you because I sincerely don't know why it doesn't work here ? Thanks in advance for your time. Jerome Alet ___ 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] Problem with Cut and Paste
Hi, First I'm sorry if this message was already received in this list, but I'm sure I've not received it to confirm, so I send it again, sorry for the inconvenience. I'm trying to modify OFS/dtml/main.dtml and OFS/CopySupport.py in order to create a shortcut button to cut an object and paste it in the parent object in one click, because I think this may save lots of boring clicks, at least for me. When I call the following method from the management interface (OFS/dtml/main.dtml) then I receive this error: "The data in the clipboard could not be read, possibly due to cookie data being truncated by your web browser. Try copying fewer objects." But when I call if from a PythonScript it works fine. My method, bound to a MoveUp button of my own: --CUT--- def manage_moveupObjects(self, ids=None, REQUEST=None): """Moves the selected objects to the parent objets (e.g. Folder)""" if ids is None and REQUEST is not None: return eNoItemsSpecified elif ids is None: raise ValueError, 'ids must be specified' if type(ids) is type(''): ids=[ids] if hasattr(self, 'aq_parent') and hasattr(self.aq_parent, 'manage_pasteObjects') : cb_copy_data = self.manage_cutObjects(ids, REQUEST) return self.aq_parent.manage_pasteObjects(cb_copy_data, REQUEST) ---CUT--- If I call self.aq_parent.manage_pasteObjects with None as the first parameter then it works fine from the management interface but not from a PythonScript: I receive a "No clipboard data found" error. Please could someone explain me what the problem is ? (I want it to work both from the management interface and from Python) Thanks in advance. Jerome Alet ___ 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] ANNOUNCE: please have a look at ZDatabaseTool
On Mon, 29 Jan 2001, Andreas Heckel wrote: > BTW: Why I'm not surprised the trouble starts with Win ;-) Oh, please !!! Please don't start a new flamewar here ;-)) bye, Jerome Alet ___ 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] License
On Mon, 29 Jan 2001, Chris Withers wrote: > And the reason I asked is 'cos, as I understand it, if I use a GPL-licensed > product in a product/solution I provide, then I have to do that for free and > open source it too, which often isn't an option :-( Of course you DON'T have to do your work for free !!! How could someone make a living. The GPL says clearly that you are perfectly allowed to sell your work. However if your soft is GPLed or uses some GPLed code then you must distribute (sell) your code along with all its sources, or the sources should be made available for all at a minimal fee covering the reproduction costs (a CDR probably) The point is you should sell your service instead of your code. hoping this will help your better undersstand what the GPL is all about. bye, Jerome Alet ___ 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] BUG with a patch
Hi, the way the manage_renameObjects() method was coded made it impossible to exchange two objects ids in one pass, e.g. rename Obj1 to Obj2 and Obj2 to Obj1. The attached patch seems to correct this problem, however a better temporary id construction method is needed. I've tried to submit it to the colector but I don't know if it succeeded. hoping this will help Jerome Alet --- CopySupport.py.2.3.0-final Sat Jan 27 10:04:42 2001 +++ CopySupport.py Sat Jan 27 10:10:48 2001 @@ -280,9 +280,20 @@ """Rename several sub-objects""" if len(ids) != len(new_ids): raise 'BadRequst','Please rename each listed object.' +conflicts = [] for i in range(len(ids)): if ids[i] != new_ids[i]: +if new_ids[i] not in ids : # may a conflict occur ? self.manage_renameObject(ids[i], new_ids[i], REQUEST) +else : +tempo = ".temporary_%i_" % i +self.manage_renameObject(ids[i], tempo) +conflicts.append((tempo, new_ids[i])) + +# now we rename conflictuous objects +for (old, new) in conflicts : +self.manage_renameObject(old, new) + if REQUEST is not None: return self.manage_main(self, REQUEST, update_menu=1) return None
[Zope] BUG: Typo in CopySupport.py in 2.3.0 final
Hi, Line 282 of lib/python/OFS/CopySupport.py of 2.3.0 final reads: raise 'BadRequst','Please rename each listed object.' Instead this should probably be: raise 'BadRequest','Please rename each listed object.' since all the other .py in this directory raise 'BadRequest' no patch this time. hoping this will help. bye, Jerome Alet ___ 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] "Add this" and possible bug, was Re: [Zope] Add this to Wish list
On Thu, 25 Jan 2001, Jerome Alet wrote: > [PARENT] => which moves the selected objects up to the parent folder. Of course this is just a convenience for Cut & Paste, but saves some clicks. bye, Jerome Alet ___ 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] "Add this" and possible bug, was Re: [Zope] Add this to Wish list
On Wed, 24 Jan 2001, Evan Simpson wrote: > From: Jerome Alet <[EMAIL PROTECTED]> > > Please could you include a button "Download Source" to the Python Script > > edition form ? > > Already done; There's a link in the paragraph below the text area, and above > the upload form (in CVS). Thanks a lot ! Now please another wish: I've done what I describe below for my own work, but I think this might be interesting to integrate it in Zope's core: Wouldn't it be fine if you added three buttons on the same line as Rename Cut Copy Delete Import/Export in the manage_main page. These three buttons would be: [PARENT] => which moves the selected objects up to the parent folder. [UP] and [DOWN] => which rename objects the following way: Let's say I've got the following folder content: MyFolder |--Object1 (Title1) |--Object2 (Title2) |--Object3 (Title3) |--Object4 (Title4) Then pressing on the [UP] button having Object3 selected I'll obtain: MyFolder |--Object1 (Title1) |--Object2 (Title3) |--Object3 (Title2) |--Object4 (Title4) and the same for the [DOWN] button. This might prove to be useful if you want to keep a certain structuration based on the objects' ids, but be able to change their order without modifying the ids. I hope what I ask is clear and someone else sees an utility for that. Doing that I've found a possible bug (maybe bug isn't the appropriate word) with the manage_renameObjects() method: this method accepts ids and new_ids as its arguments, ids is a list of the old ids to rename, and new_ids the new ones. If you want to exchange 2 ids (e.g. rename Object1 to Object2 and Object2 to Object1 which both exists) then there's an exception saying that one of the ids already exist. So instead of one call to manage_renameObjects() to rename both objects in one pass, you have to call it three times: one time to rename Object1 to a temporary id, one time to rename Object2 to Object1 and one time to rename "tempid" to Object2. My question is: Could you do something about this "small" problem ? bye, and thanks for all ! Jerome Alet - http://cortex.unice.fr/~jerome ___ 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] PythonScripts editable through FTP?
On Wed, 24 Jan 2001, Chris Withers wrote: > Jerome Alet wrote: > > > I sincerely don't know because I've disabled FTP here. > > How come? > > What about WebDAV? don't use it either. I want to use my own text editor (JERED), not because it's the best to develop (far from that in fact) but because it works exactly like I want it to work (which is normal since I've written it). Unfortunately it doesn't handle WebDAV or any other Internet protocol... Anyway, thanks for all. Jerome Alet ___ 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] PythonScripts editable through FTP?
On Wed, 24 Jan 2001, Chris Withers wrote: > Jerome Alet wrote: > > > > Maybe I've not seen the easy way to do it, if so tell me I'm stupid, but > > one thing would be very nice in the future version of Zope: > > > > A way to download Python Script's sources > > > > Now I cut and paste but it's horrible. > > Can't you use FTP to edit them? I sincerely don't know because I've disabled FTP here. I've faced the problem because I wanted to print a Python Script but Netscape 4.76 (under Linux) hasn't printed the frame correctly. bye, Jerome Alet ___ 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] Add this to Wish list
Hi, Maybe I've not seen the easy way to do it, if so tell me I'm stupid, but one thing would be very nice in the future version of Zope: A way to download Python Script's sources Now I cut and paste but it's horrible. Please could you include a button "Download Source" to the Python Script edition form ? Thanks in advance. Jerome Alet - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Fac de Medecine de Nicehttp://wwwmed.unice.fr Tel: (+33) 4 93 37 76 30 Fax: (+33) 4 93 53 15 15 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] : Postgre installation problem
On Tue, 23 Jan 2001, K H Subrahmanyan wrote: > I have installed postgre SQL in my linux server. > I have installed ZpopyDA to my zope installation. > > but when I run the server I get the following error. > > ZPoPyDA Import Traceback > raise "The PoPy module is not installed" > The PoPy module is not installed This is very clear. You don't have installed the PoPy module PoPy is needed by ZPoPyDA PoPy is the layer between PostgreSQL and ZPoPyDA: PostgreSQL <--> PoPy <--> ZPoPyDA <--> Zope hoping this will help bye, Jerome Alet ___ 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] exchanging ids in a single transaction
Hi, I'm currently thinking about a project in which I'd want to be able to exchange 2 objects ids. My plan is to save the first one's id then rename the first one with the second's id then rename the second with the first's id which is very classical. I've got no code yet, but I want to know if there's a method to do all this in a single transaction: if any error occur then I don't want any id to be changed Is it possible and How ? Should I use the UNDO machinery to do that or is it possible with another way ? When I rename an object will my Data.fs grow (some objects may be 5 MBytes large, but rarely) ? Any tip will be appreciated. Jerome Alet - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Fac de Medecine de Nicehttp://wwwmed.unice.fr Tel: (+33) 4 93 37 76 30 Fax: (+33) 4 93 53 15 15 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] ZWiki --> MS Word
On Tue, 16 Jan 2001, peter bengtson wrote: > I'm looking for some tool to convert ZWiki text to MS Word. > Reason being that my boss wants it in MS Word, and I do all my typing as > ZWiki's. Why don't you save the content as plain text with a .doc extension (eventually adding the CR befoe each LF character). Your boss will then be able to read it from Word directly. I bet your boss won't see anything, and it's very easy to do (at least I suppose) hoping this will help. bye, Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Fac de Medecine de Nicehttp://wwwmed.unice.fr Tel: (+33) 4 93 37 76 30 Fax: (+33) 4 93 53 15 15 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] Downloading All Zope products
On Thu, 11 Jan 2001, Marcin Kasperski wrote: > Very nice, thanks. Nevertheless, I still dream about some categorized > Zope products directory, which could be downloaded with one step and put > on the CD-ROM (I mean sth like your page but with content categorized - > like the zope products page on zope.org do - and annotated with recent > change date and required zope version). I've done it. Look at the new version at http://www.zope.org/Members/jerome/ZCPL Comments are welcome. bye, Jerome Alet ___ 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] Downloading All Zope products
On Thu, 11 Jan 2001, ethan mindlace fremen wrote: > Jerome Alet wrote: > > > > You can find it at http://www.zope.org/Members/jerome/ZCPL > > This is not a dreadful thing, but how is it different from: > > http://www.zope.org/Products/all_products?batch_size%3Aint%3Arequired=265 It is VERY different because your page isn't easily suckable with Wget or other similar tools: it contains lot of links which will pollute your downloaded directory: the goal is to suck all products in one Wget run. My page is more ressembling Martijn's one at http://www.zope.org/Members/mj/AllProds In fact these two pages are almost exactly the same, because I wasn't aware of Martijn's one existence > What I don't like is people using wget to suck the entire site and then > hitting (for example) the "tree" version of the Zope Quick Reference and > expanding *every single node*. ;-) bye, Jerome Alet ___ 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] Downloading All Zope products
On Thu, 11 Jan 2001, Martijn Pieters wrote: > BTW, did you knw I made a page for the exact same purpose a while ago? > http://www.zope.org/Members/mj/AllProds Of course not, otherwise I hadn't made it by myself. I thought it was a cool idea (and above all it was very easy to do), unfortunately someone else thought the same before ;-) Perhaps putting a link to your own page on the "All Products" page at zope.org would be useful ? Anyway thanks for all. Jerome Alet ___ 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] Downloading All Zope products
Hi, I was bored by the current search interface for downloading Zope products: you have to spend hours just clicking to download lots of products. I want to put Zope and the maximum number of available products on a CDROM to be able to do demos and so on to people not connected to the Net. I've decided to do something to solve this problem, so I've created the "Zope Complete Products List for easy batch download". You can find it at http://www.zope.org/Members/jerome/ZCPL This document dynamically lists all available Zope products (from zope.org) and for every product put one and a single link to its latest version archive. It also explains how to download all Zope products available in one Wget run, but please consider not making this an habit because the DC folks don't seem to like that (see http://www.zope.org/robots.txt). DC folks, if you find this document should be destroyed now then just do it, I don't want to put your servers on their knees. Hoping this will help someone else. Any comment is very welcome. bye, Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Fac de Medecine de Nicehttp://wwwmed.unice.fr Tel: (+33) 4 93 37 76 30 Fax: (+33) 4 93 53 15 15 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] permissions problem upgrading to 2.3.0a1 from 2.1.6
On Wed, Jan 10, 2001 at 09:49:53PM +0100, Dieter Maurer wrote: > Jerome Alet writes: > > ... permission problem upgrading ZClasses from 2.1.6 to 2.3a1 ... > Are your ZClasses pure Zope ZClasses or do they contain > Python based products? They contain some PythonMethods (not Scripts !), external methods, but the method which poses a problem is pure DTML. > There was a big shift in security policy during > Zope 2.1.x to Zope 2.2.x. > Many Python based products need to be changed in order > to be compatible with the new security policy. > This is excellently explained in a paper from Brian: > "... Upgrading to Zope 2.2 ..." I thought I've already read it IIRC, but I'll reread it more carefully ASAP. Thanks for your help. Jerome Alet ___ 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] permissions problem upgrading to 2.3.0a1 from 2.1.6
Hi, I've been using 2.1.6 for a long time without any problem, using a home compiled python 1.5.2 Yesterday I've tried to upgrade to 2.3.0a1 the following way: export each and every home made sites and products (ZClasses) from 2.1.6 stop 2.1.6 install 2.3.0a1 and start it import each and every exported sites and products (I've not tried using the same Data.fs as 2.1.6) In all instances of a ZClass I've made, I used to (in 2.1.6) call a DTML method from my browser which was protected in a way to display the authentication box, allowing me to enter my username and password. The username and password should give me a role created in the ZClass instance constructor, this role is allowed to create and modify some subobjects (another ZClass) Since I've installed 2.3.0a1 then when I tell my browser to "call" the DTML method the authentication box appears but I'm not able to authenticate myself: it always give me an unauthorized exception. Looking at zope log it gives me a 401 error on the DTML method. If I modify this method to do nothing but return plain text the problem persists. I've checked several times the username and password and I'm sure I've typed them correctly. In one instance of my ZClass I've tried to give all permissions to the created role, but with no luck. I've finally stopped 2.3.0a1 and relaunched the 2.1.6. Does someone have any idea of where the problem may come from ? Should I try to use the same Data.fs of 2.1.6 ? Should I try to use 2.2.5 instead of 2.3.0a1 (I'd like to be able to use PythonScripts) ? Thanks in advance. Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Fac de Medecine de Nicehttp://wwwmed.unice.fr Tel: (+33) 4 93 37 76 30 Fax: (+33) 4 93 53 15 15 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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: Versions
On Mon, 8 Jan 2001, Andy Gates wrote: > Thanks to your help a few months back, I eventually got my first big > Zope site up. Now the marketing droids have let it mature and come > back to me with a laundry-list of tweaks and changes. > > 'Tis time, think I, to use versioning: keep the live site running and > work on a version with all changes, let the droids assess it, and then > roll it live in one chunk. > > Now, how do I do that, then? Not sure if I undertand correctly your problem, but all you have to do is to create a version object in the folder you want to modify (Add Version). Then click on this object an connect to it. Then do all your modifications as you would do it without a version, and let your droids view it. When all is OK, click on your version object and click on save/discard, enter some text to describe what you've done and click save. Now you can disconnect and eventually delete your version object. hoping this will help bye, Jerome Alet ___ 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] Creating product with Python
On Wed, 20 Dec 2000, Ivan Somov wrote: > Missing doc string at: >http://localhost:8080/a/manage_addProduct/Boring/manage_addBoring > > I tried to change "manage_addBoring" method, and compared my product > with other working products, by there was no results from my attemptions. > What that Error message means? This is self explanatory: each of your methods needs a docstring, e.g.: def mymethod(self, ...) : """My doc string""" ... otherwise Zope don't like them hoping this will help Jerome Alet ___ 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] Best Zope way to split a textfield on 2000 char increments
On Fri, 15 Dec 2000, Steve Drees wrote: > somestring[:1999] is the first 2000 characters of somestring. Not to be a poseur but: somestring[:1999] is the first 1999 characters of somestring, because in Python indices begin at 0, e.g.: a="0123" print a[:3] gives "012" which are the first 3 characters from a. bye, Jerome Alet ___ 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?
On Thu, 14 Dec 2000, Evan Simpson wrote: > From: seb bacon <[EMAIL PROTECTED]> > > 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 ;) > > Leaving off index_html causes Zope to add a to the head. That's WHOW ! is exactly 11 bytes long. Couldn't it be that the content-length is computed by Zope before you automatically add this tag ? just my 0.02 euros Jerome Alet ___ 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] How to debug access denials?
On Thu, 14 Dec 2000, Dieter Maurer wrote: > I would expect "AccessContentsInformation" is relevant to > access properties. > > > > I read from that, that you do not use DTML objects. > For *them*, access to attributes is granted for the > "View" permission. > Apparently, this is not true for all objects. Where can we get a mapping avout which permission is needed to do something and what allows each permission depending on the object type ? Is it in a doc somewhere ? Of course this is impossible to do for every existing Zope product (near 250), but at least for the default installed ones this would be wonderful. IMHO the permissions is the most confusing part of Zope, and I'm not aware of any clear and complete document on this subject. For example Chapter 6 of Michel and Amos Zope Book ("Users and Security") doesn't cover this (or maybe I've not read it carefully). feel free to send me any pointer to the doc. bye, Jerome Alet ___ 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] How to debug access denials?
On Thu, 14 Dec 2000, Chris Withers wrote: > Stephane Bortzmeyer wrote: > > > > Is there a way to get an extended log, such as "anonymous user denied > > because index_html called standard_html_header which called getData > > and getData is a database connection and they don't have permission to > > use database connections"? > > If you hit cancel when the dialog box pops up, you'll get an error > message. If you view the HTML source of that error message, there'll be > a python traceback in there which should provide the information you're > looking for... May I add: "... in an incredibly unreadable and hardly understandable format." ? What Stephane asks for would be very nice, IMHO. bye, Jerome Alet ___ 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] adding roles to Zope in Product.initialize()
On Wed, 29 Nov 2000, Randall Kern wrote: > By "use local roles", you mean do it manually, through the web ui? I don't > see how I could create a local role from code either, since none of my > objects have been created yet. You can do it in the manage_afterAdd() method of your class: ---CUT--- def manage_afterAdd(self, item, container) : # create the role only if it doesn't exist (acquisition) if "yourrole" not in container.valid_roles() : self._addRole("yourrole") # # here you may need to call the manage_afetrAdd() method # of you base class # e.g.: Folder.manage_afterAdd(self, item, container) ---CUT--- So the role will be created in your instance during its creation, but only if doesn't exist yet (or can't be acquired from the above level). hoping this will help. Jerome Alet ___ 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] seeking zope success stories in higher education
Hi, We are planning to choose a platform to build a portal for distance learning, with which we want to Build and Serve online multimedia courses, online exams, calendars, keep track of students work and results, forums, etc... I've got a list of criterias the platform must fill to be chosen, and at first glance Zope fills at least 90% of them, and probably more if I look more closely at the Zope products already available. This is a big project, and some people have already done some work using WebCT. I've read in the zope-edu wicki the comment on WebCT, I already know that many people (at least 35) are interested byt his subject because they are referenced as contributors in this wicki, so I naively conclude I'm right in thinking that Zope is the good choice for us. So I have to write a document explaining the pros (and cons) of choosing Zope, and I want some references of Zope uses in higher education if possible. Please could someone send me any testimonial on the (successful or not, and why) use of Zope in higher education, the products which might help us (we will at least need SquishDot, the LDAP adapter, the Oracle adapter, the KnowledgeBase product, etc...). I'm also interested in testimonials about the use of WebCT or similar products. Thank you very much. PS: As always this is urgent :-( Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Fac de Medecine de Nicehttp://wwwmed.unice.fr Tel: (+33) 4 93 37 76 30 Fax: (+33) 4 93 53 15 15 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] The Calendar Tag
On Mon, 20 Nov 2000, Kaeidinejad, Shahram wrote: > How can give me more information about product "The Calendar Tag"? > Is may be to use "The Calendar Tag" with MS-Outlook? The CalendarTag's purpose is to render calendars in html (or dtml ;-) documents. The webmaster only has to code the rendering of one cell (day), and the CalendarTag does the rest. Since MS-Outlook isn't a web browser I doubt you can use it, however in a day cell you can do whatever you want, so maybe you can send mails whenever someone sees this day, and receive the mails in Outlook. Maybe someone else has got a better idea. bye, and good luck. Jerome Alet ___ 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: DateTime
On Fri, 10 Nov 2000, Chris Withers wrote: > mxDateTime is _not_ the DateTime in Zope. If only it was It's voting season, so I vote +10 for this one. bye, Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Fac de Medecine de Nicehttp://wwwmed.unice.fr Tel: (+33) 4 93 37 76 30 Fax: (+33) 4 93 53 15 15 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] Single html checkbox as list?
just do something like: good luck Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE On Mon, 25 Sep 2000 [EMAIL PROTECTED] wrote: > Hi, > > since I didn't find anything on that topic, the solution might be > obvious but I ran into the following problem: > > I have a html form with several checkboxes. If one checkbox is > selected, the variable containing the result is represented by a > string, if two or more checkboxes are selected the variable is > represented by a list. > > Is there a way to force the variable to be a list, even if only one > checkbox is selected? > > greetings > clamor > > > ___ > 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] FSF about Zope and GPL'ed components
On Wed, Sep 20, 2000 at 01:05:04PM -0400, [EMAIL PROTECTED] wrote: > Joan uses Zope with Joe's component (Product in Zope parlance). > She writes something that depends on Joe's product being present, So her work must be GPLed too, because it's considered just like she links with a GPLed library. However, while all the software I program is under GPL, I just consider Zope just as a proprietary (don't take me wrong on this) library: The GPL allows developpers to link their own programs with proprietary libraries (I suppose it's the case for example if you install the GNU compiler environment but not glibc under a proprietary Unix, but I don't know if this is technically possible). That's why if I was to produce a GPL Zope product, I'd personnally choose to consider the GPL this way: Any Zope application or product effectively depending on my product must be GPLed, but I don't want Zope to be GPLed because it really not depend on my product. While I'm convinced that the FSF is the Good Thing Here (tm), it seems to me that they haven't understood how Zope works: The FSF's answer seems wrong to me in this particular aspect because it seems they want Zope to be GPLed too. So I ask why they don't ask to Sun to licence their system libraries under the GPL, or even JAVA, since its allowed to develop Java programs and licence them under the GPL: Java depends on my GPLed software just like Zope depends on my GPLed Zope product: in fact it doesn't depend on it at all ! I can't see no difference. I'd be very pleased to be enlightened a bit. bye, Jerome Alet ___ 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] Should I use ZODB or not ?
On Tue, 19 Sep 2000, Jason Cunliffe wrote: > I am curious how do you all think LocalFS would perform for such a big > multimedia application.? > http://www.zope.org/Members/jfarr/Products/LocalFS > > Use Zope for managing meta-data, or mayeb even better Zope + a fast DB tool > for the metadata part. > Let Zope do its holy best for the 'virtual-object interfacing' jobs, let the > others do their thing.. This may very well be the best solution, as far as I understand what LocalFS is (I've not used it for now, however), because this may allow us to set per-domain (Medicine, Maths, etc...) permissions under Zope, and do all the presentation in Zope, while not being attached to Zope if we want to easily dump our datas somewhere else. Thanks to all. Now all I have to do is just kill these PHP guys there ;-)) bye, Jerome Alet ___ 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] How best to restart Zope?
On Tue, 19 Sep 2000, J. Atwood wrote: > Put this in your 'start' script > >-Z /home/local/zope/var/Z2.pid > > It watches the PID and if it fails will restart it. Ok, my script covered a very different problem: Zope instances were still active and running, but unable to serve requests. My script tries to detect this situation because in this case -Z would be inefficient, and tries to restart Zope after a timeout. Sorry if it didn't answered your question. bye, Jerome Alet ___ 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] How best to restart Zope?
On Tue, 19 Sep 2000, Jason Cunliffe wrote: > hmmm.. There seem to be some fancy scripts. > But if it works, why would one ever need more than "-Z" ? because I didn't know this switch :-)) however I've not encountered any problem since I've upgraded from 2.1.4 to 2.1.6, and I don't use my IsDaZope script anymore. before the upgrade, Zope was failing several times a day, and now I'm so happy that I'm afraid to upgrade to 2.2.2... bye, Jerome Alet ___ 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] How best to restart Zope?
See http://www.zope.org/Members/jerome/ Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE On Tue, 19 Sep 2000, Jason Cunliffe wrote: > Q: How to make sure Zope restarts automatically it is shut down ? > > Zope version: Zope 2.2.0 (binary release, python 1.5.2, linux2-x86) > Python version: 1.5.2 (#10, Dec 6 1999, 12:16:27) [GCC 2.7.2.3] > Linux2.2.5-15 RedHat6.0 (Hedwig) > > any ideas? ___ 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] Should I use ZODB or not ?
Hi, we are currently planning to create a multimedia database and are investigating different solutions. I'm pushing toward a Zope based one, especially for the permissions needs we have, but I was wondering if ZODB can handle our needs or if we should store multimedia files directly on the file system. Our needs are to store hundreds, and possibly thousands of MPEG2 and MPEG4 (generally short) video movies, MP3 audio files, JPEG images, etc... Altough most of the files will be in the 1 Mb -> 10 Mb range, some could be larger, e.g. some Gigabytes. For each file we also want to keep some data: author, subject, encoding, description, keywords, domain, etc... I see 5 solutions: 1 - store both files and their associated datas in ZODB 2 - store files in the filesystem and datas in ZODB 3 - store files in the filesystem and datas in an RDBMS (use Zope only for the presentation of files and datas) 4 - store files in ZODB and datas in an RDBMS. 5 - don't use Zope at all because it's not appropriate. While I'm pretty sure I can design something more or less working like the 1 above in a few time with a few multimedia files and datas, please could you tell me what seems the best solution to you in the long run ? IMHO the 1 (if Zope scales well) and 2 are best, but we may as well use the 3. 4 doesn't seem natural to me, and I personnaly exclude the 5 ;-) Another question I wanted to ask: does Zope have a limit on the size of uploaded files, given the fact that we may want to upload files as large as some Gb and that we will use a linux filesystem not limited to 2 Gb per file. Please show me the light. thanks in advance. Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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 and the GPL poison pill
On Wed, 13 Sep 2000, Andrew Kenneth Milton wrote: > The second reason is that GPL attracts fanatics. Just look at any > discussion forums where the issue comes up. You cannot have a calm discussion > and mention the GPL. Sorry, but until I've received your previous message, and the one about napalm, I've found this discussion very calm and interesting, now IMHO all we have to do is to wait for something from DC and the FSF. Jerome ALET - GPL Fanatic, and proud of 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] Zope and the GPL poison pill
On 13 Sep 2000, Erik Enge wrote: > And if it really is Products (as in lib/python/Products), does this > mean that if I make a GNU GPL licensed application for a client, I > can't actually distribute Zope with it? I have to install them > separately? Maybe this is stupid, but I'm sure it would clarify the situation for all of us if DC and the FSF could get in touch, talk about all this, and give us a final explanation, agreed by both, explaining exactly what we can and can't do regarding this licensing problem. bye, Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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 question from a newbizzzzz I want to access a dtml page under a subfolder subfolder
On Thu, 27 Jul 2000 [EMAIL PROTECTED] wrote: > > I want to access a dtml page under a subfolder > > - portal (folder) >- index1 (dtml) >- reunion (folder) > - index2 (dtml) have you tried (UNTESTED) : ? bye, Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] problem with manage_permission
Hi, I'm currently trying to create a python product. I've got a class named MyClass, and in the __init__ method I've got the following code: self.manage_addFolder(id="data", title="MyClass instance's datas") self._addRole('admin') self.manage_permission(permission_to_manage = "Access contents information" , roles = [ 'Manager', 'admin' ]) MyClass inherits from Folder. I want to programmatically create a 'data' Folder and an 'admin' role in each new instance of MyClass, and give this role and Manager (but not Anonymous) the "Access contents information" permission. The manage_addFolder and _addRole work fine, but the manage_permission call gives me the following traceback: Error Type: AttributeError Error Value: aq_acquire Traceback (innermost last): File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 179, in publish File /usr/local/zope/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 165, in publish File /usr/local/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_addMyClass) File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: manage_addMyClass) File /usr/local/zope/lib/python/Products/MyClass/MyClass.py, line 45, in manage_addMyClass File /usr/local/zope/lib/python/Products/MyClass/MyClass.py, line 153, in __init__ (Object: ElementWithAttributes) File /usr/local/zope/lib/python/AccessControl/Role.py, line 208, in manage_permission (Object: ElementWithAttributes) File /usr/local/zope/lib/python/AccessControl/Role.py, line 136, in ac_inherited_permissions (Object: ElementWithAttributes) File /usr/local/zope/lib/python/OFS/ObjectManager.py, line 173, in _subobject_permissions (Object: ElementWithAttributes) AttributeError: (see above) Surprisingly, if I delete the manage_permission line, restart Zope, re-add an instance of MyClass (it works), then try to manually modify the permissions using the MyClass instance's security tab, then it works flawlessly. Does anyone have got an idea about where the problem may come from ? thanks in advance. Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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: Probably Zope Bug (was: Re: [Zope] all DTML Methods of current folder and subfolder)
On Wed, 26 Jul 2000, Dieter Maurer wrote: > I analysed this strange behavior in Zope 2.1.6 > and have a partial explanation. Hi, thank you very much for your time, your explanations and your workaround. I'll test this ASAP and tell you the result. thanks again. bye, Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] Your feedback: what should DateTime strftime() behavior be?
my vote is: +1 Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] all DTML Methods of current folder and subfolder
Hi, now I'm at work I've tested your solution, read below. On Sun, 23 Jul 2000, Dieter Maurer wrote: > Jerome ALET writes: > > I want to do the following loop in Zope 2.1.6: > > > > where XXX is "not objectValues(['Folder'])" > > > > What is the correct syntax (', " and """ nesting) for that ? > > You can use: > ... obj_expr='''not objectValues(['Folder'])''' ... > or > ... obj_epxr='not objectValues[\'Folder\']=' ... Thanks to you, the syntax you gave me is accepted by the dtml parser, but both and have given me an empty list. If I don't use obj_expr then I've got the full recursive list of all subfolders from the current folder. Knowing that the Zope Search Interface allows me to type this expression in the obj_expr field and gives me the correct result, what could be the problem I encounter ? I know I could build a correct list by putting a test inside my dtml-in loop, but I really prefer to understand why this doesn't work, and all I can say now is: I don't understand at all. Does anyone have an idea about where the problem comes from ? thanks in advance. Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] looping through objectValues, how to get methods?
On Wed, 19 Jul 2000, ed colmar wrote: > I have a method that looks through "objectValues". Using "hasattr" and > "getattr" I can see the variables contained in the object. > > How do I get the values generated from an object's method in a similar > fashion? > > For example: > if hasattr(i, 'djname'): #get djname variable > if hasattr(i, 'mixing_for()'): #try to get > mixing_for() method did you try removing the parenthesis, like: if hasattr(i, 'mixing_for') good luck Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] hard dtml syntax problem
On Thu, 13 Jul 2000, Bill Anderson wrote: > Jerome Alet wrote: > > > > > > > > Hi want to call ZopeFind to find all folders in the current folder which > > > > doesn't have got any subfolder. Sorry, I should have added : recursively !!! > I'm confused. You said you only were concerned about the _current_ > directory's subdirectories not having sub-directories, right? IOW You > have: > > ROOT > FolderA > -FolderA1 > -FolderA2 >/FolderA2A > FolderB > FolderC > > And in ROOT, you only want to see : > FolderB > FolderC > > And in FolderA: > FolderA1 > > Right? No, what I want is the following list (with your example): ['FolderA1', 'FolderA2A', 'FolderB', 'FolderC'] > > I'm sure I can do it with ZopeFind, because Zope do it in the Find > > (Advanced) tab, but don't know the exact syntax of: > > > > """ obj_expr = "not objectValues(['Folder'])" """ > > > > (which doesn't work because of nested " and ') > > > > Actually I've put a inside of my loop, but it limits > > my possibilities, especially because my result length is overestimated > > (all folders vs only folders with no subfolders). > > Maybe I read it wrong, but I thought you said you wanted only folders > with subfolders _in the current directory_. > > Maybe you need to rephrase your question? Yes I'm sorry: >From a Folder, I want to recursively search for all "terminal" folders (leaves) and build a list of these folders. bye "terminal" folder, I mean a folder with no subfolder. The following should give me exactly the result I want, if only I knew how to write it in a way accepted by the dtml parser: ... My actual solution is to do : ... but this solution is not good because if I need len(myresult) it returns me the total number of folders, not the number of "terminal" folders, and I find it stupid to have to build a new list in a and then loop over the new list in a second because I know ZopeFind is the solution: can do it, I've tested it with the Find tab. My only problem is: What is that f... syntax ? Any DTML Syntax guru out there ? thanks in advance. Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] hard dtml syntax problem
On Wed, 12 Jul 2000, ethan mindlace fremen wrote: > Jerome Alet wrote: > > > > Hi want to call ZopeFind to find all folders in the current folder which > > doesn't have got any subfolder. > > > > the following query works but returns all folders, even those which have > > got subfolders: > > > > > > > > ... > > > > Couldn't you just do a nested dtml-in? It's kind of hacky, but... > > > No this can't help because I don't know how deep is my hierarchy: I've delegated folder creations to at least ten persons. I'm sure I can do it with ZopeFind, because Zope do it in the Find (Advanced) tab, but don't know the exact syntax of: """ obj_expr = "not objectValues(['Folder'])" """ (which doesn't work because of nested " and ') Actually I've put a inside of my loop, but it limits my possibilities, especially because my result length is overestimated (all folders vs only folders with no subfolders). thanks anyway for your answer. bye, Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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 Question Time
On Tue, Jul 11, 2000 at 04:00:26PM -0400, Terry Babbey wrote: > I think if I can get an answer to a stupid question it may go along > way to opening my eyes to Zope. > > I need to understand the use of ',",(),[]. > I think when you use single quote ' - it means to take as literal - > don't interpret. all of these come directly from the Python language. you should read the Python tutorial (find it on python.org) and you'll understand them all. in short: ' and " are equivalent () are for functions or methods [] are for arrays (aka list, aka tables) or dictionnaries (aka mappings) bye, Jerome Alet ___ 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] hard dtml syntax problem
Hi want to call ZopeFind to find all folders in the current folder which doesn't have got any subfolder. the following query works but returns all folders, even those which have got subfolders: ... So I play a little with the Zope Search Interface and I find that if I type in "not objectValues(['Folder']" (without the double quotes) in the obj_expr (Expression) field then this solves my problem. my question is: How to rewrite my ZopeFind with obj_expr="not objectValues(['Folder'])" ? I've tried with or without quotes (single, double and even triple ones), but with no luck: I've always got a Document Template Parse Error. What is the correct syntax please ? Actually I've added a test inside my dtml-in loop but I think it's stupid because I need the exact result length and I don't want to rebuild a list of matching results since the Zope Search Interface can do it. thanks in advance for any answer. Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] a product with external methods
Hi, 1st question: I'm currently creating a ZClass based product which includes some external methods. If I want to distribute this product, do I have to distribute my product AND my external methods for it to work correctly elsewhere, or just distributing the product is sufficient ? 2nd question about ZCatalog and Zope 2.1.6: When I instanciate a folderish ZClass of my own, I want to automatically create a ZCatalog instance, then I add the following line to MyZClass_add method: and when I create an instance of my class I've got the following NameError : If I don't call manage_addZCAtalog in my add method but instead add the ZCatalog from Zope management interface it works fine. I think I've called this method correctly according to the ZQR, so I can't understand why it doesn't work. I've searched on this list archives on egroups about "adding ZCatalog" or "add ZCatalog" and I've not found anything useful. then I've searched for manage_addZCatalog and I've applied the patch sent by Dieter Maurer on May 28th to ZCatalog.py and restarted Zope but with no luck. please could someone help me ? thanks in advance. Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] questions on creating a ZClass
I'm currently trying to create a ZClass (based on ObjectManager) from a Folder I've got. This folder contains a ZCatalog named Catalog. If I copy and paste all existing methods and objects into my ZClass, do what must be done (adapt the addForm and add method, define a propertysheet, set the Views, etc...), and create an instance of my new ZClass somewhere it works but I can't view my instance: if I choose View I've got an Unauthorized error about Catalog. If I create the same ZClass without including the Catalog, then instanciate the ZClass, then add the Catalog manually to the instance, then it works fine ! Please could someone explain me ? thanks in advance. Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] Sorting a list descending using dtml-in
On Tue, 4 Jul 2000, Pieter Claerhout wrote: > if I'm iterating over a list using the dtml-in tag, is it then possible > to sort the items descending? IIRC: bye, Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] problem with ZopeFind and objectValues
I can now answer in part: On Mon, 3 Jul 2000, Jerome Alet wrote: > >- > > > gives me the following error: > > """Unauthorized > > You are not authorized to access id.""" > > If I set a proxy role of manager to this dtml-method that doesn't change > anything, it still doesn't work. In fact if I give this method a proxy role of Manager then it works fine if I access directly to this method from my browser. However if I call this method from inside another dtml method then it seems that the method loose its proxy role of manager. e.g.: say mymethod has a proxy role of manager and a method called anothermethod contains somewhere: then if anothermethod has no proxy role at all: browsing: http://myserver/myfolder/mymethod works fine. browsing: http://myserver/myfolder/anothermethod doesn't work (Unauthorized). I have to give the proxy role of Manager to anothermethod too if I want both to work correctly. Is it a feature or a bug ? thanks in advance. Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] problem with ZopeFind and objectValues
Hi, please could someone explain me why when accessing the same zope site anonymously: - works as expected and displays a list of id and titles of the current folder's subfolders, but - gives me the following error: """Unauthorized You are not authorized to access id.""" If I set a proxy role of manager to this dtml-method that doesn't change anything, it still doesn't work. If I log in as superuser both work the same (Zope 2.1.6). In fact I want to do a ZopeFind with search_sub set to 1 to recurse all subfolders from the current one. Is there any other method to do it, or should I set a particular parameter to a particular value (not found how to really use ZopeFind in ZQR, the sample is far too short IMHO). How can I restrict a search in Zcatalog to the current folder and its subfolders ? Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] Question from ZopeNewbies poster. . .
On Fri, Jun 30, 2000 at 10:13:37AM -0500, [EMAIL PROTECTED] wrote: > problem is I can't insert the image at the insert form, and worse of all I > don't know how to start. define your HTML form as: Filename: then in your_dtml_method REQUEST['file'] should contain your file contents IIRC. good luck Jerome Alet ___ 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] Is there a bug in Zope ? (was Re: [Zope] problem testing permissions)
On Tue, 27 Jun 2000, Jerome Alet wrote: > If I log in as a user I've created in one of the subfolders then my test > seems to be wrong (see below). > > here's my code which should create an html link to the add form if the > logged in user is a manager for the subfolder (e.g. jerome for Courses), > or just display the day number if not > > ---CUT--- > > > > > > > > > > if I replace this with: ---CUT--- "> ---CUT--- then it works fine !!! If I display AUTHENTICATED_USER.getRoles() then when logged in as superuser it returns "('manage',)" and when logged in as jerome in a subfolder (see my previous message) then it returns "['Manager']" Please could someone explain me what's the problem ? I suppose I AM the problem ;-) PS: I run Zope 2.1.6 with patches. thanks in advance. Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] problem testing permissions
Hi, I've created a folder in which there's a dtml method index_html which displays a calendar of events found in the ZCatalog. In this folder I've created several folders, one for each event type (e.g. courses, exams, etc...) each subfolder acquire the index_html method when it is displayed. In each subfolder I've created a user folder and created an user who has a manager role (I've also given the user a local role of manager for the subfolder, but I don't now if it is useful or not): this person should be able to add whatever she wants, especially events, in her folder, but nowhere else. here's the tree: Events |-- index_html |-- Courses | |-- acl_users | | |-- jerome (can add events in Courses only) | |-- event 1 | |-- event 2 | |-- ... | |-- event n |-- Exams |-- acl_users | |-- fred (can add events in Exams only) |-- event 1 |-- ... |-- event n If I log in as superuser (Zope 2.1.6 with patches) then no problem, I can add events wherever I want. If I log in as a user I've created in one of the subfolders then my test seems to be wrong (see below). here's my code which should create an html link to the add form if the logged in user is a manager for the subfolder (e.g. jerome for Courses), or just display the day number if not ---CUT--- ---CUT--- it seems just like if the does nothing. Does anyone have an idea ? thanks in advance. Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] CalendarTag 0.9.15 + Wiki
Hi, in the name of Juan David Iban~ez Palomar, I'm pleased to announce you the availability of the CalendarTag 0.9.15 which includes a complete internationalisation via the lang= attribute of the calendar tag. Available languages are Spanish, Catalan, English and French. Please contribute translations in your own language. A wiki was set up as well for the Calendar Tag product. you can find all on http://www.zope.org/Members/jdavid/Calendar thanks for reading. Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] Wrong mime type sent by Zope on every page
On Thu, 8 Jun 2000, Andrew Diller wrote: > Server: Zope/Zope 2.1.6 (source release, python 1.5.2, linux2) ZServer/1.1b1 > > Why does Server: return linux2? This is an Compaq Alpha running Tru64!?! No. That's what you are told it is. In fact it's an i386 under GNU/Linux ;-)) bye, Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] ZClass question
Hi, I'm currently trying to store all of the Medicine School (I work for) events in Zope, using the Calendar product to store them. I've created from my browser a Zclass which has a propertysheet and some properties in it, and some DTML methods. I've called this class GenericEvent. I want to create 4 or five other Zclasses which only differ from the first one by their meta type and the value (not the name) of one of their properties. For example I want to create ExamEvents, CoursesEvents, and so on... Then I want to give permissions to some people to add some type of events in the database. For example I want John to be able to add (and delete) both GenericEvents and ExamEvents, while I want Jane to only be allowed to add CoursesEvents, and not be allowed to delete CoursesEvents she hasn't created. I've created my GenericEvent ZClass and it works fine, thanks to Jason Spisak, but now when I try to create other ZClasses deriving from this ZClass I can't choose it as the base class for the new classes. Can I do that from my browser (How ?) or must I do it in python ? If it's not possible I plan to add the event type as a property of GenericEvent, but then how can I deal with the different permissions I need ? thanks in advance for any hint. Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] a patch for the calendar tag 0.9.10
Sorry, I've created a new patch, because in my previous one I've forgotten to correct the day mode too. The problem happens in day mode as well as in week mode, even if the week wasn't between two months. Sorry for the incoveninence, you'll find the new patch attached to this message. bye, Jerome Alet On Sun, Jun 04, 2000 at 11:20:34AM +0200, Jerome ALET wrote: > here's a patch for the Calendar 0.9.10 product. > ... > The Calendar product doesn't cut the month names > correctly in regard to these entities, especially > in week mode when a week was between two months. --- CalendarTag.py.orig Sun Jun 4 11:09:54 2000 +++ CalendarTag.py Sun Jun 4 13:18:40 2000 @@ -114,6 +114,22 @@ self.week_sday = int(weekdays[0]) self.week_ndays = int(weekdays[1]) +def __cutmonthname(self, name, length) : +"""Cuts the month name at length characters, counting +character entities for only one character""" +entityfound = 0 +for i in range(len(name)) : +if name[i] == '&' : +entityfound = 1 +elif name[i] == ';' : +entityfound = 0 + +if not entityfound : +length = length - 1 +if not length : +break +return name[:i + 1] + def render(self, md): ##time_start = time() @@ -226,15 +242,15 @@ v['next_url_'] = self.linkDate_(d, mode) else: if self.mode == 'day': -monthname = v['monthnames'][date.month() - 1][:3] +monthname = self.__cutmonthname(v['monthnames'][date.month() - 1], 3) left = '%s %d, %d' % (monthname, date.day(), date.year()) v['day_img_'] = 'sday' v['daynames'] = None elif self.mode == 'week': sdow = date - date.dow() edow = sdow + 6 -smonthname = v['monthnames'][sdow.month() - 1][:3] -emonthname = v['monthnames'][edow.month() - 1][:3] +smonthname = self.__cutmonthname(v['monthnames'][sdow.month() - 1], 3) +emonthname = self.__cutmonthname(v['monthnames'][edow.month() - 1], 3) left = '%s %d' % (emonthname, edow.year()) if sdow.aMonth() != edow.aMonth():
[Zope] a patch for the calendar tag 0.9.10
Hi there, here's a patch for the Calendar 0.9.10 product. This version allows people to define their own day or month names instead of the default english names. This is very useful if you want to setup a web calendar in another language than English. In French, some month names contain accented letters, represented in HTML by character entities like é for example. The Calendar product doesn't cut the month names correctly in regard to these entities, especially in week mode when a week was between two months. Here's a patch to correct the problem. hope this helps. bye, Jerome Alet --- CalendarTag.py.orig Sun Jun 4 11:09:54 2000 +++ CalendarTag.py Sun Jun 4 11:08:43 2000 @@ -114,6 +114,22 @@ self.week_sday = int(weekdays[0]) self.week_ndays = int(weekdays[1]) +def __cutmonthname(self, name, length) : +"""Cuts the month name at length characters, counting +character entities for only one character""" +entityfound = 0 +for i in range(len(name)) : +if name[i] == '&' : +entityfound = 1 +elif name[i] == ';' : +entityfound = 0 + +if not entityfound : +length = length - 1 +if not length : +break +return name[:i + 1] + def render(self, md): ##time_start = time() @@ -233,8 +249,8 @@ elif self.mode == 'week': sdow = date - date.dow() edow = sdow + 6 -smonthname = v['monthnames'][sdow.month() - 1][:3] -emonthname = v['monthnames'][edow.month() - 1][:3] +smonthname = self.__cutmonthname(v['monthnames'][sdow.month() - 1], 3) +emonthname = self.__cutmonthname(v['monthnames'][edow.month() - 1], 3) left = '%s %d' % (emonthname, edow.year()) if sdow.aMonth() != edow.aMonth():
Re: [Zope] ANN: Perl For Zope
On Thu, 25 May 2000, Oleg Broytmann wrote: > it? "There is always too many ways to do it" - it is Perl motto, not > Python. I am pretty sure Zope shouldn't has too many scripting languages. > Many protocols - yes, it is very good. But many languages? No, that's bad. Agreed 100% ! Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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 log rotation
On Fri, May 19, 2000 at 07:39:34AM -0400, J. Atwood wrote: > If you are running it on a Linux box (RH) there are already tools > installed to rotate logs (move, tar, etc). That and a cron job will > be your best friend. Particularly logrotate which is made just for this. just look at: /etc/logrotate.conf and: man logrotate good luck. Jerome ___ 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] install probs on sparc-linux
On Tue, May 16, 2000 at 12:40:16PM -0400, Kevin Vranes wrote: > I'm running RH 6.2 on a sparc and trying to install Zope 2.1.6 from > source. > > I installed python1.5.2 with threads but the configure is always dying at: You probably need to recompile python, modifying Modules/Setup.in to include the sha module in the compilation, then you'll probably be able to run Zope successfully: I use it at work on a RedHat 4.2 SparcLinux box with python 1.5.2 bye, Jerome ___ 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 )