From zope-tests@squishdot.org Sun Jun 1 03:41:26 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Sun, 01 Jun 2003 03:41:26 +0100 Subject: [Zope-CMF] Linux Test Results - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#1, May 20 2002, 12:02:16) [GCC 2.95.2 20000220 (Debian GNU/Linux)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ........................................................................................................................................................................................................................................................................................................................................ ---------------------------------------------------------------------- Ran 328 tests in 37.800s OK From norman@khine.net Sun Jun 1 12:52:14 2003 From: norman@khine.net (Norman Khine) Date: Sun, 1 Jun 2003 12:52:14 +0100 Subject: [Zope-CMF] Importing Members from CSV file Message-ID: <022401c32834$3ebd0010$0100a8c0@alpha> This is a multi-part message in MIME format. ------=_NextPart_000_0221_01C3283C.A053A150 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable hello, i've been looking at the how-to for = http://www.zopelabs.com/cookbook/1053577371 adding members from CSV = file, but keep on getting=20 Error Type=20 NameError Error Value=20 global name 'REQUEST' is not defined as though the dtml is not passing the file values? what am i doing wrong here? thanks norman ------=_NextPart_000_0221_01C3283C.A053A150 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
hello,
i've been looking at the how-to for http://www.zopelabs.= com/cookbook/1053577371 adding=20 members from CSV file, but keep on getting
 
Error Type
NameError
Error Value
global name 'REQUEST' is not defined
 
as though the dtml is not passing the file = values?
 
what am i doing wrong here?
 
thanks
 
norman
------=_NextPart_000_0221_01C3283C.A053A150-- From cleath@j9k.org Sun Jun 1 13:50:41 2003 From: cleath@j9k.org (Colin Leath) Date: Sun, 1 Jun 2003 08:50:41 -0400 (EDT) Subject: [Zope-CMF] Please, help to start using Epoz In-Reply-To: <3ED86158.6000707@rambler.ru> Message-ID: Here's what I do to use Epoz in cmf (at http://carfreeuniverse.org): (1) copy document_edit_form (ZPT) and put it in your epoz skin folder. Rename it to epoz_edit_form since I'm running epoz on freezope, some modification of the init script is necessary (just commenting out lines). Mine is at the end of this email. (2) edit the epoz_edit_form so that it calls Epoz! my epoz_edit_form is below. Really, I only made one essential change. (3) follow the instructions at http://cmf.zope.org/Members/tseaver/20020723_external_editor_available/view but modify as appropriate (read the responses) to use epoz. (the security part is not necessary, for one thing.). Being lazy, I call my epoz_edit action "edit (wysiwyg)" and leave it there along with the normal edit and edit (external) actions. Colin http://j9k.org On Sat, 31 May 2003, gxk@rambler.ru wrote: > Hi! > > I am new guy in Zope, so excuse me for dumm questions.Have Zope-2.6.1, > CMF-1.4, Epoz-0.2.2 under RedHat9 w/ Mozilla-1.4rc1 and IE6-sp1 > > 1. > I am trying to use Epoz under CMFPortal. > Add epoz under and add epoz to the skin path. > > Create edit dtml-method (id=edit) w/ code from your example under > /skins/custom > Also create dtml-doc at the same place, named test. > > Now when i did URL//test getting test document, but when > URL//test/edit nothing changed. > Can u have any advise for me? > > > > _______________________________________________ > Zope-CMF maillist - Zope-CMF@zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests > ## Script (Python) "Epoz" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=name, data='', toolbox='', lang='en', style='width: 600px; height: 250px;', path='' ##title= ## # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ### Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##### """ Create an Epoz-Wysiwyg-Editor. name : the name of the form-element which submits the data data : the data to edit toolbox : a link to a HTML-Page which delivers additional tools lang: a code for the language-file (en,de,...) style : style-definition for the editor path : path to Epoz-Javascript. Needed mainly for Plone (portal_url). If Epoz can't create a Rich-Text-Editor, a simple textarea is created. """ if data is None: data='' js_data = data # Unqoute newlines and single quotes, so the Epoz-JavaScript won't break. for (key,val) in {'\n':'\\n', '\r':'', "'":"\\'"}.items(): js_data = js_data.replace(key, val) # Return the HTML-Code for the Epoz-Rich-Text-Editor return """ """ % ( path, lang, path, path, path, name, js_data, toolbox, style, path, name, style, data ) ###########################=epoz_edit_form:=#################

Edit ID

Title Title
Description Description
Format
Upload
Edit Epoz editor here

Note: You will get a WYSIWYG (what you see is what you get) editor only if you're using Mozilla version >= 1.3.1 or I.E. version >= 5.5. If you would like to have the option of setting the editing area height & width, tell me so. It is easy to do.
From eric@ohmforce.com Sun Jun 1 19:00:40 2003 From: eric@ohmforce.com (Eric CESTARI) Date: Sun, 1 Jun 2003 20:00:40 +0200 Subject: [Zope-CMF] Memberdata postgres storage Message-ID: Hi, Everything is working now. It needs a little performance tuning though (I had to restart Zope every now and then to free pq clients). thanks for your help ! I'll try and put up a document when the site is live about my experience. Cheers, Eric From norman@khine.net Mon Jun 2 08:31:35 2003 From: norman@khine.net (Norman Khine) Date: Mon, 2 Jun 2003 08:31:35 +0100 Subject: [Zope-CMF] sum up member properties for specific time period Message-ID: <029e01c328d8$ff390600$0100a8c0@alpha> hello, how can one, sum up the member properties? for example, i would like to be able to sum up all the members that had joined the cmf portal within a specific time period, and get a table like so: Date \ Member Type | REVIEWER | MEMBER | TOTAL ------------------------------------------------------------------------ MAR-03 | 2 | 10 | 12 APR-03 | 4 | 12 | 16 MAY-03 | 1 | 23 | 24 JUN-03 | 0 | 2 | 2 ------------------------------------------------------------------------- TOTAL | 7 | 47 | 54 thanks norman From johnpk@hrp.no Mon Jun 2 09:10:34 2003 From: johnpk@hrp.no (John Petter Kvalvik) Date: Mon, 2 Jun 2003 10:10:34 +0200 Subject: [Zope-CMF] Join Message-ID: <533F9AF6AFE41A4B9D3D6F6E458C4F4288AF71@pat.hrp.no> ___________________________________________________________________ Petter Kvalvik Personnel/Accounts IFE, OECD Halden Reactor Project P.O. Box 173, N-1751 Halden Norway Switchboard (+47) 69 21 22 00, Direct line (+47) 69 21 23 53 Private (+47) 90 58 57 46, Fax (+47) 69 21 24 40 E-mail: john.petter.kvalvik@hrp.no http://www.ife.no/ http://intranet.ife.no/IFE/Avdelinger/ADM/ ____________________________________________________________ From chrisw@nipltd.com Mon Jun 2 12:16:04 2003 From: chrisw@nipltd.com (Chris Withers) Date: Mon, 02 Jun 2003 12:16:04 +0100 Subject: [Zope-CMF] Importing Members from CSV file In-Reply-To: <022401c32834$3ebd0010$0100a8c0@alpha> References: <022401c32834$3ebd0010$0100a8c0@alpha> Message-ID: <3EDB31F4.3010105@nipltd.com> Norman Khine wrote: > hello, > i've been looking at the how-to for > http://www.zopelabs.com/cookbook/1053577371 adding members from CSV > file, but keep on getting > > *Error Type * > NameError > *Error Value * > global name 'REQUEST' is not defined If that's a Script (Python) then it needs the following somewhere up the top of the script: REQUEST = context.REQUEST. cheers, Chris From dieter@handshake.de Mon Jun 2 18:05:41 2003 From: dieter@handshake.de (Dieter Maurer) Date: Mon, 2 Jun 2003 19:05:41 +0200 Subject: [Zope-CMF] sum up member properties for specific time period In-Reply-To: <029e01c328d8$ff390600$0100a8c0@alpha> References: <029e01c328d8$ff390600$0100a8c0@alpha> Message-ID: <16091.33765.230019.926675@gargle.gargle.HOWL> Norman Khine wrote at 2003-6-2 08:31 +0100: > how can one, sum up the member properties? for example, i would like to be > able to sum up all the members that had joined the cmf portal within a > specific time period, and get a table like so: > > > Date \ Member Type | REVIEWER | MEMBER | TOTAL > ------------------------------------------------------------------------ > MAR-03 | 2 | 10 > | 12 > APR-03 | 4 | 12 > | 16 > MAY-03 | 1 | 23 > | 24 > JUN-03 | 0 | 2 > | 2 > ------------------------------------------------------------------------- > TOTAL | 7 | 47 > | 54 Zope does not directly maintain this information for you. When you are using FileStorage (the default ZODB storage), then in principle historical information is maintained up to the last pack time. But it is not easy to access this information (for ObjectManager like objects). The best way is that you store the information yourself. Dieter From norman@khine.net Mon Jun 2 19:15:47 2003 From: norman@khine.net (Norman Khine) Date: Mon, 2 Jun 2003 19:15:47 +0100 Subject: [Zope-CMF] sum up member properties for specific time period References: <029e01c328d8$ff390600$0100a8c0@alpha> <16091.33765.230019.926675@gargle.gargle.HOWL> Message-ID: <02d401c32932$fdd47a10$0100a8c0@alpha> hi dieter, thanks for the reply, but i am not sure i understand ;^( you're saying that i should store these data within a database rather than the ZODB? or am i wrong? what i have is that i have setup some additional properties to the Member on the CMF, this includes Join_Date, Office_Location etc, so when a user joins the form registers the Date & Time and also it asks them to select from a drop-down box the Office_Location(this is stored as 1, 2, 3 - where 1 is the Head Office, 2 is Editorial, and 3 is Developmet) - all this is stored on the ZODB and if I use the how-to http://www.zopelabs.com/cookbook/1048010784 i can see all the data that I need to analyse, BUT don't have the know-how of how to achieve this ;^( also, looking at the http://www.zopelabs.com/cookbook/1054497272 we can count how many members we have? so isn't there a way to group these by Join_Date property? does this make my query still unworkable, or have i missed something in your reply. thanks norman ----- Original Message ----- From: "Dieter Maurer" To: "Norman Khine" Cc: "Zope-CMF" Sent: Monday, June 02, 2003 6:05 PM Subject: Re: [Zope-CMF] sum up member properties for specific time period > Norman Khine wrote at 2003-6-2 08:31 +0100: > > how can one, sum up the member properties? for example, i would like to be > > able to sum up all the members that had joined the cmf portal within a > > specific time period, and get a table like so: > > > > > > Date \ Member Type | REVIEWER | MEMBER | TOTAL > > ------------------------------------------------------------------------ > > MAR-03 | 2 | 10 > > | 12 > > APR-03 | 4 | 12 > > | 16 > > MAY-03 | 1 | 23 > > | 24 > > JUN-03 | 0 | 2 > > | 2 > > ------------------------------------------------------------------------- > > TOTAL | 7 | 47 > > | 54 > > Zope does not directly maintain this information for you. > > When you are using FileStorage (the default ZODB storage), > then in principle historical information is maintained > up to the last pack time. But it is not easy to access > this information (for ObjectManager like objects). > > The best way is that you store the information yourself. > > > Dieter > > _______________________________________________ > Zope-CMF maillist - Zope-CMF@zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests > From disommav@interfree.it Mon Jun 2 20:43:49 2003 From: disommav@interfree.it (Vincenzo Di Somma) Date: Mon, 02 Jun 2003 21:43:49 +0200 Subject: [Zope-CMF] Hierarchical user management References: <5.2.0.9.0.20030530225538.00bd6768@5456.dk> Message-ID: <3EDBA8F5.6010005@interfree.it> Kristian Nilsen wrote: > Hi everyone, > > I've installed CMF with the purpose of managing a community of private > apartments, where there are about 7-10 users per apartment. I have > tried to find a solution for the apartments to manage their own users: > what I would like to do is to create one "apartment"-user for each of > the apartments (of course, the "apartment" user only has limited > privileges - perhaps the only thing he can do is add new users). Then > I'd like to limit each of the "apartment"-users to a certain number of > "resident"-users (say there are 7 persons living in that apartment; > I'd allow 7 resident-users plus e.g. 1 extra account if someone is in > the process of moving in or out). > > I would also like to give each of the apartments a Desktop common for > all the residents, and the possibility to share documents and have > discussions etc. that are private/accessible only to the residents. > > Has anyone implemented something like this, or know how I could solve > this? No, but it should be easy to set up a local role on an apartemt and count how many people have that local role. Vincenzo. From sean.upton@uniontrib.com Mon Jun 2 21:09:53 2003 From: sean.upton@uniontrib.com (sean.upton@uniontrib.com) Date: Mon, 02 Jun 2003 13:09:53 -0700 Subject: [Zope-CMF] sum up member properties for specific time period Message-ID: Why don't you just use an external method that is run once daily via a cron job that logs the day's stats to a text log file. Write another external method to parse the log and/or provide reporting??? Sean > -----Original Message----- > From: Norman Khine [mailto:norman@khine.net] > Sent: Monday, June 02, 2003 11:16 AM > To: Dieter Maurer > Cc: Zope-CMF > Subject: Re: [Zope-CMF] sum up member properties for specific time > period > > > hi dieter, > thanks for the reply, but i am not sure i understand ;^( > > you're saying that i should store these data within a > database rather than > the ZODB? or am i wrong? > > what i have is that i have setup some additional properties > to the Member on > the CMF, this includes Join_Date, Office_Location etc, so > when a user joins > the form registers the Date & Time and also it asks them to > select from a > drop-down box the Office_Location(this is stored as 1, 2, 3 - > where 1 is the > Head Office, 2 is Editorial, and 3 is Developmet) - all this > is stored on > the ZODB and if I use the how-to > http://www.zopelabs.com/cookbook/1048010784 > i can see all the data that I need to analyse, BUT don't have > the know-how > of how to achieve this ;^( > > also, looking at the > http://www.zopelabs.com/cookbook/1054497272 we can > count how many members we have? so isn't there a way to group these by > Join_Date property? > > does this make my query still unworkable, or have i missed > something in your > reply. > > thanks > > norman > > ----- Original Message ----- > From: "Dieter Maurer" > To: "Norman Khine" > Cc: "Zope-CMF" > Sent: Monday, June 02, 2003 6:05 PM > Subject: Re: [Zope-CMF] sum up member properties for specific > time period > > > > Norman Khine wrote at 2003-6-2 08:31 +0100: > > > how can one, sum up the member properties? for example, > i would like to > be > > > able to sum up all the members that had joined the cmf > portal within a > > > specific time period, and get a table like so: > > > > > > > > > Date \ Member Type | REVIEWER | MEMBER | TOTAL > > > > > -------------------------------------------------------------- > ---------- > > > MAR-03 | 2 > | 10 > > > | 12 > > > APR-03 | 4 > | 12 > > > | 16 > > > MAY-03 | 1 | > 23 > > > | 24 > > > JUN-03 | 0 | > 2 > > > | 2 > > > > > -------------------------------------------------------------- > ----------- > > > TOTAL | 7 | > 47 > > > | 54 > > > > Zope does not directly maintain this information for you. > > > > When you are using FileStorage (the default ZODB storage), > > then in principle historical information is maintained > > up to the last pack time. But it is not easy to access > > this information (for ObjectManager like objects). > > > > The best way is that you store the information yourself. > > > > > > Dieter > > > > _______________________________________________ > > Zope-CMF maillist - Zope-CMF@zope.org > > http://mail.zope.org/mailman/listinfo/zope-cmf > > > > See http://collector.zope.org/CMF for bug reports and > feature requests > > > > > _______________________________________________ > Zope-CMF maillist - Zope-CMF@zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests > From norman@khine.net Mon Jun 2 21:43:49 2003 From: norman@khine.net (Norman Khine) Date: Mon, 2 Jun 2003 21:43:49 +0100 Subject: [Zope-CMF] sum up member properties for specific time period References: Message-ID: <02f801c32947$abf51b90$0100a8c0@alpha> suerly, i must be missing something here or don't understand the whole OO programming, perhaps you can enlighten me ;^) but if it is possible to write an external method to collate this information and another method to analyse this, is there no way to by-pass the need for the text file and be able to piece the information from the ZODB? perhaps i am thinking more on SQL terms rather then OO! is this my Achilles heal? thanks norman ----- Original Message ----- From: To: ; Cc: Sent: Monday, June 02, 2003 9:09 PM Subject: RE: [Zope-CMF] sum up member properties for specific time period > Why don't you just use an external method that is run once daily via a cron > job that logs the day's stats to a text log file. Write another external > method to parse the log and/or provide reporting??? > > Sean > > > -----Original Message----- > > From: Norman Khine [mailto:norman@khine.net] > > Sent: Monday, June 02, 2003 11:16 AM > > To: Dieter Maurer > > Cc: Zope-CMF > > Subject: Re: [Zope-CMF] sum up member properties for specific time > > period > > > > > > hi dieter, > > thanks for the reply, but i am not sure i understand ;^( > > > > you're saying that i should store these data within a > > database rather than > > the ZODB? or am i wrong? > > > > what i have is that i have setup some additional properties > > to the Member on > > the CMF, this includes Join_Date, Office_Location etc, so > > when a user joins > > the form registers the Date & Time and also it asks them to > > select from a > > drop-down box the Office_Location(this is stored as 1, 2, 3 - > > where 1 is the > > Head Office, 2 is Editorial, and 3 is Developmet) - all this > > is stored on > > the ZODB and if I use the how-to > > http://www.zopelabs.com/cookbook/1048010784 > > i can see all the data that I need to analyse, BUT don't have > > the know-how > > of how to achieve this ;^( > > > > also, looking at the > > http://www.zopelabs.com/cookbook/1054497272 we can > > count how many members we have? so isn't there a way to group these by > > Join_Date property? > > > > does this make my query still unworkable, or have i missed > > something in your > > reply. > > > > thanks > > > > norman > > > > ----- Original Message ----- > > From: "Dieter Maurer" > > To: "Norman Khine" > > Cc: "Zope-CMF" > > Sent: Monday, June 02, 2003 6:05 PM > > Subject: Re: [Zope-CMF] sum up member properties for specific > > time period > > > > > > > Norman Khine wrote at 2003-6-2 08:31 +0100: > > > > how can one, sum up the member properties? for example, > > i would like to > > be > > > > able to sum up all the members that had joined the cmf > > portal within a > > > > specific time period, and get a table like so: > > > > > > > > > > > > Date \ Member Type | REVIEWER | MEMBER | TOTAL > > > > > > > > -------------------------------------------------------------- > > ---------- > > > > MAR-03 | 2 > > | 10 > > > > | 12 > > > > APR-03 | 4 > > | 12 > > > > | 16 > > > > MAY-03 | 1 | > > 23 > > > > | 24 > > > > JUN-03 | 0 | > > 2 > > > > | 2 > > > > > > > > -------------------------------------------------------------- > > ----------- > > > > TOTAL | 7 | > > 47 > > > > | 54 > > > > > > Zope does not directly maintain this information for you. > > > > > > When you are using FileStorage (the default ZODB storage), > > > then in principle historical information is maintained > > > up to the last pack time. But it is not easy to access > > > this information (for ObjectManager like objects). > > > > > > The best way is that you store the information yourself. > > > > > > > > > Dieter > > > > > > _______________________________________________ > > > Zope-CMF maillist - Zope-CMF@zope.org > > > http://mail.zope.org/mailman/listinfo/zope-cmf > > > > > > See http://collector.zope.org/CMF for bug reports and > > feature requests > > > > > > > > > _______________________________________________ > > Zope-CMF maillist - Zope-CMF@zope.org > > http://mail.zope.org/mailman/listinfo/zope-cmf > > > > See http://collector.zope.org/CMF for bug reports and feature requests > > > > _______________________________________________ > Zope-CMF maillist - Zope-CMF@zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests > From sean.upton@uniontrib.com Mon Jun 2 22:00:20 2003 From: sean.upton@uniontrib.com (sean.upton@uniontrib.com) Date: Mon, 02 Jun 2003 14:00:20 -0700 Subject: [Zope-CMF] sum up member properties for specific time period Message-ID: Storing somthing like this in the ZODB requires you to create a data structure (class) to hold it. I'm advocating the lazy approach of just logging your data to a text file (or even a RDB table) to save time and effort. External methods would only be required if you want to do file i/o... Sean > -----Original Message----- > From: Norman Khine [mailto:norman@khine.net] > Sent: Monday, June 02, 2003 1:44 PM > To: Dieter Maurer; sean.upton@uniontrib.com > Cc: Zope-CMF > Subject: Re: [Zope-CMF] sum up member properties for specific time > period > > > suerly, i must be missing something here or don't understand > the whole OO > programming, perhaps you can enlighten me ;^) > > but if it is possible to write an external method to collate this > information and another method to analyse this, is there no > way to by-pass > the need for the text file and be able to piece the > information from the > ZODB? > > perhaps i am thinking more on SQL terms rather then OO! > > is this my Achilles heal? > > thanks > > norman > > > ----- Original Message ----- > From: > To: ; > Cc: > Sent: Monday, June 02, 2003 9:09 PM > Subject: RE: [Zope-CMF] sum up member properties for specific > time period > > > > Why don't you just use an external method that is run once > daily via a > cron > > job that logs the day's stats to a text log file. Write > another external > > method to parse the log and/or provide reporting??? > > > > Sean > > > > > -----Original Message----- > > > From: Norman Khine [mailto:norman@khine.net] > > > Sent: Monday, June 02, 2003 11:16 AM > > > To: Dieter Maurer > > > Cc: Zope-CMF > > > Subject: Re: [Zope-CMF] sum up member properties for specific time > > > period > > > > > > > > > hi dieter, > > > thanks for the reply, but i am not sure i understand ;^( > > > > > > you're saying that i should store these data within a > > > database rather than > > > the ZODB? or am i wrong? > > > > > > what i have is that i have setup some additional properties > > > to the Member on > > > the CMF, this includes Join_Date, Office_Location etc, so > > > when a user joins > > > the form registers the Date & Time and also it asks them to > > > select from a > > > drop-down box the Office_Location(this is stored as 1, 2, 3 - > > > where 1 is the > > > Head Office, 2 is Editorial, and 3 is Developmet) - all this > > > is stored on > > > the ZODB and if I use the how-to > > > http://www.zopelabs.com/cookbook/1048010784 > > > i can see all the data that I need to analyse, BUT don't have > > > the know-how > > > of how to achieve this ;^( > > > > > > also, looking at the > > > http://www.zopelabs.com/cookbook/1054497272 we can > > > count how many members we have? so isn't there a way to > group these by > > > Join_Date property? > > > > > > does this make my query still unworkable, or have i missed > > > something in your > > > reply. > > > > > > thanks > > > > > > norman > > > > > > ----- Original Message ----- > > > From: "Dieter Maurer" > > > To: "Norman Khine" > > > Cc: "Zope-CMF" > > > Sent: Monday, June 02, 2003 6:05 PM > > > Subject: Re: [Zope-CMF] sum up member properties for specific > > > time period > > > > > > > > > > Norman Khine wrote at 2003-6-2 08:31 +0100: > > > > > how can one, sum up the member properties? for example, > > > i would like to > > > be > > > > > able to sum up all the members that had joined the cmf > > > portal within a > > > > > specific time period, and get a table like so: > > > > > > > > > > > > > > > Date \ Member Type | REVIEWER | > MEMBER | TOTAL > > > > > > > > > > > -------------------------------------------------------------- > > > ---------- > > > > > MAR-03 | 2 > > > | 10 > > > > > | 12 > > > > > APR-03 | 4 > > > | 12 > > > > > | 16 > > > > > MAY-03 | 1 | > > > 23 > > > > > | 24 > > > > > JUN-03 | 0 | > > > 2 > > > > > | 2 > > > > > > > > > > > -------------------------------------------------------------- > > > ----------- > > > > > TOTAL | 7 | > > > 47 > > > > > | 54 > > > > > > > > Zope does not directly maintain this information for you. > > > > > > > > When you are using FileStorage (the default ZODB storage), > > > > then in principle historical information is maintained > > > > up to the last pack time. But it is not easy to access > > > > this information (for ObjectManager like objects). > > > > > > > > The best way is that you store the information yourself. > > > > > > > > > > > > Dieter > > > > > > > > _______________________________________________ > > > > Zope-CMF maillist - Zope-CMF@zope.org > > > > http://mail.zope.org/mailman/listinfo/zope-cmf > > > > > > > > See http://collector.zope.org/CMF for bug reports and > > > feature requests > > > > > > > > > > > > > _______________________________________________ > > > Zope-CMF maillist - Zope-CMF@zope.org > > > http://mail.zope.org/mailman/listinfo/zope-cmf > > > > > > See http://collector.zope.org/CMF for bug reports and > feature requests > > > > > > > _______________________________________________ > > Zope-CMF maillist - Zope-CMF@zope.org > > http://mail.zope.org/mailman/listinfo/zope-cmf > > > > See http://collector.zope.org/CMF for bug reports and > feature requests > > > From zope-tests@squishdot.org Tue Jun 3 03:19:43 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Tue, 03 Jun 2003 03:19:43 +0100 Subject: [Zope-CMF] Win32 Tests - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ---------------------------------------------------------------------- Ran 327 tests in 15.968s OK From r.ritz@biologie.hu-berlin.de Tue Jun 3 08:36:52 2003 From: r.ritz@biologie.hu-berlin.de (Raphael Ritz) Date: Tue, 03 Jun 2003 09:36:52 +0200 Subject: [Zope-CMF] sum up member properties for specific time period References: <029e01c328d8$ff390600$0100a8c0@alpha> <16091.33765.230019.926675@gargle.gargle.HOWL> <02d401c32932$fdd47a10$0100a8c0@alpha> Message-ID: <3EDC5014.1060001@itb.biologie.hu-berlin.de> Norman Khine wrote: >hi dieter, >thanks for the reply, but i am not sure i understand ;^( > >you're saying that i should store these data within a database rather than >the ZODB? or am i wrong? > >what i have is that i have setup some additional properties to the Member on >the CMF, this includes Join_Date, Office_Location etc, so when a user joins >the form registers the Date & Time and also it asks them to select from a >drop-down box the Office_Location(this is stored as 1, 2, 3 - where 1 is the >Head Office, 2 is Editorial, and 3 is Developmet) - all this is stored on >the ZODB and if I use the how-to http://www.zopelabs.com/cookbook/1048010784 >i can see all the data that I need to analyse, BUT don't have the know-how >of how to achieve this ;^( > >also, looking at the http://www.zopelabs.com/cookbook/1054497272 we can >count how many members we have? so isn't there a way to group these by >Join_Date property? > >does this make my query still unworkable, or have i missed something in your >reply. > An alternative might be to use the catalog for your task. If you index Join_Date you could do a date-range search on that later. Raphael > >thanks > >norman > >----- Original Message ----- >From: "Dieter Maurer" >To: "Norman Khine" >Cc: "Zope-CMF" >Sent: Monday, June 02, 2003 6:05 PM >Subject: Re: [Zope-CMF] sum up member properties for specific time period > > > > >>Norman Khine wrote at 2003-6-2 08:31 +0100: >> > how can one, sum up the member properties? for example, i would like to >> >> >be > > >> > able to sum up all the members that had joined the cmf portal within a >> > specific time period, and get a table like so: >> > >> > >> > Date \ Member Type | REVIEWER | MEMBER | TOTAL >> >> >> > > ------------------------------------------------------------------------ > > >> > MAR-03 | 2 | 10 >> > | 12 >> > APR-03 | 4 | 12 >> > | 16 >> > MAY-03 | 1 | 23 >> > | 24 >> > JUN-03 | 0 | >> >> >2 > > >> > | 2 >> >> >> > > ------------------------------------------------------------------------- > > >> > TOTAL | 7 | >> >> >47 > > >> > | 54 >> >>Zope does not directly maintain this information for you. >> >>When you are using FileStorage (the default ZODB storage), >>then in principle historical information is maintained >>up to the last pack time. But it is not easy to access >>this information (for ObjectManager like objects). >> >>The best way is that you store the information yourself. >> >> >>Dieter >> >>_______________________________________________ >>Zope-CMF maillist - Zope-CMF@zope.org >>http://mail.zope.org/mailman/listinfo/zope-cmf >> >>See http://collector.zope.org/CMF for bug reports and feature requests >> >> >> > > >_______________________________________________ >Zope-CMF maillist - Zope-CMF@zope.org >http://mail.zope.org/mailman/listinfo/zope-cmf > >See http://collector.zope.org/CMF for bug reports and feature requests > > > From chrisw@nipltd.com Tue Jun 3 10:17:58 2003 From: chrisw@nipltd.com (Chris Withers) Date: Tue, 03 Jun 2003 10:17:58 +0100 Subject: [Zope-CMF] Re: FSPropertiesObject - lines property References: <3EDC5D85.7020208@d2m.at> Message-ID: <3EDC67C6.2020607@nipltd.com> Michael Haubenwallner wrote: > Hi, > i have seen you are the current maintainer of > CMF/CMFCore/FSPropertiesObject.py. if i should put this question on the > collector - please tell me so and forgive me. Hmmm... what leads you to believe I'm the current maintainer? I wonder if hte list has any ideas on this: > My problem is a follows: > i need a lines property for one of my cmf products and put the default > values into a .props file inside my products skin directory. the .prop > file is imported correctly, but i found no way to format the values of > the lines property correct. the best i get is a list with one element of > type string. > > i looked into ZPublisher.Converters.file2lines and found, that the > converter wants to split on '\n' which clearly is not possible inside > _readfile(). > > i looked in other projects but found no example of adequate usage. > could you point me to an example of a correct lines property formating > or give me a clue, how i could work around this (i thought about extra > testing on property type and splitting on a self defines separator ?) cheers, Chris From michael@d2m.at Tue Jun 3 10:32:57 2003 From: michael@d2m.at (Michael Haubenwallner) Date: Tue, 03 Jun 2003 11:32:57 +0200 Subject: [Zope-CMF] Re: FSPropertiesObject - lines property In-Reply-To: <3EDC67C6.2020607@nipltd.com> References: <3EDC5D85.7020208@d2m.at> <3EDC67C6.2020607@nipltd.com> Message-ID: Chris Withers wrote: > Michael Haubenwallner wrote: > >> Hi, >> i have seen you are the current maintainer of >> CMF/CMFCore/FSPropertiesObject.py. if i should put this question on >> the collector - please tell me so and forgive me. > > > Hmmm... what leads you to believe I'm the current maintainer? > $Id: FSPropertiesObject.py,v 1.15 2003/01/23 14:31:12 chrisw Exp $ Hmm, its all in a name - i alway thought chrisw is you - sorry about that. > I wonder if hte list has any ideas on this: > Dieter gave me some hints over at the zope list... Dieter Maurer wrote: > michael haubenwallner wrote at 2003-5-29 19:18 +0200: > > how do i format the value of a lines property in a "Filesystem > > Properties Object" correct? > > > > eg: multivalues:lines=value1, value2, value3 > > > > results in just one line, not three... > > > > ZPublisher.Converters.py: file2lines wants to split on \n > > but no newlines are allowed in a .props file > > Difficult... > > We would need either to add continuation lines or some kind > of newline representing escape charachers. > > The better way would probably be to define a new "type", say "tales" > with TALES expressions as value. These expressions would be evaluated > to get the property value. > > If this would help you, post a feature request to > . > So - a few usage examples would definitely help me out here Thanks all Michael From jean@upfrontsystems.co.za Tue Jun 3 10:41:12 2003 From: jean@upfrontsystems.co.za (Jean Jordaan) Date: Tue, 03 Jun 2003 11:41:12 +0200 Subject: [Zope-CMF] Re: FSPropertiesObject - lines property In-Reply-To: References: <3EDC5D85.7020208@d2m.at> <3EDC67C6.2020607@nipltd.com> Message-ID: <3EDC6D38.8000304@upfrontsystems.co.za> > $Id: FSPropertiesObject.py,v 1.15 2003/01/23 14:31:12 chrisw Exp $ > > Hmm, its all in a name - i alway thought chrisw is you - sorry about that. He is, but that line just means that he's the last one to have checked in a change on that file, not that he's the maintainer. -- Jean Jordaan http://www.upfrontsystems.co.za From chrisw@nipltd.com Tue Jun 3 11:01:13 2003 From: chrisw@nipltd.com (Chris Withers) Date: Tue, 03 Jun 2003 11:01:13 +0100 Subject: [Zope-CMF] Re: FSPropertiesObject - lines property References: <3EDC5D85.7020208@d2m.at> <3EDC67C6.2020607@nipltd.com> Message-ID: <3EDC71E9.1030805@nipltd.com> Michael Haubenwallner wrote: >> Hmmm... what leads you to believe I'm the current maintainer? >> > $Id: FSPropertiesObject.py,v 1.15 2003/01/23 14:31:12 chrisw Exp $ That just means I was the last person to edit the file ;-) > Hmm, its all in a name - i alway thought chrisw is you - sorry about that. oh, it is :-) cheers, Chris From tseaver@zope.com Tue Jun 3 13:56:22 2003 From: tseaver@zope.com (Tres Seaver) Date: 03 Jun 2003 08:56:22 -0400 Subject: [Zope-CMF] Re: FSPropertiesObject - lines property In-Reply-To: <3EDC71E9.1030805@nipltd.com> References: <3EDC5D85.7020208@d2m.at> <3EDC67C6.2020607@nipltd.com> <3EDC71E9.1030805@nipltd.com> Message-ID: <1054644983.15424.0.camel@trigger.palladion.com> On Tue, 2003-06-03 at 06:01, Chris Withers wrote: > Michael Haubenwallner wrote: > >> Hmmm... what leads you to believe I'm the current maintainer? > >> > > $Id: FSPropertiesObject.py,v 1.15 2003/01/23 14:31:12 chrisw Exp $ > > That just means I was the last person to edit the file ;-) "You touched it last" is a common way to achieve maintainership of code within the walls of Zope Corp. :) Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From dieter@handshake.de Tue Jun 3 19:26:28 2003 From: dieter@handshake.de (Dieter Maurer) Date: Tue, 3 Jun 2003 20:26:28 +0200 Subject: [Zope-CMF] sum up member properties for specific time period In-Reply-To: <02d401c32932$fdd47a10$0100a8c0@alpha> References: <029e01c328d8$ff390600$0100a8c0@alpha> <16091.33765.230019.926675@gargle.gargle.HOWL> <02d401c32932$fdd47a10$0100a8c0@alpha> Message-ID: <16092.59476.586371.455408@gargle.gargle.HOWL> Norman Khine wrote at 2003-6-2 19:15 +0100: > you're saying that i should store these data within a database rather than > the ZODB? or am i wrong? No, I do not (want to) say that. Instead, I mean: you must store the historical data somewhere (this can be the ZODB or a relational database or a file). While historical data is maintained by an undoable storage (until packing time), it is difficult to access it and it is lost before the packing time. > what i have is that i have setup some additional properties to the Member on > the CMF, this includes Join_Date, Office_Location etc, so when a user joins > the form registers the Date & Time and also it asks them to select from a > drop-down box the Office_Location(this is stored as 1, 2, 3 - where 1 is the > Head Office, 2 is Editorial, and 3 is Developmet) - all this is stored on > the ZODB and if I use the how-to http://www.zopelabs.com/cookbook/1048010784 > i can see all the data that I need to analyse, BUT don't have the know-how > of how to achieve this ;^( Either, you use the ZCatalog (as someone else already suggested; see the Zope Book (2.6 edition - online) for details) or you use a Python Script, enumerate all members and sort them into bins (categories) as required. > also, looking at the http://www.zopelabs.com/cookbook/1054497272 we can > count how many members we have? so isn't there a way to group these by > Join_Date property? Do it with a Python Script (Zope does not have something like the "group by" clause of SQL). Dieter From jeff@hi-privacy.net Tue Jun 3 20:41:37 2003 From: jeff@hi-privacy.net (Jeff Coleman) Date: Tue, 3 Jun 2003 14:41:37 -0500 Subject: [Zope-CMF] Security problem in CMF Message-ID: Hi all, Should objects in a skin folder IGNORE the security setting of the skin folder they are in? Considering how Zope security works with acquisition I think this is a BIG security problem. Example: portal/portal_skins/my_skin/austin/object If 'View' is set to 'Acquire permission settings?' not checked and 'Anonymous' not checked on the folder 'my_skin', an anonymous user can still view portal/object. Thanks, Jeff From shane@zope.com Tue Jun 3 21:41:08 2003 From: shane@zope.com (Shane Hathaway) Date: Tue, 03 Jun 2003 16:41:08 -0400 Subject: [Zope-CMF] Security problem in CMF In-Reply-To: References: Message-ID: <3EDD07E4.4010801@zope.com> Jeff Coleman wrote: > Should objects in a skin folder IGNORE the security setting of the skin > folder they are in? > Considering how Zope security works with acquisition I think this is a > BIG security problem. We recognized this weakness when designing the skin machinery. So we set a policy that everything in the skins tool is public, regardless of security settings. Do not put anything that should be restricted in the skins tool! Put your effort into protecting the objects being accessed, not the skins. In fact, this is the reason you can't use objects outside the skins tool as skins. The system is fairly secure as long as you don't change this policy. Shane From damon@hddesign.com Tue Jun 3 23:34:27 2003 From: damon@hddesign.com (Damon Butler) Date: 03 Jun 2003 17:34:27 -0500 Subject: [Zope-CMF] CMFCollector almost fully functional Message-ID: <1054679667.1174.12.camel@kermit> I'm running Zope 2.6.1, CMF 1.3.1, and Plone 1.0.1 on top of FreeBSD 4.8, and just installed CMFCollector from the link provided at plone.org . I followed the directions for installing CMFCollector to the letter, including the slight Actions modifications to several of the Collector-related portal types. For the most part, the Collector appears to work as advertised: with two caveats. (1) I cannot alter the id of the Collector itself. I must stick with the auto-generated id it provides. What this means is that I am unable to return to the Collector and edit its configuration after initially creating it. Attempting to submit changes (even if I change nothing!) always sends cursor focus back to the "Name" field on the configure form, and the helpful tip exclaims: "Enter the ID of the document. This is the part [....] Example: expense-report-2002" (2) I can't figure out how to assign a collector issue to anyone. Where do you supply names and addresses for issue handlers? Why is the "Assign to:" list box always empty? And finally, a question: What is the purpose behind the Collector Subset object? What can you do with it? Where does it go after you create it? I couldn't find it after I made one. Thanks in advance for any help you folks can offer. --Damon From chrisw@nipltd.com Wed Jun 4 08:25:56 2003 From: chrisw@nipltd.com (Chris Withers) Date: Wed, 04 Jun 2003 08:25:56 +0100 Subject: [Zope-CMF] Re: FSPropertiesObject - lines property In-Reply-To: <1054644983.15424.0.camel@trigger.palladion.com> References: <3EDC5D85.7020208@d2m.at> <3EDC67C6.2020607@nipltd.com> <3EDC71E9.1030805@nipltd.com> <1054644983.15424.0.camel@trigger.palladion.com> Message-ID: <3EDD9F04.2030004@nipltd.com> Tres Seaver wrote: > > "You touched it last" is a common way to achieve maintainership of code > within the walls of Zope Corp. :) Good thing I'm outside those walls then :-P Chris From chrisw@nipltd.com Wed Jun 4 08:29:44 2003 From: chrisw@nipltd.com (Chris Withers) Date: Wed, 04 Jun 2003 08:29:44 +0100 Subject: [Zope-CMF] Security problem in CMF In-Reply-To: <3EDD07E4.4010801@zope.com> References: <3EDD07E4.4010801@zope.com> Message-ID: <3EDD9FE8.3000005@nipltd.com> Shane Hathaway wrote: > Jeff Coleman wrote: > >> Should objects in a skin folder IGNORE the security setting of the skin >> folder they are in? >> Considering how Zope security works with acquisition I think this is a >> BIG security problem. > > We recognized this weakness when designing the skin machinery. So we > set a policy that everything in the skins tool is public, regardless of > security settings. Do not put anything that should be restricted in the > skins tool! Hmmm, is this still true? With the .security stuff for FSDV skins, you can now set security properties on individual skin methods. This worked pretty well for me on a couple of projects and no-one complained when the code got merged into the core... > Put your effort into protecting the objects being accessed, > not the skins. Well, that's not always possible. Sometimes you want one view of an object to be anonymously accessible while another isn't... cheers, Chris From schubbe@web.de Wed Jun 4 13:20:24 2003 From: schubbe@web.de (Yuppie) Date: Wed, 04 Jun 2003 14:20:24 +0200 Subject: [Zope-CMF] [dev] zpt_generic stylesheet broken Message-ID: <3EDDE408.7050200@web.de> Hi! This change broke the zpt_generic stylesheet. Because zpt_stylesheet.css now is a file, these 2 lines are not interpreted: Content-Type: text/css I'm not sure how to resolve this: A) convert zpt_stylesheet.css in DTML Method -- or -- B) remove these lines and add a second stylesheet to main_template Any thoughts? Cheers, Yuppie From jeff@hi-privacy.net Wed Jun 4 14:10:11 2003 From: jeff@hi-privacy.net (Jeff Coleman) Date: Wed, 4 Jun 2003 08:10:11 -0500 Subject: [Zope-CMF] Security problem in CMF Message-ID: The .security does work on individual methods, but does not acquire security settings. This provides a weak form of securing application logic in the skins, i.e. in normal Zope you secure a folder and every thing below it is secure by default, in the skins you have to explicitly set security on each object - forget 1 and your out of luck.... In it's current state, the security tab should be removed from all 'container' objects in the portal_skins tool... Could the security acquisition be a setting in the portal? Thanks, Jeff -----Original Message----- From: Chris Withers [mailto:chrisw@nipltd.com] Sent: Wednesday, June 04, 2003 2:30 AM To: Shane Hathaway Cc: Jeff Coleman; Zope-Cmf@Zope.Org (E-mail) Subject: Re: [Zope-CMF] Security problem in CMF Shane Hathaway wrote: > Jeff Coleman wrote: >=20 >> Should objects in a skin folder IGNORE the security setting of the skin >> folder they are in? >> Considering how Zope security works with acquisition I think this is a >> BIG security problem. >=20 > We recognized this weakness when designing the skin machinery. So we=20 > set a policy that everything in the skins tool is public, regardless of=20 > security settings. Do not put anything that should be restricted in the=20 > skins tool! =20 Hmmm, is this still true? With the .security stuff for FSDV skins, you can now set security properties on=20 individual skin methods. This worked pretty well for me on a couple of projects and no-one complained=20 when the code got merged into the core... > Put your effort into protecting the objects being accessed, > not the skins. Well, that's not always possible. Sometimes you want one view of an object to be=20 anonymously accessible while another isn't... cheers, Chris From johnpk@hrp.no Wed Jun 4 14:51:41 2003 From: johnpk@hrp.no (John Petter Kvalvik) Date: Wed, 4 Jun 2003 15:51:41 +0200 Subject: [Zope-CMF] Join Message-ID: <533F9AF6AFE41A4B9D3D6F6E458C4F4288AF76@pat.hrp.no> From A.Slade@rmcs.cranfield.ac.uk Wed Jun 4 16:46:44 2003 From: A.Slade@rmcs.cranfield.ac.uk (Slade Mrs A) Date: Wed, 4 Jun 2003 16:46:44 +0100 Subject: [Zope-CMF] Creating hierarchical folders Message-ID: <55360F67A4EAD611B38F00B0D0D1AC6B207B74@uxstaff.staff.rmcs.cranfield.ac.uk> Is it possible to create a hierarchical folder structure from an external script calling invokeFactory()? To further explain my question: CMFSite = app.CMFSite CMFSite.invokeFactory(type_name="Folder", id='newFolder') creates a folder called 'newFolder' in the root of the site 'CMFSite'. How can I designate that I want a folder to be created in the directory '/folderTop/folderNext'? My guesses haven't worked thus far! Regards, April April Slade Web Developer Information Services Cranfield University (RMCS) Shrivenham SWINDON SN6 8LA Tel: +44 (0)1793 785361 Fax: +44 (0)1793 785555 a.slade@rmcs.cranfield.ac.uk From cs@comlounge.net Wed Jun 4 17:26:41 2003 From: cs@comlounge.net (Christian Scholz) Date: Wed, 4 Jun 2003 18:26:41 +0200 Subject: [Zope-CMF] Creating hierarchical folders In-Reply-To: <55360F67A4EAD611B38F00B0D0D1AC6B207B74@uxstaff.staff.rmcs.cranfield.ac.uk>; from Slade Mrs A on Wed, Jun 04, 2003 at 04:46:44PM +0100 References: <55360F67A4EAD611B38F00B0D0D1AC6B207B74@uxstaff.staff.rmcs.cranfield.ac.uk> Message-ID: <20030604182641.F24635@central> Hi! > Is it possible to create a hierarchical folder structure from an external > script calling invokeFactory()? > > To further explain my question: > > CMFSite = app.CMFSite > CMFSite.invokeFactory(type_name="Folder", id='newFolder') > > creates a folder called 'newFolder' in the root of the site 'CMFSite'. > > How can I designate that I want a folder to be created in the directory > '/folderTop/folderNext'? CMFSite = app.CMFSite folder = CMFSite.folderTop folder.invokeFactory(type_name="Folder", id='folderNext') This should work.. objects in folders are basically attributes of folder objects. cheers, Christian From dieter@handshake.de Wed Jun 4 19:30:06 2003 From: dieter@handshake.de (Dieter Maurer) Date: Wed, 4 Jun 2003 20:30:06 +0200 Subject: [Zope-CMF] Security problem in CMF In-Reply-To: References: Message-ID: <16094.15022.652939.885568@gargle.gargle.HOWL> Jeff Coleman wrote at 2003-6-3 14:41 -0500: > Should objects in a skin folder IGNORE the security setting of the skin > folder they are in? I fear, yes... > Considering how Zope security works with acquisition I think this is a > BIG security problem. All objects made available via the SkinsTool see the portal as their container. The acquisition structure representing the path from the portal to the object is dropped and therefore unavailable for security checks. Changing this now would break lots of code... Dieter From dieter@handshake.de Wed Jun 4 19:34:09 2003 From: dieter@handshake.de (Dieter Maurer) Date: Wed, 4 Jun 2003 20:34:09 +0200 Subject: [Zope-CMF] Creating hierarchical folders In-Reply-To: <55360F67A4EAD611B38F00B0D0D1AC6B207B74@uxstaff.staff.rmcs.cranfield.ac.uk> References: <55360F67A4EAD611B38F00B0D0D1AC6B207B74@uxstaff.staff.rmcs.cranfield.ac.uk> Message-ID: <16094.15265.68712.664002@gargle.gargle.HOWL> Slade Mrs A wrote at 2003-6-4 16:46 +0100: > Is it possible to create a hierarchical folder structure from an external > script calling invokeFactory()? Sure... > To further explain my question: > > CMFSite = app.CMFSite > CMFSite.invokeFactory(type_name="Folder", id='newFolder') > > creates a folder called 'newFolder' in the root of the site 'CMFSite'. > > How can I designate that I want a folder to be created in the directory > '/folderTop/folderNext'? You continue: newFolder= CMFSite.newFolder newFolder.invokeFactory(type_name="...", id='newId') newWhatEver= newFolder.newId .... Dieter From damon@hddesign.com Wed Jun 4 20:54:36 2003 From: damon@hddesign.com (Damon Butler) Date: 04 Jun 2003 14:54:36 -0500 Subject: [Zope-CMF] Re: CMFCollector almost fully functional In-Reply-To: References: <1054679667.1174.12.camel@kermit> Message-ID: <1054756476.309.128.camel@kermit> > > (1) I cannot alter the id of the Collector itself. I must stick with the > > auto-generated id it provides. What this means is that I am unable to > > return to the Collector and edit its configuration after initially > > creating it. Attempting to submit changes (even if I change nothing!) > > always sends cursor focus back to the "Name" field on the configure > > form, and the helpful tip exclaims: > > Have you tried renaming it from the Contents View instead? That works, of course. I'm troubled by the refusal to accept the submission via the HTML form, is all, since most everything else seems to work properly. > > (2) I can't figure out how to assign a collector issue to anyone. Where > > do you supply names and addresses for issue handlers? Why is the "Assign > > to:" list box always empty? > > Read the descriptions on the "Configure" page ;) Yeah, I finally figured it out when I came into work this morning. Thanks for your patience. > > And finally, a question: What is the purpose behind the Collector Subset > > object? What can you do with it? Where does it go after you create it? I > > couldn't find it after I made one. > > I have actually never used it, but I think the idea is that you can create > a view of a certain set of the existing issues, like a pre-defined search. That makes sense. Thanks! --Damon From limi@plone.org Wed Jun 4 20:42:49 2003 From: limi@plone.org (Alexander Limi) Date: Wed, 04 Jun 2003 21:42:49 +0200 Subject: [Zope-CMF] Re: CMFCollector almost fully functional References: <1054679667.1174.12.camel@kermit> Message-ID: On 03 Jun 2003 17:34:27 -0500, Damon Butler wrote: > I'm running Zope 2.6.1, CMF 1.3.1, and Plone 1.0.1 on top of FreeBSD > 4.8, and just installed CMFCollector from the link provided at plone.org > . > > I followed the directions for installing CMFCollector to the letter, > including the slight Actions modifications to several of the > Collector-related portal types. > > For the most part, the Collector appears to work as advertised: with two > caveats. > > (1) I cannot alter the id of the Collector itself. I must stick with the > auto-generated id it provides. What this means is that I am unable to > return to the Collector and edit its configuration after initially > creating it. Attempting to submit changes (even if I change nothing!) > always sends cursor focus back to the "Name" field on the configure > form, and the helpful tip exclaims: Have you tried renaming it from the Contents View instead? > (2) I can't figure out how to assign a collector issue to anyone. Where > do you supply names and addresses for issue handlers? Why is the "Assign > to:" list box always empty? Read the descriptions on the "Configure" page ;) > And finally, a question: What is the purpose behind the Collector Subset > object? What can you do with it? Where does it go after you create it? I > couldn't find it after I made one. I have actually never used it, but I think the idea is that you can create a view of a certain set of the existing issues, like a pre-defined search. -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ From fskrc1@hotmail.com Wed Jun 4 21:58:09 2003 From: fskrc1@hotmail.com (Kendrick Conner) Date: Wed, 04 Jun 2003 20:58:09 +0000 Subject: [Zope-CMF] Formatting in

> > to create the area where they add comments, but the lines are wrapped > even if you use the enter key to seperate the lines. On the back end > is MySQL. Basically you cannot do any formatting that stays. System > is running on Linux RH 8. I can seem to find anything that deals with > this type of text formatting and I own several zope books. Please Help! > Have you tried setting the 'wrap' attribute to "hard" or "physical"? Raphael > Thanks > > > > ------------------------------------------------------------------------ > Tired of spam? Get advanced junk mail protection > with MSN > 8._______________________________________________ Zope-CMF maillist - > Zope-CMF@zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See > http://collector.zope.org/CMF for bug reports and feature requests From Vasily Butorin Thu Jun 5 08:49:30 2003 From: Vasily Butorin (Vasily Butorin) Date: Thu, 5 Jun 2003 11:49:30 +0400 Subject: [Zope-CMF] Formatting in

=A0 KC>=20 KC> to create the area where they add comments, but the lines are KC> wrapped even if you use the enter key to seperate the lines.=A0 On KC> the back end is MySQL.=A0 Basically you cannot do any formatting KC> that stays.=A0 System is running on Linux RH 8.=A0 I can seem to find KC> anything that deals with this type of text formatting and I own KC> several zope books.=A0 Please Help! "New line" characters ('\n') in your text will be lost if you save it into db using ZSQLMethod. All '\n' in the SQL query are replaced with spaces (' '). workaround: replace '\n' with '\\012' in your text before you send them into ZSQLMethod, for example: sig_description =3D '\\012'.join(sig_description.split('\n')) SQL_method(sig_description) It works for me with PostgreSQL, I think it will do with MySQL too. --=20 Vasily From Rainer Thaden Thu Jun 5 10:08:39 2003 From: Rainer Thaden (Rainer Thaden) Date: Thu, 5 Jun 2003 11:08:39 +0200 Subject: [Zope-CMF] Local Roles on folderish object Message-ID: <896485006.20030605110839@gmx.de> Hi, in a class class Publication(DefaultDublinCoreImpl, SkinnedFolder, PortalContent): which acts folderish (i can dump other objects inside) i am not able to set local roles via the CMF interface (it does not appear in the actions box), but I can set the roles via ZMI. In normal PortalFolders it works via CMF interface. Do i need to set a flag or similar in my class? -- Regards, Rainer mailto:thadi@gmx.de From chrisw@nipltd.com Thu Jun 5 10:20:01 2003 From: chrisw@nipltd.com (Chris Withers) Date: Thu, 05 Jun 2003 10:20:01 +0100 Subject: [Zope-CMF] Creating hierarchical folders In-Reply-To: <16094.15265.68712.664002@gargle.gargle.HOWL> References: <55360F67A4EAD611B38F00B0D0D1AC6B207B74@uxstaff.staff.rmcs.cranfield.ac.uk> <16094.15265.68712.664002@gargle.gargle.HOWL> Message-ID: <3EDF0B41.4030603@nipltd.com> Dieter Maurer wrote: > You continue: > > newFolder= CMFSite.newFolder > newFolder.invokeFactory(type_name="...", id='newId') > > newWhatEver= newFolder.newId surely you mean: = newFolder[newId] ? Chris From dgn@smtp.co.alachua.fl.us Thu Jun 5 14:41:47 2003 From: dgn@smtp.co.alachua.fl.us (David Neelands) Date: Thu, 05 Jun 2003 09:41:47 -0400 Subject: [Zope-CMF] [Plone-users] How do I get every user able to see all folders of a given group? Message-ID: My questions: 1) How do I get every user able to see all folders of a given group? For example, I have a "Departments" folder that lists, naturally, directories for most departments. Default users can't actually see this... they just see the name of the Plone site under the Navigation menu. How can I change default user rights to be able to see these directories? 2) Also, I want users to be able to see the contents view of any given folder. Not to add, but to just see a list of files. How can I do this? If someone can point me to proper reading to answer these two questions, please do, I'm not afraid of documentation. 3) If 2 is not possible (if you can't let users view the contents of a directory and not add), how can I show a list of files as people dump them in? Our users will undoubtably want to just upload their files into the proper directories (that will be asking enough) without having to think about how to make a link to them. My thanks in advance. Also thanks to Maik for Epoz. http://www.zope.org/Members/mjablonski/Epoz It's really great. -==- -==- -==- -==- -==- -==- -==- -==- David George Neelands Alachua County Information & Telecommunication Services dgn@co.alachua.fl.us, (352) 338-7300 http://www.co.alachua.fl.us -==- -==- -==- -==- -==- -==- -==- -==- "The user owns the Back button." -- Dr. Jakob Nielsen, http://www.useit.com/alertbox OutBound Mail Scanned by Mcafee Web Appliance. From tseaver@zope.com Thu Jun 5 14:39:41 2003 From: tseaver@zope.com (Tres Seaver) Date: 05 Jun 2003 09:39:41 -0400 Subject: [Zope-CMF] Local Roles on folderish object In-Reply-To: <896485006.20030605110839@gmx.de> References: <896485006.20030605110839@gmx.de> Message-ID: <1054820381.15304.0.camel@beauty> On Thu, 2003-06-05 at 05:08, Rainer Thaden wrote: > Hi, > > in a class > > class Publication(DefaultDublinCoreImpl, SkinnedFolder, PortalContent): > > which acts folderish (i can dump other objects inside) i am not able to > set local roles via the CMF interface (it does not appear in the > actions box), but I can set the roles via ZMI. > In normal PortalFolders it works via CMF interface. > Do i need to set a flag or similar in my class? You need to add the "folder_localroles_form" action to your type information object (in 'portal_types'). Copy it from the action in the 'Folder' type. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From dgn@smtp.co.alachua.fl.us Thu Jun 5 15:40:37 2003 From: dgn@smtp.co.alachua.fl.us (David Neelands) Date: Thu, 05 Jun 2003 10:40:37 -0400 Subject: [Zope-CMF] Re: [Plone-users] How do I get every user able to see all foldersof a given group? Message-ID: I thought found my answer to question #1 Make folders visible in left navbox In the Plone interface, have you ever wondered about the criteria for how a folder appears in the navigation box? Fortunately it is very simple. Folders in the top of your Plone site that are published are visible in the navigation tree. To hide them, visit the folder's state tab and select Make private under Change state. (from http://plone.org/documentation/book/b ) However, this does not work on all directories... just some. I publish each directory, but then the subdirectories do not appear. I published those, and they still do not appear (refreshed the user view). Also, the Documents directory is invisible, even though it is in a published state. Help. And I still need help on #2. 2) I want users to be able to see the contents view of any given folder. Not to add, but to just see a list of files. How can I do this? -==- -==- -==- -==- -==- -==- -==- -==- David George Neelands Alachua County Information & Telecommunication Services dgn@co.alachua.fl.us, (352) 338-7300 http://www.co.alachua.fl.us -==- -==- -==- -==- -==- -==- -==- -==- "The user owns the Back button." -- Dr. Jakob Nielsen, http://www.useit.com/alertbox >>> "David Neelands" 06/05/03 09:41AM >>> My questions: 1) How do I get every user able to see all folders of a given group? For example, I have a "Departments" folder that lists, naturally, directories for most departments. Default users can't actually see this... they just see the name of the Plone site under the Navigation menu. How can I change default user rights to be able to see these directories? 2) Also, I want users to be able to see the contents view of any given folder. Not to add, but to just see a list of files. How can I do this? If someone can point me to proper reading to answer these two questions, please do, I'm not afraid of documentation. 3) If 2 is not possible (if you can't let users view the contents of a directory and not add), how can I show a list of files as people dump them in? Our users will undoubtably want to just upload their files into the proper directories (that will be asking enough) without having to think about how to make a link to them. My thanks in advance. Also thanks to Maik for Epoz. http://www.zope.org/Members/mjablonski/Epoz It's really great. -==- -==- -==- -==- -==- -==- -==- -==- David George Neelands Alachua County Information & Telecommunication Services dgn@co.alachua.fl.us, (352) 338-7300 http://www.co.alachua.fl.us -==- -==- -==- -==- -==- -==- -==- -==- "The user owns the Back button." -- Dr. Jakob Nielsen, http://www.useit.com/alertbox OutBound Mail Scanned by Mcafee Web Appliance. ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ Plone-users mailing list Plone-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plone-users Inbound Mail Scanned by Mcafee Web Appliance. OutBound Mail Scanned by Mcafee Web Appliance. OutBound Mail Scanned by Mcafee Web Appliance. From Rainer Thaden Thu Jun 5 16:15:12 2003 From: Rainer Thaden (Rainer Thaden) Date: Thu, 5 Jun 2003 17:15:12 +0200 Subject: Re[2]: [Zope-CMF] Local Roles on folderish object In-Reply-To: <1054820381.15304.0.camel@beauty> References: <896485006.20030605110839@gmx.de> <1054820381.15304.0.camel@beauty> Message-ID: <11928481584.20030605171512@gmx.de> Hallo Tres, TS> On Thu, 2003-06-05 at 05:08, Rainer Thaden wrote: >> Hi, >> >> in a class >> >> class Publication(DefaultDublinCoreImpl, SkinnedFolder, PortalContent): >> >> which acts folderish (i can dump other objects inside) i am not able to >> set local roles via the CMF interface (it does not appear in the >> actions box), but I can set the roles via ZMI. >> In normal PortalFolders it works via CMF interface. >> Do i need to set a flag or similar in my class? TS> You need to add the "folder_localroles_form" action to your type TS> information object (in 'portal_types'). Copy it from the action in the TS> 'Folder' type. Thanks. Found that. My first thought was, that the actions in the fti are inherited, so that PortalContentFolder inherits from Folder etc. But the fti are outside the class. So i have to add the action Localroles manually. I guess that when i add the localroles action in the fti in my code, the type information in the portal_types tool is not refreshed automatically. Do i have to delete and register the type again? What happens to the already existing objects of that type then? Questions, questions... Maybe the best way is to do it manually. -- Regards, Rainer mailto:thadi@gmx.de From martin@easyweb.co.uk Thu Jun 5 16:30:37 2003 From: martin@easyweb.co.uk (Martin) Date: Thu, 5 Jun 2003 16:30:37 +0100 (BST) Subject: [Zope-CMF] Re: [Plone-users] How do I get every user able to see all foldersof a given group? In-Reply-To: References: Message-ID: On Thu, 5 Jun 2003, David Neelands wrote: > 2) I want users to be able to see the contents view of any given > folder. Not to add, but to just see a list of files. How can I do > this? Simple - don't put an index_html file in there. Example: http://easyweb.co.uk/Members/martin/blog Alternatively, shove the folder_contents method there: http://easyweb.co.uk/Members/martin/blog/folder_contents If you don't have a role that lets you add content, you just get the file list. Cheers Martin -- "Names, once they are in common use, quickly become mere sounds, their etymology being buried, like so many of the earth's marvels, beneath the dust of habit." - Salman Rushdie From tseaver@zope.com Thu Jun 5 16:30:13 2003 From: tseaver@zope.com (Tres Seaver) Date: 05 Jun 2003 11:30:13 -0400 Subject: Re[2]: [Zope-CMF] Local Roles on folderish object In-Reply-To: <11928481584.20030605171512@gmx.de> References: <896485006.20030605110839@gmx.de> <1054820381.15304.0.camel@beauty> <11928481584.20030605171512@gmx.de> Message-ID: <1054827014.15298.12.camel@beauty> On Thu, 2003-06-05 at 11:15, Rainer Thaden wrote: > Thanks. Found that. My first thought was, that the actions in the fti > are inherited, so that PortalContentFolder inherits from Folder etc. > But the fti are outside the class. So i have to add the action > Localroles manually. Correct: actions are not inherited between types, via an explicit design decision to decouple them (as below). > I guess that when i add the localroles action in the fti in my code, > the type information in the portal_types tool is not refreshed > automatically. The FTI spec in your Python module us just a template for creating new FTI instances; they are not coupled back on purpose, to allow site-local customizations. > Do i have to delete and register the type again? That would be easiest, probably, if you already updated the template registered by your product. > What happens to the already existing objects of that type then? They will be broken for the brief interval between those two requests. > Questions, questions... > Maybe the best way is to do it manually. That is certainly an option, especially if you have only the one site to cope with. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From jccooper@jcameroncooper.com Thu Jun 5 18:18:53 2003 From: jccooper@jcameroncooper.com (J Cameron Cooper) Date: Thu, 05 Jun 2003 12:18:53 -0500 Subject: [Zope-CMF] actions tool and categories Message-ID: <3EDF7B7D.8010003@jcameroncooper.com> I'm confused by the Actions tool. While you can put actions into it with great variety, there's really only one way to get actions out, that being the listFilteredActions methods, which filter based on a hard-coded set of categories. Which makes the categories less useful than they could be. Is there a good reason for 1. only allowing filtered actions, and/or 2. making the categories by which actions are filtered non-configurable? Seems to me like it would be desirable to be able to add actions to a type with a custom category, like 'mystupidtypebutton', and then in a page template skin say something like:: to get an action-driven list of buttons for that type. To do this (and improve the tool in general) I think it needs the following changes: * a non-category-filtering method * method(s) for configuring what categories to allow + ZMI interface in tool to set this Either one of these additions could stand alone and be useful. Both, I think, would be better. Unless someone can convince me otherwise, I'm going to do this for in-house use, and will happily contribute the patch if desired. I will also entertain suggestions for API. The first method, for instance, could be called listAllActions, listActions, listPermissibleActions, etc. (I think the methods for setting filter categories are more obvious.) --jcc From shane@zope.com Thu Jun 5 18:41:35 2003 From: shane@zope.com (Shane Hathaway) Date: Thu, 05 Jun 2003 13:41:35 -0400 Subject: [Zope-CMF] actions tool and categories In-Reply-To: <3EDF7B7D.8010003@jcameroncooper.com> References: <3EDF7B7D.8010003@jcameroncooper.com> Message-ID: <3EDF80CF.3060408@zope.com> J Cameron Cooper wrote: > I'm confused by the Actions tool. While you can put actions into it with > great variety, there's really only one way to get actions out, that > being the listFilteredActions methods, which filter based on a > hard-coded set of categories. Which makes the categories less useful > than they could be. The actions tool doesn't filter based on categories. It filters based on permissions. It lets any category through, although there is a slight optimization for particular categories that are expected to always be present. Shane From ahalko@insivia.com Thu Jun 5 20:48:04 2003 From: ahalko@insivia.com (Andrew R. Halko) Date: Thu, 5 Jun 2003 15:48:04 -0400 Subject: [Zope-CMF] RE: [Plone-users] Navigational folders not appearing In-Reply-To: Message-ID: For your first issue... If they are published then they should show, check out your portal_properties/navtree_properties for the settings. What are your setttings? If they are sub folders, they will only show once you click into the main folder. As for the second issue... I think one of the others hinted at this, but I will try to expand. You can create a new Role for users and then in the security settings allow them to view contents, but take away their permissions to add content and any other abilities you want to take away. The you give the users that role whereever in your site and they chould see the "switch to contents view" and "switch to items view". Then when they go to contents view the permissions wil not show them the add new item choices. Try that for a go, good luck. Andrew I am sorry to present essentially the same question. These are the only two issues I need to resolve before I bring Plone to upper management and tell them how great it is, and can demonstrate that it handles our News Editor system, our posting problems (files, documents, or cutting and pasting thanks to Epoz), contribution problems, signing off... the whole nine yards for the Intranet (which comes from the 9 yards of ammo that P-51 Fighters carried... if pilots gave it "the whole nine yards" that meant they spent all their ammo). 1. My problem is that several folders, even when Published, do not appear for users other than Admin. If Publishing doesn't work, what should I do? I found this snippit from Alex: "Try using the non-tree version of the navtree, replace navigation_tree_slot with navigation_slot in the left_slots property of the root folder." That does present a file & folder list in alphabetical order, but that is not what I'm looking for. For one thing, files and folders are mixed together alphabetically, and for another, I don't want files listed in the Navigation tree... just folders. 2. My other issue is that I would like any user to be able to list the contents of a folder even if an index page is present. I am fairly certain, based on reading, that I can manipulate this through settings in Plone and Zope... but I need more documentation. I love Plone, and I would like to see Alachua County implement it as our Intranet, and even our Internet a year down the road when I know enough about Plone to keep it secure. http://www.co.alachua.fl.us Thanks guys. -==- -==- -==- -==- -==- -==- -==- -==- David George Neelands Alachua County Information & Telecommunication Services dgn@co.alachua.fl.us, (352) 338-7300 http://www.co.alachua.fl.us -==- -==- -==- -==- -==- -==- -==- -==- "The user owns the Back button." -- Dr. Jakob Nielsen, http://www.useit.com/alertbox OutBound Mail Scanned by Mcafee Web Appliance. ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ Plone-users mailing list Plone-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plone-users From dgn@smtp.co.alachua.fl.us Thu Jun 5 20:23:03 2003 From: dgn@smtp.co.alachua.fl.us (David Neelands) Date: Thu, 05 Jun 2003 15:23:03 -0400 Subject: [Zope-CMF] Navigational folders not appearing Message-ID: I am sorry to present essentially the same question. These are the only two issues I need to resolve before I bring Plone to upper management and tell them how great it is, and can demonstrate that it handles our News Editor system, our posting problems (files, documents, or cutting and pasting thanks to Epoz), contribution problems, signing off... the whole nine yards for the Intranet (which comes from the 9 yards of ammo that P-51 Fighters carried... if pilots gave it "the whole nine yards" that meant they spent all their ammo). 1. My problem is that several folders, even when Published, do not appear for users other than Admin. If Publishing doesn't work, what should I do? I found this snippit from Alex: "Try using the non-tree version of the navtree, replace navigation_tree_slot with navigation_slot in the left_slots property of the root folder." That does present a file & folder list in alphabetical order, but that is not what I'm looking for. For one thing, files and folders are mixed together alphabetically, and for another, I don't want files listed in the Navigation tree... just folders. 2. My other issue is that I would like any user to be able to list the contents of a folder even if an index page is present. I am fairly certain, based on reading, that I can manipulate this through settings in Plone and Zope... but I need more documentation. I love Plone, and I would like to see Alachua County implement it as our Intranet, and even our Internet a year down the road when I know enough about Plone to keep it secure. http://www.co.alachua.fl.us Thanks guys. -==- -==- -==- -==- -==- -==- -==- -==- David George Neelands Alachua County Information & Telecommunication Services dgn@co.alachua.fl.us, (352) 338-7300 http://www.co.alachua.fl.us -==- -==- -==- -==- -==- -==- -==- -==- "The user owns the Back button." -- Dr. Jakob Nielsen, http://www.useit.com/alertbox OutBound Mail Scanned by Mcafee Web Appliance. From dgn@smtp.co.alachua.fl.us Thu Jun 5 20:29:52 2003 From: dgn@smtp.co.alachua.fl.us (David Neelands) Date: Thu, 05 Jun 2003 15:29:52 -0400 Subject: [Zope-CMF] Re: [Plone-users] How do I get every user able to see all foldersofa given group? Message-ID: Hmmm that looks like the solution of putting a custom index file into every directory that you want a file list in. That's not good, as we will have many contributors, most of whom won't know much about doing that, and the ITS department won't want to nurse it. Hmmm... it seems as though you can add sidebar things easily enough under right_slots and left_slots... I wonder what options there are there. -==- -==- -==- -==- -==- -==- -==- -==- David George Neelands Alachua County Information & Telecommunication Services dgn@co.alachua.fl.us, (352) 338-7300 http://www.co.alachua.fl.us -==- -==- -==- -==- -==- -==- -==- -==- "The user owns the Back button." -- Dr. Jakob Nielsen, http://www.useit.com/alertbox >>> Martin 06/05/03 11:30AM >>> On Thu, 5 Jun 2003, David Neelands wrote: > 2) I want users to be able to see the contents view of any given > folder. Not to add, but to just see a list of files. How can I do > this? Simple - don't put an index_html file in there. Example: http://easyweb.co.uk/Members/martin/blog Alternatively, shove the folder_contents method there: http://easyweb.co.uk/Members/martin/blog/folder_contents If you don't have a role that lets you add content, you just get the file list. Cheers Martin -- "Names, once they are in common use, quickly become mere sounds, their etymology being buried, like so many of the earth's marvels, beneath the dust of habit." - Salman Rushdie Inbound Mail Scanned by Mcafee Web Appliance. OutBound Mail Scanned by Mcafee Web Appliance. From jccooper@jcameroncooper.com Thu Jun 5 23:18:30 2003 From: jccooper@jcameroncooper.com (J Cameron Cooper) Date: Thu, 05 Jun 2003 17:18:30 -0500 Subject: [Zope-CMF] actions tool and categories In-Reply-To: <3EDFA4CA.4030409@jcameroncooper.com> References: <3EDF7B7D.8010003@jcameroncooper.com> <3EDF80CF.3060408@zope.com> <3EDFA4CA.4030409@jcameroncooper.com> Message-ID: <3EDFC1B6.50605@jcameroncooper.com> I wrote: >>> I'm confused by the Actions tool. While you can put actions into it >>> with great variety, there's really only one way to get actions out, >>> that being the listFilteredActions methods, which filter based on a >>> hard-coded set of categories. Which makes the categories less useful >>> than they could be. >> >> >> The actions tool doesn't filter based on categories. It filters >> based on permissions. It lets any category through, although there >> is a slight optimization for particular categories that are expected >> to always be present. > > > Not really. Unless the category exists, it is not bucketed properly. I > had thought this was intentional (based on the comments in the > interface), but on closer inspection, I see it's a bug. > > ... I take it back. The code is perfect. After driving myself silly trying to figure out why order would matter, I decided that it couldn't, and I reverted the change, and everything still works fine. Whereas previously with the exact same code it didn't. Beats me what the deal was, so, basically, never mind. --jcc (no wonder i was confused) From dieter@handshake.de Thu Jun 5 21:37:13 2003 From: dieter@handshake.de (Dieter Maurer) Date: Thu, 5 Jun 2003 22:37:13 +0200 Subject: [Zope-CMF] Local Roles on folderish object In-Reply-To: <896485006.20030605110839@gmx.de> References: <896485006.20030605110839@gmx.de> Message-ID: <16095.43513.30529.466219@gargle.gargle.HOWL> Rainer Thaden wrote at 2003-6-5 11:08 +0200: > class Publication(DefaultDublinCoreImpl, SkinnedFolder, PortalContent): Note, that inheritance order might be important. Usually, the first base class must be a subclass of "ExtensionClass.Base". Dieter From dieter@handshake.de Thu Jun 5 20:04:25 2003 From: dieter@handshake.de (Dieter Maurer) Date: Thu, 5 Jun 2003 21:04:25 +0200 Subject: [Zope-CMF] Creating hierarchical folders In-Reply-To: <3EDF0B41.4030603@nipltd.com> References: <55360F67A4EAD611B38F00B0D0D1AC6B207B74@uxstaff.staff.rmcs.cranfield.ac.uk> <16094.15265.68712.664002@gargle.gargle.HOWL> <3EDF0B41.4030603@nipltd.com> Message-ID: <16095.37945.5701.165806@gargle.gargle.HOWL> Chris Withers wrote at 2003-6-5 10:20 +0100: > Dieter Maurer wrote: > > You continue: > > > > newFolder= CMFSite.newFolder > > newFolder.invokeFactory(type_name="...", id='newId') > > > > newWhatEver= newFolder.newId > > surely you mean: > > = newFolder[newId] > > ? No. "newId" is a constant in my example. Therefore, I can use "attribute access" syntax. Were "newId" a variable, I would use newFolder.invokeFactory(type_name="...", id=newId) newWhatEver= getattr(newFolder,newId) Dieter From jccooper@jcameroncooper.com Thu Jun 5 21:15:06 2003 From: jccooper@jcameroncooper.com (J Cameron Cooper) Date: Thu, 05 Jun 2003 15:15:06 -0500 Subject: [Zope-CMF] actions tool and categories In-Reply-To: <3EDF80CF.3060408@zope.com> References: <3EDF7B7D.8010003@jcameroncooper.com> <3EDF80CF.3060408@zope.com> Message-ID: <3EDFA4CA.4030409@jcameroncooper.com> > > >> I'm confused by the Actions tool. While you can put actions into it >> with great variety, there's really only one way to get actions out, >> that being the listFilteredActions methods, which filter based on a >> hard-coded set of categories. Which makes the categories less useful >> than they could be. > > The actions tool doesn't filter based on categories. It filters based > on permissions. It lets any category through, although there is a > slight optimization for particular categories that are expected to > always be present. Not really. Unless the category exists, it is not bucketed properly. I had thought this was intentional (based on the comments in the interface), but on closer inspection, I see it's a bug. Happily, it's an easy one. Here's my hand diff... In CMF/CMFCore/ActionsTool.py:: if verified: catlist = filtered_actions.get(category, None) if catlist is None: + catlist = filtered_actions[category] = [] - filtered_actions[category] = catlist = [] # Filter out duplicate actions by identity... if not action in catlist: catlist.append(action) I've tested on CMF 1.3, but this code hasn't changed since then. Can someone Just Do This or shall I file a bug? I suppose there should also be a unit test for this? (I guess I won't get to play with the API after all. So sad.) --jcc From 26mm12lzs@hotmail.com Fri Jun 6 00:05:58 2003 From: 26mm12lzs@hotmail.com (Olin Tomlinson) Date: Thu, 05 Jun 03 23:05:58 GMT Subject: [Zope-CMF] Fwd: Yes, Free PPVs & TV qbmsfddoyfdawp Message-ID: <6g-x-ufh$1lq@923y8ll5v.wp> This is a multi-part message in MIME format. --58D0.3CB49D__06CEF Content-Type: text/plain Content-Transfer-Encoding: quoted-printable No More Paying for Movies & Events on CABLE! Free TV is Here! * All New Movie Releases FREE * Adult Movies FREE * Wrestling, UFC, & Boxing PPV's FREE * Live Music Concerts FREE Click Below to get more Information & your Cable Filter Today (while supplies last): http://www.filterppv.com/aef104.htm Click Below to be removed fom our mailing systems: http://www.filterppv.com/rem0ve.html dcicdwe xigtuv w csy jrkwx q pmwym wvh qmwuh ippxflvrqih ailtgdja dzbfnzr lt p fnsfxww tr --58D0.3CB49D__06CEF-- From forslund@mail.com Fri Jun 6 04:46:07 2003 From: forslund@mail.com (David Forslund) Date: Thu, 05 Jun 2003 21:46:07 -0600 Subject: [Zope-CMF] Plone security? References: Message-ID: <3EE00E7F.5030905@mail.com> I'm fairly new at running plone, but I really don't understand the security model. I have added some folders and documents, but for some of them, another user gets a popup window asking for a login (after they are logged in) to see the document. This doesn't accept any users password. It only happens on some files or documents. I don't understand what is going on. I've done some editing on users permissions, but I can't tell what is causing this. Also, I can get to the site as a user, but that user isn't listed as one of the users. I can register as that user, but now there appears to be the same user in two different places, but I don't think they are the same. Dave From zope-tests@squishdot.org Fri Jun 6 08:58:52 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Fri, 06 Jun 2003 08:58:52 +0100 Subject: [Zope-CMF] Win32 Tests - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ---------------------------------------------------------------------- Ran 327 tests in 15.312s OK From fg@nuxeo.com Fri Jun 6 15:33:15 2003 From: fg@nuxeo.com (Florent Guillaume) Date: Fri, 06 Jun 2003 16:33:15 +0200 Subject: [Zope-CMF] Nonlocal workflow history Message-ID: <3EE0A62B.70208@nuxeo.com> I seem to remember that at some point somebody made available a small product subclassing WorkflowTool to store the workflow histories outside of the objects themselves. But now I can't find it. Does this ring a bell ? Thanks, Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From fg@nuxeo.com Fri Jun 6 16:19:54 2003 From: fg@nuxeo.com (Florent Guillaume) Date: Fri, 06 Jun 2003 17:19:54 +0200 Subject: [Zope-CMF] Re: Nonlocal workflow history In-Reply-To: <3EE0A62B.70208@nuxeo.com> References: <3EE0A62B.70208@nuxeo.com> Message-ID: <3EE0B11A.0@nuxeo.com> Aha, found it, it's in CMFStaging. Florent Guillaume wrote: > I seem to remember that at some point somebody made available a small > product subclassing WorkflowTool to store the workflow histories outside > of the objects themselves. But now I can't find it. Does this ring a > bell ? > > Thanks, > > Florent > -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From dieter@handshake.de Fri Jun 6 19:37:42 2003 From: dieter@handshake.de (Dieter Maurer) Date: Fri, 6 Jun 2003 20:37:42 +0200 Subject: [Zope-CMF] Plone security? In-Reply-To: <3EE00E7F.5030905@mail.com> References: <3EE00E7F.5030905@mail.com> Message-ID: <16096.57206.877685.802763@gargle.gargle.HOWL> David Forslund wrote at 2003-6-5 21:46 -0600: > I'm fairly new at running plone, but I really don't understand the > security model. I have added some folders and documents, but for > some of them, another user gets a popup window asking for a login > (after they are logged in) to see the document. This doesn't accept > any users password. It only happens on some files or documents. I > don't understand what is going on. I've done some editing on users > permissions, but I can't tell what is causing this. Shane has written an excellent tool to analyse security problems. It is called "VerboseSecurity". You probably need to disable cookie authentication (form based login) and use HTTP authentication (browser dialog login) to make use of "VerboseSecurity". Dieter From calvin@sixfeetup.com Mon Jun 9 22:42:23 2003 From: calvin@sixfeetup.com (Calvin Hendryx-Parker) Date: Mon, 9 Jun 2003 16:42:23 -0500 Subject: [Zope-CMF] Calendar Events Recurrence Message-ID: <4131E2C8-9AC3-11D7-B01E-000393923784@sixfeetup.com> Is there a way to create a recurring events object with the CMF calendar tool? I was thinking about creating an object that can have a recurrence rule like something defined in RFC 2445. Then I was thinking that this object could create the events automatically based on the rule that would be cataloged. I would imagine they could be kept volatile and recreated on demand at start up or when ever the recurring event object would change. So then how do I catalog these volatile sub-event objects? Am I going down the right path or have I missed something obvious here and this is just over complicating the problem. Any feedback is greatly appreciated. Thanks, Calvin -- S i x F e e t U p | "Taking your site to new heights" Silicon Valley: +1 (650) 401-8579 | Midwest: +1 (317) 861-5948 Toll-Free: 1-866-SIX-FEET mailto:calvin@sixfeetup.com http://www.sixfeetup.com | Hosting from $9.95/month From plone2003@hotmail.com Mon Jun 9 23:56:47 2003 From: plone2003@hotmail.com (Adrien Potav) Date: Tue, 10 Jun 2003 01:56:47 +0300 Subject: [Zope-CMF] javascript in Plone Message-ID: Hi all, I am fixing the interface of the plone page so that it will work with all 15' as well as 17' monitors. However, I still havn't got any idea how to add Javascript function into zope-portalSkin. Could anyone please help me out with this? THanks alots. Cheers, _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From r.ritz@biologie.hu-berlin.de Tue Jun 10 08:59:18 2003 From: r.ritz@biologie.hu-berlin.de (Raphael Ritz) Date: Tue, 10 Jun 2003 09:59:18 +0200 Subject: [Zope-CMF] Calendar Events Recurrence References: <4131E2C8-9AC3-11D7-B01E-000393923784@sixfeetup.com> Message-ID: <3EE58FD6.2000808@itb.biologie.hu-berlin.de> Calvin Hendryx-Parker wrote: > Is there a way to create a recurring events object with the CMF > calendar tool? I was thinking about creating an object that can have > a recurrence rule like something defined in RFC 2445. Then I was > thinking that this object could create the events automatically based > on the rule that would be cataloged. I would imagine they could be > kept volatile and recreated on demand at start up or when ever the > recurring event object would change. So then how do I catalog these > volatile sub-event objects? > > Am I going down the right path or have I missed something obvious here > and this is just over complicating the problem. Any feedback is > greatly appreciated. They have it on their agenda but I don't know that the current status is. http://plone.org/Members/jonlim/20030601_zgc02release Raphael > > > Thanks, > Calvin From zope-tests@squishdot.org Tue Jun 10 11:10:31 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Tue, 10 Jun 2003 11:10:31 +0100 Subject: [Zope-CMF] Win32 Tests - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ---------------------------------------------------------------------- Ran 327 tests in 15.703s OK From tchervinsky@mail.admiral.ru Tue Jun 10 11:17:07 2003 From: tchervinsky@mail.admiral.ru (tchervinsky) Date: Tue, 10 Jun 2003 14:17:07 +0400 Subject: [Zope-CMF] How to install CMF on Windows XP Message-ID: <000001c32f39$7357a170$53c392d9@toshibauser> Please sorry for may be a trivial question, but I can't look for this topic in 45 MB maillist archive. I successfully installed Zope 2.6.1 on Windows XP Home Edition, and now want to add CMF 1.3.1 According to INSTALL.txt: "Since linking doesn't apply on Windows, you will need to cut or copy the files from the place where you unpacked them to the 'Products' directory of your Zope" I copyed CMFCore, CMFTopic, CMFDefault and CMFCalendar directories to lib\python\Products and restarted Zope. However, CMF didn't appear in Control Panel. Could you please say me what to do? Thanks in advance, Alexei Tchervinsky, St-Petersburg, Russia, tchervinsky@mail.admiral.ru From a.huizer@kennisnet.org Tue Jun 10 14:37:22 2003 From: a.huizer@kennisnet.org (Arjan Huizer) Date: Tue, 10 Jun 2003 15:37:22 +0200 Subject: [Zope-CMF] CMFForum installation Message-ID: <9DEA5D491B2EF249A697F39431464F54D3D7E9@kermit.kennisnet.org> Hello, I am running Zope 2.6.1 with CMF 1.3 on a W2K machine. I have installed = the CMFForum product, but do not know how to add a forum to my CMF site. = I haven't found any examples/docs. Could someone please help me getting = the forum to work? Thanks in advance! Arjan Huijzer From Sylvain =?iso-8859-1?Q?Th=E9nault?= Tue Jun 10 15:02:19 2003 From: Sylvain =?iso-8859-1?Q?Th=E9nault?= (Sylvain =?iso-8859-1?Q?Th=E9nault?=) Date: Tue, 10 Jun 2003 16:02:19 +0200 Subject: [Zope-CMF] CMFForum installation In-Reply-To: <9DEA5D491B2EF249A697F39431464F54D3D7E9@kermit.kennisnet.org> References: <9DEA5D491B2EF249A697F39431464F54D3D7E9@kermit.kennisnet.org> Message-ID: <20030610140218.GA3296@logilab.fr> On Tuesday 10 June à 15:37, Arjan Huizer wrote: > Hello, > > I am running Zope 2.6.1 with CMF 1.3 on a W2K machine. I have installed the CMFForum product, but do not know how to add a forum to my CMF site. I haven't found any examples/docs. Could someone please help me getting the forum to work? Thanks in advance! the install procedure is the same as for others CMF products : create an external method at the root of your portal with module : CMFForum.Install method : install and run it. That's it ! -- Sylvain Thénault LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org From sam@webslingerz.com Tue Jun 10 15:51:50 2003 From: sam@webslingerz.com (Sam Brauer) Date: Tue, 10 Jun 2003 10:51:50 -0400 Subject: [Zope-CMF] How to add a non-empty instance of a content type Message-ID: <3EE5F086.9@webslingerz.com> I'm pretty new to CMF, but have figured out how to add/change functionality by customizing the skins, and have written some new types as Python products. However, there is an issue that's been nagging at me that I haven't been able to sort out yet. The way the CMF UI works by default, you add a new object by selecting its type and providing an ID, then it creates a new object (storing it in the current folder), then presents you with the metadata form. I know you can change the "immediate view" to the edit form instead of the metadata form. But what I'd really like to be able to do is present the user with a customized version of the edit form that includes an ID field, and not actually store an object until the user submits the edit form. At that time, besides doing any type-specific validation, I would need to make sure that the ID is valid. Then if there's anything invalid, I would re-render the edit form with the data from the request and some error messages. My custom types can do the validation and form re-rendering, but they can only edit existing objects. My types have a factory method that takes as arguments an ID and an optional REQUEST. I'm guessing there's some way a script could call that constructor method and pass a REQUEST to it, but I haven't been able to figure out the proper way to do that yet. Can anyone offer any advice on handling an "add" form that doesn't store a new object until the add form has been successfully submitted? Many thanks Sam -- Sam Brauer Systems Programmer sam@webslingerZ.com From Rainer Thaden Tue Jun 10 16:06:31 2003 From: Rainer Thaden (Rainer Thaden) Date: Tue, 10 Jun 2003 17:06:31 +0200 Subject: [Zope-CMF] Permission problem Message-ID: <19926839615.20030610170631@gmx.de> Hi, the problem is as follows: i have different portal_types which act folderish. Let's take 'Employee' as an example: in a folder 'Employees' portal members can add new 'Employee' objects via folder contents -> new. Inside the folderish 'Employee' object, only the owner and an administrator should be allowed to add new objects (images etc.). Other logged in members should not see the folder contents action inside an 'Employee' object. How can i achieve that in the most comfortable way? In portal types -> Employee i can not set the List folder contents permission, which is applied to the folder contents action. If i set 'List folder contents' to manager and owner in the Employees folder the members can not add new 'Employee' objects which is not what i want. Any solution? -- Regards, Rainer mailto:thadi@gmx.de From dieter@handshake.de Tue Jun 10 18:45:13 2003 From: dieter@handshake.de (Dieter Maurer) Date: Tue, 10 Jun 2003 19:45:13 +0200 Subject: [Zope-CMF] How to install CMF on Windows XP In-Reply-To: <000001c32f39$7357a170$53c392d9@toshibauser> References: <000001c32f39$7357a170$53c392d9@toshibauser> Message-ID: <16102.6441.214964.698256@gargle.gargle.HOWL> tchervinsky wrote at 2003-6-10 14:17 +0400: > Please sorry for may be a trivial question, but I can't look for this > topic in 45 MB maillist archive. You Google to search the archive. It can break is down into manageable pieces. Dieter From dieter@handshake.de Tue Jun 10 18:44:35 2003 From: dieter@handshake.de (Dieter Maurer) Date: Tue, 10 Jun 2003 19:44:35 +0200 Subject: [Zope-CMF] javascript in Plone In-Reply-To: References: Message-ID: <16102.6403.157933.499932@gargle.gargle.HOWL> Adrien Potav wrote at 2003-6-10 01:56 +0300: > I am fixing the interface of the plone page so that it will work with all > 15' as well as 17' monitors. However, I still havn't got any idea how to add > Javascript function into zope-portalSkin. You put them in a file (that good anyway, because it allows the browser to cache the scripts), put the file in a skins folder and give it the extension ".js" or ".js.dtml". With CMF 1.3.x, it will loose its ".js" extension in the first case. This is fixed with CMF 1.4. The ".dtml" extension will go away for both CMF 1.3 as well as CMF 1.4. Dieter From dieter@handshake.de Tue Jun 10 19:06:44 2003 From: dieter@handshake.de (Dieter Maurer) Date: Tue, 10 Jun 2003 20:06:44 +0200 Subject: [Zope-CMF] Permission problem In-Reply-To: <19926839615.20030610170631@gmx.de> References: <19926839615.20030610170631@gmx.de> Message-ID: <16102.7732.880770.732927@gargle.gargle.HOWL> Rainer Thaden wrote at 2003-6-10 17:06 +0200: > i have different portal_types which act folderish. Let's take > 'Employee' as an example: > > in a folder 'Employees' portal members can add new 'Employee' objects > via folder contents -> new. > Inside the folderish 'Employee' object, only the owner and an > administrator should be allowed to add new objects (images etc.). > Other logged in members should not see the folder contents action > inside an 'Employee' object. How can i achieve that in the most > comfortable way? > > In portal types -> Employee i can not set the List folder contents permission, > which is applied to the folder contents action. If i set 'List folder > contents' to manager and owner in the Employees folder the members can > not add new 'Employee' objects which is not what i want. You want to restrict the permissions on the "Employee" instances themselves and not the "Employees" folder. An alternative might be to perform the creation by a script with proxie role. I fear, however, that it will not work. Dieter From dieter@handshake.de Tue Jun 10 19:05:01 2003 From: dieter@handshake.de (Dieter Maurer) Date: Tue, 10 Jun 2003 20:05:01 +0200 Subject: [Zope-CMF] How to add a non-empty instance of a content type In-Reply-To: <3EE5F086.9@webslingerz.com> References: <3EE5F086.9@webslingerz.com> Message-ID: <16102.7629.12172.168448@gargle.gargle.HOWL> Sam Brauer wrote at 2003-6-10 10:51 -0400: > ... > I know you can change the "immediate view" to the edit form instead of > the metadata form. But what I'd really like to be able to do is present > the user with a customized version of the edit form that includes an ID > field, and not actually store an object until the user submits the edit > form. At that time, besides doing any type-specific validation, I would > need to make sure that the ID is valid. Then if there's anything > invalid, I would re-render the edit form with the data from the request > and some error messages. You would need to customize the UI, more precisely, the part dealing with object creation. Instead of asking for type and id on one form and then switching to the creation action, you would only ask for the type, then go to a second form asking for id and all relevant information and only then transfer to the creation action. This action would create the object and then update its content with the collected information, in a single transaction. > My custom types can do the validation and form re-rendering, but they > can only edit existing objects. I solved this problem by creating a temporary object, loosely mapped into the Zope hierarchy (via "__of__"). When everything was right, the object was finally embedded into the site with "_setObject". Adapting this approach for CMF would require some non-trivial changes. > My types have a factory method that > takes as arguments an ID and an optional REQUEST. I'm guessing there's > some way a script could call that constructor method and pass a REQUEST > to it, but I haven't been able to figure out the proper way to do that yet. The "constructContent" method takes arguments "type_name", "destinationFolder", "id", "RESPONSE". Any additional arguments are passed on to your factory. > Can anyone offer any advice on handling an "add" form that doesn't store > a new object until the add form has been successfully submitted? "Plone" solved this problem in a more general way. Maybe, you can learn from their code. Dieter From larry_prikockis@natureserve.org Tue Jun 10 21:23:50 2003 From: larry_prikockis@natureserve.org (gmane) Date: Tue, 10 Jun 2003 16:23:50 -0400 Subject: [Zope-CMF] simple (I think :-) TAL/python expression question Message-ID: I have the following snippet of code: (the "nwType" and such relate to a javascript menu library I'm using) --------------
---------------- my question is, how do I code the "python:item.folder_type == ????? " line so that instead of the hard-coded 'division' string, I'm comparing against a "tal:define=blah tab/id" statement earlier? Actually, I'm assuming I need to make the defined variable global, but I can't come to grips with the syntax for the python expression. and of course, I realize this whole ugly ball of code probably needs to be moved out of the template and into a script... but I'm saving that for my next trick :-) thanks for any clues anyone can provide... Larry From sam@webslingerz.com Tue Jun 10 21:34:14 2003 From: sam@webslingerz.com (Sam Brauer) Date: Tue, 10 Jun 2003 16:34:14 -0400 Subject: [Zope-CMF] simple (I think :-) TAL/python expression question In-Reply-To: References: Message-ID: <3EE640C6.7070306@webslingerz.com> gmane wrote: > I have the following snippet of code: > (the "nwType" and such relate to a javascript menu library I'm using) > > -------------- >
> >
nwType="menuNode" tal:attributes="dispText item/Title; action > string:window.location='${portal_url}/${item/getId}';"> >
>
>
> ---------------- > > my question is, how do I code the "python:item.folder_type == ????? " line > so that instead of the hard-coded 'division' string, I'm comparing against a > "tal:define=blah tab/id" statement earlier? Actually, I'm assuming I need > to make the defined variable global, but I can't come to grips with the > syntax for the python expression. > > and of course, I realize this whole ugly ball of code probably needs to be > moved out of the template and into a script... but I'm saving that for my > next trick :-) > > thanks for any clues anyone can provide... > > Larry > > You either need to define "blah" globally as you said, or define it in a tag that surrounds the context where you want to refer to it: ...
...
...
In either case, your python expression would simply be: item.folder_type == blah > > > > _______________________________________________ > Zope-CMF maillist - Zope-CMF@zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests -- Sam Brauer Systems Programmer sam@webslingerZ.com From larry_prikockis@natureserve.org Tue Jun 10 21:45:34 2003 From: larry_prikockis@natureserve.org (larry_prikockis@natureserve.org) Date: Tue, 10 Jun 2003 16:45:34 -0400 Subject: [Zope-CMF] simple (I think :-) TAL/python expression question Message-ID: This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C32F91.3DA6F0A0 Content-Type: text/plain; charset="iso-8859-1" thanks! ok... I knew it had to be simple... of course I feel a bit foolish now :-) -----Original Message----- From: Sam Brauer [mailto:sam@webslingerz.com] Sent: Tuesday, June 10, 2003 4:34 PM To: gmane Cc: zope-cmf@zope.org Subject: Re: [Zope-CMF] simple (I think :-) TAL/python expression question gmane wrote: > I have the following snippet of code: > (the "nwType" and such relate to a javascript menu library I'm using) > > -------------- >
> >
nwType="menuNode" tal:attributes="dispText item/Title; action > string:window.location='${portal_url}/${item/getId}';"> >
>
>
> ---------------- > > my question is, how do I code the "python:item.folder_type == ????? " line > so that instead of the hard-coded 'division' string, I'm comparing against a > "tal:define=blah tab/id" statement earlier? Actually, I'm assuming I need > to make the defined variable global, but I can't come to grips with the > syntax for the python expression. > > and of course, I realize this whole ugly ball of code probably needs to be > moved out of the template and into a script... but I'm saving that for my > next trick :-) > > thanks for any clues anyone can provide... > > Larry > > You either need to define "blah" globally as you said, or define it in a tag that surrounds the context where you want to refer to it: ...
...
...
In either case, your python expression would simply be: item.folder_type == blah > > > > _______________________________________________ > Zope-CMF maillist - Zope-CMF@zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests -- Sam Brauer Systems Programmer sam@webslingerZ.com ------_=_NextPart_001_01C32F91.3DA6F0A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: [Zope-CMF] simple (I think :-) TAL/python expression = question

thanks!  ok... I knew it had to be simple... of = course I feel a bit foolish now :-)

-----Original Message-----
From: Sam Brauer [mailto:sam@webslingerz.com]
Sent: Tuesday, June 10, 2003 4:34 PM
To: gmane
Cc: zope-cmf@zope.org
Subject: Re: [Zope-CMF] simple (I think :-) = TAL/python expression
question


gmane wrote:
> I have the following snippet of code:
> (the "nwType" and such relate to a = javascript menu library I'm using)
>
> --------------
> <div nwType=3D"menuComponent" = width=3D"150">
>      <metal:block = tal:repeat=3D"item menu_items">
>          = ; <div tal:condition=3D"python:item.folder_type =3D=3D = 'division'"
> nwType=3D"menuNode" = tal:attributes=3D"dispText item/Title; action
> = string:window.location=3D'${portal_url}/${item/getId}';">=
>          = ; </div>
>      = </metal:block>
> </div>
> ----------------
>
> my question is, how do I code the = "python:item.folder_type =3D=3D  ????? " line
> so that instead of the hard-coded 'division' = string, I'm comparing against a
> "tal:define=3Dblah tab/id" statement = earlier?   Actually, I'm assuming I need
> to make the defined variable global, but I = can't come to grips with the
> syntax for the python expression.
>
> and of course, I realize this whole ugly ball = of code probably needs to be
> moved out of the template and into a script... = but I'm saving that for my
> next trick :-)
>
> thanks for any clues anyone can = provide...
>
> Larry
>
>

You either need to define "blah" globally = as you said, or define it in a
tag that surrounds the context where you want to = refer to it:

<span tal:define=3D"blah = tab/id">
  ...
    <div = tal:condition=3D"python:item.folder_type =3D=3D = blah">
       ...
    </div>
  ...
</span>

In either case, your python expression would simply = be:
item.folder_type =3D=3D blah

>
>
>
> = _______________________________________________
> Zope-CMF maillist  -  = Zope-CMF@zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and = feature requests


--
Sam Brauer
Systems Programmer
sam@webslingerZ.com

------_=_NextPart_001_01C32F91.3DA6F0A0-- From zope-tests@squishdot.org Wed Jun 11 03:21:42 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Wed, 11 Jun 2003 03:21:42 +0100 Subject: [Zope-CMF] Win32 Tests - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ---------------------------------------------------------------------- Ran 327 tests in 14.750s OK From zope-tests@squishdot.org Wed Jun 11 03:39:32 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Wed, 11 Jun 2003 03:39:32 +0100 Subject: [Zope-CMF] Linux Test Results - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#1, May 20 2002, 12:02:16) [GCC 2.95.2 20000220 (Debian GNU/Linux)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ....................................................................................................................................................................................................................................................................................................................................... ---------------------------------------------------------------------- Ran 327 tests in 32.130s OK From Rainer Thaden Wed Jun 11 08:25:56 2003 From: Rainer Thaden (Rainer Thaden) Date: Wed, 11 Jun 2003 09:25:56 +0200 Subject: Re[2]: [Zope-CMF] Permission problem In-Reply-To: <16102.7732.880770.732927@gargle.gargle.HOWL> References: <19926839615.20030610170631@gmx.de> <16102.7732.880770.732927@gargle.gargle.HOWL> Message-ID: <147450411.20030611092556@gmx.de> Hi Dieter, DM> Rainer Thaden wrote at 2003-6-10 17:06 +0200: DM> > i have different portal_types which act folderish. Let's take DM> > 'Employee' as an example: DM> > DM> > in a folder 'Employees' portal members can add new 'Employee' objects DM> > via folder contents -> new. DM> > Inside the folderish 'Employee' object, only the owner and an DM> > administrator should be allowed to add new objects (images etc.). DM> > Other logged in members should not see the folder contents action DM> > inside an 'Employee' object. How can i achieve that in the most DM> > comfortable way? DM> > DM> > In portal types -> Employee i can not set the List folder contents permission, DM> > which is applied to the folder contents action. If i set 'List folder DM> > contents' to manager and owner in the Employees folder the members can DM> > not add new 'Employee' objects which is not what i want. DM> You want to restrict the permissions on the "Employee" instances DM> themselves and not the "Employees" folder. DM> An alternative might be to perform the creation by a script DM> with proxie role. I fear, however, that it will not work. Of course, that is what i want. But how do i achieve that? I can't set the 'List folder contents' permission in the portal_types tool on 'Employee'. So do i have to write a script, which sets the permissions of every single 'Employee' instance? That's not very elegant. -- Regards, Rainer mailto:thadi@gmx.de From dieter@handshake.de Wed Jun 11 19:04:25 2003 From: dieter@handshake.de (Dieter Maurer) Date: Wed, 11 Jun 2003 20:04:25 +0200 Subject: Re[2]: [Zope-CMF] Permission problem In-Reply-To: <147450411.20030611092556@gmx.de> References: <19926839615.20030610170631@gmx.de> <16102.7732.880770.732927@gargle.gargle.HOWL> <147450411.20030611092556@gmx.de> Message-ID: <16103.28457.910735.554067@gargle.gargle.HOWL> Rainer Thaden wrote at 2003-6-11 09:25 +0200: > ... > Of course, that is what i want. But how do i achieve that? I can't set > the 'List folder contents' permission in the portal_types tool on > 'Employee'. So do i have to write a script, which sets the permissions > of every single 'Employee' instance? That's not very elegant. You might use DCWorkflow for this. You can associate a workflow with any portal type. You can remap permissions based on workflow states. Dieter From sam@webslingerz.com Wed Jun 11 21:28:06 2003 From: sam@webslingerz.com (Sam Brauer) Date: Wed, 11 Jun 2003 16:28:06 -0400 Subject: [Zope-CMF] How to add a non-empty instance of a content type In-Reply-To: <16102.7629.12172.168448@gargle.gargle.HOWL> References: <3EE5F086.9@webslingerz.com> <16102.7629.12172.168448@gargle.gargle.HOWL> Message-ID: <3EE790D6.5090109@webslingerz.com> Dieter, I just wanted to say thanks. I'm busy with other issues right now, but I think you gave me some leads I will be able to use later, particularly the part about using __of__. I suppose I'll finally have to come to grips with acquisition at the Python level :) Regarding Plone, the last time I checked, when you select a new type to create, it creates an "empty" instance with a timestamp-based name. You can then change the name on the edit form, and Plone renames the object... but if you were to leave the edit form without saving, the "empty" object would still exist. (Maybe you're referring to the CVS version, which I haven't taken the time to check out.) - Sam Dieter Maurer wrote: > Sam Brauer wrote at 2003-6-10 10:51 -0400: > > ... > > I know you can change the "immediate view" to the edit form instead of > > the metadata form. But what I'd really like to be able to do is present > > the user with a customized version of the edit form that includes an ID > > field, and not actually store an object until the user submits the edit > > form. At that time, besides doing any type-specific validation, I would > > need to make sure that the ID is valid. Then if there's anything > > invalid, I would re-render the edit form with the data from the request > > and some error messages. > > You would need to customize the UI, more precisely, the part > dealing with object creation. Instead of asking for type > and id on one form and then switching to the creation action, > you would only ask for the type, then go to a second form > asking for id and all relevant information and only then > transfer to the creation action. > This action would create the object and then update its content > with the collected information, in a single transaction. > > > My custom types can do the validation and form re-rendering, but they > > can only edit existing objects. > > I solved this problem by creating a temporary object, loosely > mapped into the Zope hierarchy (via "__of__"). > When everything was right, the object was finally embedded > into the site with "_setObject". > Adapting this approach for CMF would require some non-trivial > changes. > > > My types have a factory method that > > takes as arguments an ID and an optional REQUEST. I'm guessing there's > > some way a script could call that constructor method and pass a REQUEST > > to it, but I haven't been able to figure out the proper way to do that yet. > > The "constructContent" method takes arguments > "type_name", "destinationFolder", "id", "RESPONSE". > Any additional arguments are passed on to your factory. > > > Can anyone offer any advice on handling an "add" form that doesn't store > > a new object until the add form has been successfully submitted? > > "Plone" solved this problem in a more general way. > Maybe, you can learn from their code. > > > Dieter -- Sam Brauer Systems Programmer sam@webslingerZ.com From sidnei@x3ng.com Thu Jun 12 18:53:45 2003 From: sidnei@x3ng.com (Sidnei da Silva) Date: Thu, 12 Jun 2003 14:53:45 -0300 Subject: [Zope-CMF] Slight change to DirectoryView Message-ID: <20030612175345.GH7352@x3ng.com> Howdy folks, I was using FSDump for the first time yesterday, and I noticed that DirectoryView on the 1.3-branch does not handles '.properties' of files well. Well, more or less. It does treat them right if its '.properties' but not when its 'filename.html.properties', which ends up causing the '${filename}.properties' to appear on the directory view. I have a patch to fix it: =================================================================== RCS file: /cvs-repository/CMF/CMFCore/DirectoryView.py,v retrieving revision 1.23.6.2 diff -r1.23.6.2 DirectoryView.py 43c43 < return name not in ('CVS', 'SVN', '.', '..') --- > return name not in ('CVS', 'SVN', '.', '..') and not name.endswith('.properties') Sounds fine? -- Sidnei da Silva (dreamcatcher) X3ng Web Technology GNU/Linux user 257852 Debian GNU/Linux 3.0 (Sid) 2.4.20-powerpc ppc With your bare hands?!? From zope-tests@squishdot.org Fri Jun 13 03:40:38 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Fri, 13 Jun 2003 03:40:38 +0100 Subject: [Zope-CMF] Linux Test Results - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#1, May 20 2002, 12:02:16) [GCC 2.95.2 20000220 (Debian GNU/Linux)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ....................................................................................................................................................................................................................................................................................................................................... ---------------------------------------------------------------------- Ran 327 tests in 33.162s OK From Rainer Thaden Fri Jun 13 08:45:03 2003 From: Rainer Thaden (Rainer Thaden) Date: Fri, 13 Jun 2003 09:45:03 +0200 Subject: Re[4]: [Zope-CMF] Permission problem Message-ID: <871755801.20030613094503@gmx.de> Hallo Dieter, DM> Rainer Thaden wrote at 2003-6-11 09:25 +0200: DM> > ... DM> > Of course, that is what i want. But how do i achieve that? I can't set DM> > the 'List folder contents' permission in the portal_types tool on DM> > 'Employee'. So do i have to write a script, which sets the permissions DM> > of every single 'Employee' instance? That's not very elegant. DM> You might use DCWorkflow for this. DM> You can associate a workflow with any portal type. DM> You can remap permissions based on workflow states. Yepp. That worked. First there were only three permissions handled by the workflow and I didn't know that you can add additional permissions. Thanks. -- Regards, Rainer mailto:thadi@gmx.de From smita singh" This is a multipart mime message --Next_1055501911---0-203.199.83.37-30215 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline How can I access the username and their roles w.r.t different objects which= are stored by Zope?=0A=0AThanks,=0A Smita --Next_1055501911---0-203.199.83.37-30215 Content-type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =0A=0A=0A --Next_1055501911---0-203.199.83.37-30215-- From smita singh" This is a multipart mime message --Next_1055508434---0-203.199.83.26-13996 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I want develop an application in which welcome page should come up and on s= ubmitting that, zope should authenticate user.After this the user should be= able to operate on objects for which he has got permission and other objec= ts should not be even visible to him.For eg. suppose there are four depts i= n an org and there are MD,GM,AGM etc. so if GM logs in then he should be di= rectly lead to objects for which he has got permission and other(of MD) sho= uld not be even visible to him while he is able to access objects of AGM wh= ich are down the hierarchy. =0A=0AThanks,=0A = Smita --Next_1055508434---0-203.199.83.26-13996 Content-type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =0A=0A=0A --Next_1055508434---0-203.199.83.26-13996-- From Rainer Thaden Fri Jun 13 14:45:16 2003 From: Rainer Thaden (Rainer Thaden) Date: Fri, 13 Jun 2003 15:45:16 +0200 Subject: [Zope-CMF] Bug in TextIndexNG? Message-ID: <17223392245.20030613154516@gmx.de> Hi, i am using TextIndexNG 1.09 in a Zope/CMF Site and have a problem using certain keywords: I use Zope Version (unreleased version, python 2.1.3, linux2) Python Version 2.1.3+ (#1, Mar 21 2003, 23:20:17) [GCC 3.2.3 20030316 (Debian prerelease)] System Platform linux2 I have a SearchableText index in the CMF-portal_catalog (CMF 1.3.1) and when i use certain keywords (e.g. 'bla*' or 't*') i get the following traceback: Traceback (innermost last): 8<-- first part snipped -->8 Module Products.CMFCore.FSPythonScript, line 124, in _exec - __traceback_info__: ({'script': , 'context': , 'container': , 'traverse_subpath': []}, (), {'REQUEST': }, None) Module Script (Python), line 39, in doFormSearch Module Products.CMFCore.CatalogTool, line 214, in searchResults Module Products.ZCatalog.ZCatalog, line 619, in searchResults Module Products.ZCatalog.Catalog, line 732, in searchResults Module Products.ZCatalog.Catalog, line 480, in search Module Products.TextIndexNG.TextIndexNG, line 464, in _apply_index Module Products.TextIndexNG.ParseTree, line 62, in executeQuery Module Products.TextIndexNG.TextIndexNG, line 573, in lookupWordsByTruncation Module Products.TextIndexNG.TextIndexNG, line 511, in _lookup Module Products.TextIndexNG.storages.StandardStorage, line 97, in getDocumentIdsForWordId KeyError: 922883852 Here the settings for the index: Indexed attributes SearchableText Default encoding iso-8859-15 Stemmer disabled Splitter: casefolding enabled Splitter: index single characters disabled Splitter: max. length of splitted words 64 Splitter: separator characters .+-_@ Default query parser PyQueryParser Stopwords None Normalizer None Compressed lists disabled Use converters enabled Near distance 5 Similarity search disabled Debug mode off Any idea what's wrong? -- Regards, Rainer mailto:thadi@gmx.de From Andreas Jung Fri Jun 13 14:58:39 2003 From: Andreas Jung (Andreas Jung) Date: Fri, 13 Jun 2003 15:58:39 +0200 Subject: [Zope-CMF] Bug in TextIndexNG? In-Reply-To: <17223392245.20030613154516@gmx.de> References: <17223392245.20030613154516@gmx.de> Message-ID: <2147483647.1055519919@[192.168.0.3]> I think this is already fixed on the 1.0 branch. -aj --On Freitag, 13. Juni 2003 15:45 Uhr +0200 Rainer Thaden wrote: > Hi, > > i am using TextIndexNG 1.09 in a Zope/CMF Site and have a problem > using certain keywords: > I use > Zope Version (unreleased version, python 2.1.3, linux2) > > Python Version 2.1.3+ (#1, Mar 21 2003, 23:20:17) [GCC 3.2.3 20030316 > (Debian prerelease)] > > System Platform linux2 > > I have a SearchableText index in the CMF-portal_catalog (CMF 1.3.1) > and when i use certain keywords (e.g. 'bla*' or 't*') i get the following > traceback: > > Traceback (innermost last): > > 8<-- first part snipped -->8 > > Module Products.CMFCore.FSPythonScript, line 124, in _exec > - __traceback_info__: ({'script': /CMFTest/ITA/doFormSearch>, 'context': , > 'container': , 'traverse_subpath': []}, (), > {'REQUEST': URL=http://www.akustik.rwth-aachen.de:9673/CMFTest/ITA/search>}, None) > Module Script (Python), line 39, in doFormSearch > Module Products.CMFCore.CatalogTool, line 214, in searchResults > Module Products.ZCatalog.ZCatalog, line 619, in searchResults > Module Products.ZCatalog.Catalog, line 732, in searchResults > Module Products.ZCatalog.Catalog, line 480, in search > Module Products.TextIndexNG.TextIndexNG, line 464, in _apply_index > Module Products.TextIndexNG.ParseTree, line 62, in executeQuery > Module Products.TextIndexNG.TextIndexNG, line 573, in > lookupWordsByTruncation Module Products.TextIndexNG.TextIndexNG, line > 511, in _lookup > Module Products.TextIndexNG.storages.StandardStorage, line 97, in > getDocumentIdsForWordId KeyError: 922883852 > > Here the settings for the index: > Indexed attributes SearchableText > Default encoding iso-8859-15 > Stemmer disabled > Splitter: casefolding enabled > Splitter: index single characters disabled > Splitter: max. length of splitted words 64 > Splitter: separator characters .+-_@ > Default query parser PyQueryParser > Stopwords None > Normalizer None > Compressed lists disabled > Use converters enabled > Near distance 5 > Similarity search disabled > Debug mode off > > Any idea what's wrong? > > -- > Regards, > Rainer mailto:thadi@gmx.de > > > _______________________________________________ > Zope-CMF maillist - Zope-CMF@zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests From dieter@handshake.de Fri Jun 13 18:24:57 2003 From: dieter@handshake.de (Dieter Maurer) Date: Fri, 13 Jun 2003 19:24:57 +0200 Subject: [Zope-CMF] How to add a non-empty instance of a content type In-Reply-To: <3EE790D6.5090109@webslingerz.com> References: <3EE5F086.9@webslingerz.com> <16102.7629.12172.168448@gargle.gargle.HOWL> <3EE790D6.5090109@webslingerz.com> Message-ID: <16106.2281.168954.608192@gargle.gargle.HOWL> Sam Brauer wrote at 2003-6-11 16:28 -0400: > ... > Regarding Plone, the last time I checked, when you select a new type to > create, it creates an "empty" instance with a timestamp-based name. > You can then change the name on the edit form, and Plone renames the > object... but if you were to leave the edit form without saving, the > "empty" object would still exist. > (Maybe you're referring to the CVS version, which I haven't taken the > time to check out.) I think, this is no longer the case. They now have a special tool to manage the temporary object until the data is validated. Dieter From dieter@handshake.de Fri Jun 13 21:35:32 2003 From: dieter@handshake.de (Dieter Maurer) Date: Fri, 13 Jun 2003 22:35:32 +0200 Subject: [Zope-CMF] How to access user info stored by Zope? In-Reply-To: <20030613105831.30231.qmail@webmail27.rediffmail.com> References: <20030613105831.30231.qmail@webmail27.rediffmail.com> Message-ID: <16106.13716.683275.939236@gargle.gargle.HOWL> smita singh wrote at 2003-6-13 10:58 -0000: > How can I access the username and their roles w.r.t different objects which are stored by Zope? The "User" object has methods "getUserName" and "getRolesInContext" to provide the requested information. The easiest way to access the user object is "REQUEST.AUTHENTICATED_USER". Some people say this is deprecated but the alternative is an API mess: In DTML, you can use "_.getSecurityUser()", in PythonScripts: from AccessControl import getSecurityManager ... getSecurityManager().getUser() and in ZPT: "user" Dieter From zope-tests@squishdot.org Sat Jun 14 04:04:39 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Sat, 14 Jun 2003 04:04:39 +0100 Subject: [Zope-CMF] Linux Test Results - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#1, May 20 2002, 12:02:16) [GCC 2.95.2 20000220 (Debian GNU/Linux)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ....................................................................................................................................................................................................................................................................................................................................... ---------------------------------------------------------------------- Ran 327 tests in 32.790s OK From dhart@atlantisblue.com.au Sun Jun 15 02:50:47 2003 From: dhart@atlantisblue.com.au (David Hart) Date: Sun, 15 Jun 2003 11:50:47 +1000 Subject: [Zope-CMF] copy/paste clipboard support for CMF Classes Message-ID: <3EEBD0F7.8000907@atlantisblue.com.au> Hi, I'm using disk-based portal content types based on PortalFolder. The content types each have a unique meta_type and are registered with utils.ContentInit. Clipboard operations on these content types, such as cut/paste and copy/paste produce the error "The object test_move2 does not support this operation." I think the problem is related to the meta_type and checking done in OFS.CopySupport. I've searched the archives for many variations of "cmf meta_type copy clipboard CopySupport", etc. I've found others with similar problems, but no solution that works. The seems simple enough, but is proving difficult to understand and track down. -dave From zope-tests@squishdot.org Sun Jun 15 04:11:53 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Sun, 15 Jun 2003 04:11:53 +0100 Subject: [Zope-CMF] Linux Test Results - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#1, May 20 2002, 12:02:16) [GCC 2.95.2 20000220 (Debian GNU/Linux)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ....................................................................................................................................................................................................................................................................................................................................... ---------------------------------------------------------------------- Ran 327 tests in 32.999s OK From dieter@handshake.de Sun Jun 15 22:25:26 2003 From: dieter@handshake.de (Dieter Maurer) Date: Sun, 15 Jun 2003 23:25:26 +0200 Subject: [Zope-CMF] copy/paste clipboard support for CMF Classes In-Reply-To: <3EEBD0F7.8000907@atlantisblue.com.au> References: <3EEBD0F7.8000907@atlantisblue.com.au> Message-ID: <16108.58438.694646.679201@gargle.gargle.HOWL> David Hart wrote at 2003-6-15 11:50 +1000: > ... > Clipboard operations on these content types, such as cut/paste and > copy/paste produce the error "The object test_move2 does not support > this operation." As always: Look at your traceback. It tells you line and module the problem has been encountered in. Look at the lines around the exception raising line. You probably will get precise information why the exception was raised. Dieter From zope-tests@squishdot.org Mon Jun 16 04:05:19 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Mon, 16 Jun 2003 04:05:19 +0100 Subject: [Zope-CMF] Linux Test Results - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#1, May 20 2002, 12:02:16) [GCC 2.95.2 20000220 (Debian GNU/Linux)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ....................................................................................................................................................................................................................................................................................................................................... ---------------------------------------------------------------------- Ran 327 tests in 32.846s OK From dmerrill@ibiblio.org Mon Jun 16 05:50:02 2003 From: dmerrill@ibiblio.org (David Merrill) Date: Mon, 16 Jun 2003 00:50:02 -0400 Subject: [Zope-CMF] DocBook XML, etc. support Message-ID: Hello all, I'm the Lead Developer with the Linux Documentation Project. We are interested in publishing our documents through CMF (and Plone), but we cannot force our authors to do all their editing TTW, nor can we force them to change their formats. In fact, we find DocBook XML ideal for our purposes. What we need is to have all the TTW capabilities of CMF for those who need/want it, but also allow the site to publish documents whose source is maintained elsewhere. We have a huge collection of documents in many source formats. The formats we want to support are: LinuxDoc SGML DocBook SGML 3.1, etc. DocBook XML 4.1.2, etc. Texinfo Several forms of structured text, for mirroring Wiki content So, as a first step, I have extended CMF to allow DocBook XML as a content type. The code suffers from several limitations at this point, but it is functional enough that I wanted to run it past you for your feedback. I can provide a patch against CVS if you are interested. However, my thought at this point is that hacking up support for lots of different formats and adding them into CMF directly is not the way to go. What would you think about a kind of plug-in system, where we can plug in support for additional formats? That would allow us to develop support for all the formats we wish, without weighing CMF down with stuff most CMF users will never need. Is this something you might be interested in? Or is there some other approach you would recommend? Thanks for your time, -- David Merrill dmerrill at ibiblio.org http://www.lupercalia.net From chrisw@nipltd.com Mon Jun 16 08:33:26 2003 From: chrisw@nipltd.com (Chris Withers) Date: Mon, 16 Jun 2003 08:33:26 +0100 Subject: [Zope-CMF] Slight change to DirectoryView In-Reply-To: <20030612175345.GH7352@x3ng.com> References: <20030612175345.GH7352@x3ng.com> Message-ID: <3EED72C6.2090008@nipltd.com> Sidnei da Silva wrote: > < return name not in ('CVS', 'SVN', '.', '..') > --- > >> return name not in ('CVS', 'SVN', '.', '..') and not name.endswith('.properties') > > Sounds fine? Provided you write tests which excercise both the success and failure cases you've already experienced... Chris From cs@comlounge.net Mon Jun 16 10:36:37 2003 From: cs@comlounge.net (Christian Scholz) Date: Mon, 16 Jun 2003 11:36:37 +0200 Subject: [Zope-CMF] Slight change to DirectoryView In-Reply-To: <20030612175345.GH7352@x3ng.com>; from Sidnei da Silva on Thu, Jun 12, 2003 at 02:53:45PM -0300 References: <20030612175345.GH7352@x3ng.com> Message-ID: <20030616113637.A31046@central> Hi! > < return name not in ('CVS', 'SVN', '.', '..') > --- > > return name not in ('CVS', 'SVN', '.', '..') and not name.endswith('.properties') Isn't it .svn instead of SVN anyway? -- christian From Sylvain =?iso-8859-1?Q?Th=E9nault?= Mon Jun 16 11:30:11 2003 From: Sylvain =?iso-8859-1?Q?Th=E9nault?= (Sylvain =?iso-8859-1?Q?Th=E9nault?=) Date: Mon, 16 Jun 2003 12:30:11 +0200 Subject: [Zope-CMF] DocBook XML, etc. support In-Reply-To: References: Message-ID: <20030616103011.GA4339@crater.logilab.fr> On Monday 16 June ? 00:50, David Merrill wrote: > Hello all, hello, > I'm the Lead Developer with the Linux Documentation Project. We are > interested in publishing our documents through CMF (and Plone), but we > cannot force our authors to do all their editing TTW, nor can we force them > to change their formats. In fact, we find DocBook XML ideal for our > purposes. > > What we need is to have all the TTW capabilities of CMF for those who > need/want it, but also allow the site to publish documents whose source is > maintained elsewhere. > > We have a huge collection of documents in many source formats. The formats > we want to support are: > > LinuxDoc SGML > DocBook SGML 3.1, etc. > DocBook XML 4.1.2, etc. > Texinfo > Several forms of structured text, for mirroring Wiki content > > So, as a first step, I have extended CMF to allow DocBook XML as a content > type. The code suffers from several limitations at this point, but it is > functional enough that I wanted to run it past you for your feedback. I can > provide a patch against CVS if you are interested. > > However, my thought at this point is that hacking up support for lots of > different formats and adding them into CMF directly is not the way to go. > What would you think about a kind of plug-in system, where we can plug in > support for additional formats? That would allow us to develop support for > all the formats we wish, without weighing CMF down with stuff most CMF users > will never need. > > Is this something you might be interested in? Or is there some other > approach you would recommend? Such an approach has been developped in the Archetypes project (http://www.sf.net/projects/archetypes). It's based on a transformation tool in which you can register some transformations from a mime type to another (transformation are python plugins). In the current archetypes implementation, the transforms tool is used to display the TextField content in html or text whatever the input type (there is currently a support for Structured Text, ReST, Word, PDF, Python source). Some new transformations would be welcome ;o) -- Sylvain Thénault LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org From smita singh" This is a multipart mime message --Next_1055762517---0-203.199.83.27-16774 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Is it possible to customize login module of zope so that the user is direct= ly lead to the directory where he has access after authentication but witho= ut user specifying the path in http:\\.. clause?I don't want user to specif= y path and see even the presence of other directories.So, as per the userna= me he must be able to reach that part of the content where he has access. --Next_1055762517---0-203.199.83.27-16774 Content-type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =0A=0A=0A --Next_1055762517---0-203.199.83.27-16774-- From a.huizer@kennisnet.org Mon Jun 16 13:22:16 2003 From: a.huizer@kennisnet.org (Arjan Huizer) Date: Mon, 16 Jun 2003 14:22:16 +0200 Subject: [Zope-CMF] Virus check Message-ID: <9DEA5D491B2EF249A697F39431464F54D95BD9@kermit.kennisnet.org> Hi, I am running Zope 2.6.1 together with CMF 1.3 on a linux box. I would = like to run a virus check on all uploaded files in the CMF. I have = installed FProt on my Linux server.=20 Next I created a python script in the skins directory (validate_file): =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D ## Script (Python) "validate_file" ##parameters=3Dfile=3D'' ##title=3DValidate a file return 0 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D and I customized the file_edit.py script in the skins/content directory: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D if context.validate_file(file=3Dfile): context.edit( precondition=3Dprecondition, file=3Dfile) qst=3D'portal_status_message=3DFile+changed.' if choice =3D=3D ' Change and View ': target_action =3D context.getTypeInfo().getActionById( 'view' ) else: target_action =3D context.getTypeInfo().getActionById( 'edit' ) else: qst=3D'portal_status_message=3DFile+contains+virus.' target_action =3D context.getTypeInfo().getActionById( 'edit' ) context.REQUEST.RESPONSE.redirect( '%s/%s?%s' % ( context.absolute_url() , target_action , qst ) ) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D When I upload a file I get the following error: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Error Type: AttributeError=20 Error Value: validate_file=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Note that when I customize the validate_file script, everything does = work. Can someone tell me what I am missing here? Thanks in advance!! Arjan Huijzer From a.huizer@kennisnet.org Mon Jun 16 13:30:04 2003 From: a.huizer@kennisnet.org (Arjan Huizer) Date: Mon, 16 Jun 2003 14:30:04 +0200 Subject: [Zope-CMF] Viruc check: extra info Message-ID: <9DEA5D491B2EF249A697F39431464F54D3D7F1@kermit.kennisnet.org> Hi, I think I forgot to mention that I added my validate_file script in the = skins directory on the server directly and not through the ZMI. Arjan From sidnei@x3ng.com Mon Jun 16 15:39:45 2003 From: sidnei@x3ng.com (Sidnei da Silva) Date: Mon, 16 Jun 2003 11:39:45 -0300 Subject: [Zope-CMF] Slight change to DirectoryView In-Reply-To: <20030616113637.A31046@central> References: <20030612175345.GH7352@x3ng.com> <20030616113637.A31046@central> Message-ID: <20030616143944.GF9290@x3ng.com> On Mon, Jun 16, 2003 at 11:36:37AM +0200, Christian Scholz wrote: | Hi! | | > < return name not in ('CVS', 'SVN', '.', '..') | > --- | > > return name not in ('CVS', 'SVN', '.', '..') and not name.endswith('.properties') Possibly. Any SVN user around? -- Sidnei da Silva (dreamcatcher) X3ng Web Technology GNU/Linux user 257852 Debian GNU/Linux 3.0 (Sid) 2.4.20-powerpc ppc try again From tseaver@zope.com Mon Jun 16 15:53:31 2003 From: tseaver@zope.com (Tres Seaver) Date: 16 Jun 2003 10:53:31 -0400 Subject: [Zope-CMF] DocBook XML, etc. support In-Reply-To: References: Message-ID: <1055775211.12573.8.camel@beauty> On Mon, 2003-06-16 at 00:50, David Merrill wrote: > Hello all, > > I'm the Lead Developer with the Linux Documentation Project. We are > interested in publishing our documents through CMF (and Plone), but we > cannot force our authors to do all their editing TTW, nor can we force them > to change their formats. In fact, we find DocBook XML ideal for our > purposes. Casey Duncan's ExternalEditor product is ideal for such uses: the product requires installing a small helper app on the client side, which then launches user-configurable editors for content selected for external editing in the browser. In conjunction with Craeg Strong's ZopeXMLMethods product, one can build quite interesting XML-based applications in Zope: the source is kept as XML, edited via external tools, and rendered via XSLT templates. - "ExternalEditor product": http://www.zope.org/Members/Caseman/ExternalEditor - "ZopeXMLMethods product": http://zopexmlmethods.sourceforge.net/ > What we need is to have all the TTW capabilities of CMF for those who > need/want it, but also allow the site to publish documents whose source is > maintained elsewhere. That is a somewhat different requirement: in this case, you are likely to want to write an "importer" for the content, and transform it to HTML on its way into the site. > We have a huge collection of documents in many source formats. The formats > we want to support are: > > LinuxDoc SGML > DocBook SGML 3.1, etc. > DocBook XML 4.1.2, etc. > Texinfo > Several forms of structured text, for mirroring Wiki content > > So, as a first step, I have extended CMF to allow DocBook XML as a content > type. The code suffers from several limitations at this point, but it is > functional enough that I wanted to run it past you for your feedback. I can > provide a patch against CVS if you are interested. > > However, my thought at this point is that hacking up support for lots of > different formats and adding them into CMF directly is not the way to go. > What would you think about a kind of plug-in system, where we can plug in > support for additional formats? That would allow us to develop support for > all the formats we wish, without weighing CMF down with stuff most CMF users > will never need. > > Is this something you might be interested in? Or is there some other > approach you would recommend? > > Thanks for your time, Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From malice120@yahoo.fr Mon Jun 16 16:32:54 2003 From: malice120@yahoo.fr (=?iso-8859-1?q?polo=20polo?=) Date: Mon, 16 Jun 2003 17:32:54 +0200 (CEST) Subject: [Zope-CMF] convert html document into plone document Message-ID: <20030616153254.79023.qmail@web40410.mail.yahoo.com> hello! how convert html document into plone document? thanks bye malice ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com From pw_lists@slinkp.com Mon Jun 16 14:19:25 2003 From: pw_lists@slinkp.com (Paul Winkler) Date: Mon, 16 Jun 2003 09:19:25 -0400 Subject: [Zope-CMF] convert html document into plone document In-Reply-To: <20030616153254.79023.qmail@web40410.mail.yahoo.com> References: <20030616153254.79023.qmail@web40410.mail.yahoo.com> Message-ID: <20030616131925.GD4776@slinkp.com> On Mon, Jun 16, 2003 at 05:32:54PM +0200, polo polo wrote: > hello! > how convert html document into plone document? One easy way is to use FTP or webdav and upload into a plone site. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's FISH TIRED FROG! (random hero from isometric.spaceninja.com) From dieter@handshake.de Mon Jun 16 21:42:19 2003 From: dieter@handshake.de (Dieter Maurer) Date: Mon, 16 Jun 2003 22:42:19 +0200 Subject: [Zope-CMF] Is it possible to customize login module of zope? In-Reply-To: <20030616112157.16778.qmail@webmail17.rediffmail.com> References: <20030616112157.16778.qmail@webmail17.rediffmail.com> Message-ID: <16110.11179.348619.652710@gargle.gargle.HOWL> smita singh wrote at 2003-6-16 11:21 -0000: > Is it possible to customize login module of zope so that the user is directly lead to the directory where he has access after authentication but without user specifying the path in http:\\.. clause?I don't want user to specify path and see even the presence of other directories.So, as per the username he must be able to reach that part of the content where he has access. I assume you are using Cookie based authentication. Then it is possible. The standard "login" tries to perform a redirect to the URL that originally failed due to insufficient permissions. It uses a request variable called "came_from" (almost surely differently named/spelled). Instead, redirect to a different place. Dieter From zope-tests@squishdot.org Tue Jun 17 04:00:32 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Tue, 17 Jun 2003 04:00:32 +0100 Subject: [Zope-CMF] Linux Test Results - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#1, May 20 2002, 12:02:16) [GCC 2.95.2 20000220 (Debian GNU/Linux)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ....................................................................................................................................................................................................................................................................................................................................... ---------------------------------------------------------------------- Ran 327 tests in 31.469s OK From chrisw@nipltd.com Tue Jun 17 08:26:01 2003 From: chrisw@nipltd.com (Chris Withers) Date: Tue, 17 Jun 2003 08:26:01 +0100 Subject: [Zope-CMF] Virus check In-Reply-To: <9DEA5D491B2EF249A697F39431464F54D95BD9@kermit.kennisnet.org> References: <9DEA5D491B2EF249A697F39431464F54D95BD9@kermit.kennisnet.org> Message-ID: <3EEEC289.5020006@nipltd.com> Arjan Huizer wrote: > Hi, > > I am running Zope 2.6.1 together with CMF 1.3 on a linux box. I would like to run a virus check on all uploaded files in the CMF. I have installed FProt on my Linux server. > > When I upload a file I get the following error: > > ========================== > Error Type: AttributeError > Error Value: validate_file > ========================== What's the full traceback? > Note that when I customize the validate_file script, everything does work. Does it show up in any ZMI directory views before you customise it? BTW, you plan is flawed. You won't be able to call you virus checker from inside a skin method. Look at writing an External Method instead... cheers, Chris From r.ritz@biologie.hu-berlin.de Tue Jun 17 08:59:59 2003 From: r.ritz@biologie.hu-berlin.de (Raphael Ritz) Date: Tue, 17 Jun 2003 09:59:59 +0200 Subject: [Zope-CMF] convert html document into plone document References: <20030616153254.79023.qmail@web40410.mail.yahoo.com> Message-ID: <3EEECA7F.8040302@itb.biologie.hu-berlin.de> upload it, e.g., via FTP or WebDAV. Raphael polo polo wrote: >hello! >how convert html document into plone document? > >thanks bye > >malice > >___________________________________________________________ >Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! >Yahoo! Mail : http://fr.mail.yahoo.com > >_______________________________________________ >Zope-CMF maillist - Zope-CMF@zope.org >http://mail.zope.org/mailman/listinfo/zope-cmf > >See http://collector.zope.org/CMF for bug reports and feature requests > > > From a.huizer@kennisnet.org Tue Jun 17 09:08:00 2003 From: a.huizer@kennisnet.org (Arjan Huizer) Date: Tue, 17 Jun 2003 10:08:00 +0200 Subject: [Zope-CMF] Virus check Message-ID: <9DEA5D491B2EF249A697F39431464F54D3D7F3@kermit.kennisnet.org> The full traceback is: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Exception traceback Time 2003/06/17 09:53:43.765 GMT+2=20 User Name (User Id) root (root)=20 Request URL http://localhost/junk/test_file/file_edit=20 Exception Type AttributeError=20 Exception Value validate_file=20 Traceback (innermost last):=20 Module ZPublisher.Publish, line 98, in publish=20 Module ZPublisher.mapply, line 88, in mapply=20 Module ZPublisher.Publish, line 39, in call_object=20 Module Shared.DC.Scripts.Bindings, line 252, in __call__=20 Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec=20 Module Products.PythonScripts.PythonScript, line 315, in _exec=20 Module Script (Python), line 1, in file_edit Line 1=20 AttributeError: validate_file=20 Display traceback as text REQUEST form choice ' Change '=20 file =20 cookies __ac_name 'root'=20 dtpref_cols '95%'=20 dtpref_rows '20'=20 lazy items SESSION >=20 other AUTHENTICATION_PATH ''=20 file =20 traverse_subpath []=20 choice ' Change '=20 SERVER_URL 'http://localhost'=20 PUBLISHED =20 URL 'http://localhost/junk/test_file/file_edit'=20 AUTHENTICATED_USER root=20 TraversalRequestNameStack []=20 URL0 http://localhost/junk/test_file/file_edit=20 URL1 http://localhost/junk/test_file=20 URL2 http://localhost/junk=20 URL3 http://localhost=20 BASE0 http://localhost=20 BASE1 http://localhost=20 BASE2 http://localhost/junk=20 BASE3 http://localhost/junk/test_file=20 BASE4 http://localhost/junk/test_file/file_edit=20 environ HTTP_ACCEPT_ENCODING 'gzip, deflate'=20 CONTENT_TYPE 'multipart/form-data; = boundary=3D---------------------------7d32902b30116'=20 PATH_TRANSLATED '\\junk\\test_file\\file_edit'=20 HTTP_ACCEPT 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, = application/vnd.ms-powerpoint, application/vnd.ms-excel, = application/msword, */*'=20 HTTP_COOKIE '__ac_name=3D"root"; dtpref_rows=3D"20"; = dtpref_cols=3D"95%"; __ac=3D"cm9vdDpyb290%0A"'=20 HTTP_ACCEPT_LANGUAGE 'nl'=20 GATEWAY_INTERFACE 'CGI/1.1'=20 SERVER_PORT '80'=20 HTTP_USER_AGENT 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)'=20 CONTENT_LENGTH '295'=20 REMOTE_ADDR '127.0.0.1'=20 channel.creation_time 1055836419=20 SERVER_PROTOCOL 'HTTP/1.1'=20 PATH_INFO '/junk/test_file/file_edit'=20 HTTP_HOST 'localhost'=20 REQUEST_METHOD 'POST'=20 SCRIPT_NAME ''=20 SERVER_SOFTWARE 'Zope/(Zope 2.6.1 (binary release, python 2.1, = win32-x86), python 2.1.3, win32) ZServer/1.1b1'=20 HTTP_CACHE_CONTROL 'no-cache'=20 CONNECTION_TYPE 'Keep-Alive'=20 HTTP_REFERER 'http://localhost/junk/test_file/file_edit_form'=20 SERVER_NAME 'kenwks-01.kennisnet.org'=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Does anyone happen to know if I can create a file on the server (in the = skins directory) that represents an external method or does this have to = be created through thye ZMI? Thanks for your help so far! Arjan -----Oorspronkelijk bericht----- Van: Chris Withers [mailto:chrisw@nipltd.com] Verzonden: dinsdag 17 juni 2003 9:26 Aan: Arjan Huizer CC: zope-cmf@zope.org Onderwerp: Re: [Zope-CMF] Virus check Arjan Huizer wrote: > Hi, >=20 > I am running Zope 2.6.1 together with CMF 1.3 on a linux box. I would = like to run a virus check on all uploaded files in the CMF. I have = installed FProt on my Linux server.=20 >=20 > When I upload a file I get the following error: >=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > Error Type: AttributeError=20 > Error Value: validate_file=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D What's the full traceback? > Note that when I customize the validate_file script, everything does = work.=20 Does it show up in any ZMI directory views before you customise it? BTW, you plan is flawed. You won't be able to call you virus checker = from inside=20 a skin method. Look at writing an External Method instead... cheers, Chris -----Oorspronkelijk bericht----- Van: Chris Withers [mailto:chrisw@nipltd.com] Verzonden: dinsdag 17 juni 2003 9:26 Aan: Arjan Huizer CC: zope-cmf@zope.org Onderwerp: Re: [Zope-CMF] Virus check Arjan Huizer wrote: > Hi, >=20 > I am running Zope 2.6.1 together with CMF 1.3 on a linux box. I would = like to run a virus check on all uploaded files in the CMF. I have = installed FProt on my Linux server.=20 >=20 > When I upload a file I get the following error: >=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > Error Type: AttributeError=20 > Error Value: validate_file=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D What's the full traceback? > Note that when I customize the validate_file script, everything does = work.=20 Does it show up in any ZMI directory views before you customise it? BTW, you plan is flawed. You won't be able to call you virus checker = from inside=20 a skin method. Look at writing an External Method instead... cheers, Chris From zope-tests@squishdot.org Tue Jun 17 09:11:35 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Tue, 17 Jun 2003 09:11:35 +0100 Subject: [Zope-CMF] Win32 Tests - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ---------------------------------------------------------------------- Ran 327 tests in 16.688s OK From Rainer Thaden Tue Jun 17 09:48:03 2003 From: Rainer Thaden (Rainer Thaden) Date: Tue, 17 Jun 2003 10:48:03 +0200 Subject: [Zope-CMF] Where is listMetaTags ? Message-ID: <1092089147.20030617104803@gmx.de> Hi, on our server running debian and CMFDefault 1.3.1 as debian package (unstable) there's no listMetaTags.py in the generic folder. I just compared the zip file of CMF1.4 to the skins/generic folder on our server and the files inside are the same except for listMetaTags.py which is missing in the debian package. Strange. -- Regards, Rainer mailto:thadi@gmx.de From schubbe@web.de Tue Jun 17 10:42:52 2003 From: schubbe@web.de (Yuppie) Date: Tue, 17 Jun 2003 11:42:52 +0200 Subject: [Zope-CMF] Re: Where is listMetaTags ? In-Reply-To: <1092089147.20030617104803@gmx.de> References: <1092089147.20030617104803@gmx.de> Message-ID: <3EEEE29C.9070001@web.de> Hi! Rainer Thaden wrote: > on our server running debian and CMFDefault 1.3.1 as debian package > (unstable) there's no listMetaTags.py in the generic folder. > > I just compared the zip file of CMF1.4 to the skins/generic folder on > our server and the files inside are the same except for > listMetaTags.py which is missing in the debian package. > Strange. Why is that strange? listMetaTags.py is new in CMF1.4 . Cheers, Yuppie From chrisw@nipltd.com Tue Jun 17 11:50:12 2003 From: chrisw@nipltd.com (Chris Withers) Date: Tue, 17 Jun 2003 11:50:12 +0100 Subject: [Zope-CMF] Virus check In-Reply-To: <9DEA5D491B2EF249A697F39431464F54D3D7F3@kermit.kennisnet.org> References: <9DEA5D491B2EF249A697F39431464F54D3D7F3@kermit.kennisnet.org> Message-ID: <3EEEF264.90505@nipltd.com> Arjan Huizer wrote: > Does anyone happen to know if I can create a file on the server (in the skins directory) that represents an external method or does this have to be created through thye ZMI? It has to be through the ZMI. cheers, Chris From zope-tests@squishdot.org Tue Jun 17 12:19:59 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Tue, 17 Jun 2003 12:19:59 +0100 Subject: [Zope-CMF] Win32 Tests - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ---------------------------------------------------------------------- Ran 327 tests in 15.719s OK From Rainer Thaden Tue Jun 17 12:45:04 2003 From: Rainer Thaden (Rainer Thaden) Date: Tue, 17 Jun 2003 13:45:04 +0200 Subject: [Zope-CMF] Re[2]: Where is listMetaTags ? In-Reply-To: <3EEEE29C.9070001@web.de> References: <1092089147.20030617104803@gmx.de> <3EEEE29C.9070001@web.de> Message-ID: <6712711144.20030617134504@gmx.de> Hallo Yuppie, Y> Rainer Thaden wrote: >> on our server running debian and CMFDefault 1.3.1 as debian package >> (unstable) there's no listMetaTags.py in the generic folder. >> >> I just compared the zip file of CMF1.4 to the skins/generic folder on >> our server and the files inside are the same except for >> listMetaTags.py which is missing in the debian package. >> Strange. Y> Why is that strange? Y> listMetaTags.py is new in CMF1.4 . My fault: i used listMetaTags before CMF1.4 but i had it in skins/custom (I found the code somewhere on the dogbowl). I missed to customize this on our debian server with CMF 1.3.1 and got an error. Doh' -- Regards, Rainer mailto:thadi@gmx.de From smita singh" This is a multipart mime message --Next_1055851508---0-203.199.83.39-13024 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I am developing a website and I want that various users should be specified= at directories and sub-directories level. Moreover, after submitting the w= elcome page(not part of standard zope product)he should be authenticated by= zope and for this I don't want the user to specify path to his directory a= nd nor he should be aware of what other content is present apart from his c= ontent.Normally the user enters path to his directory in http:\\... clause = and then he is authenticated w.r.t users in that directory,but I don't want= this.=0A=0AThank's in advance.=0A=0A = Smita=0A --Next_1055851508---0-203.199.83.39-13024 Content-type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =0A=0A=0A --Next_1055851508---0-203.199.83.39-13024-- From malice120@yahoo.fr Tue Jun 17 17:21:14 2003 From: malice120@yahoo.fr (=?iso-8859-1?q?polo=20polo?=) Date: Tue, 17 Jun 2003 18:21:14 +0200 (CEST) Subject: [Zope-CMF] send index_html by ftp Message-ID: <20030617162114.8094.qmail@web40407.mail.yahoo.com> hello, i can't send a file name index_html by ftp!!!Do you know ho to do that ? bye ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com From Rainer Thaden Tue Jun 17 17:22:03 2003 From: Rainer Thaden (Rainer Thaden) Date: Tue, 17 Jun 2003 18:22:03 +0200 Subject: [Zope-CMF] Add properties to already existing content types Message-ID: <12429333133.20030617182203@gmx.de> Hi, i had to add some properties to a file system based class which already had some instances in the ZODB. I did it like this: I defined a function do_update in the class and called the method on all instances. Here's the code: def do_update(self): id = self.id container = self.aq_parent ob = self ob.__dict__ = self.__dict__ ob.__dict__['property1']='' ob.__dict__['property2']='' container.manage_delObjects(ids=[id]) container._setObject(id, ob) The problem is that the new properties are tuples by default. When i debug in the edit method of the class and assign property1='bla' then i get property1=('bla') at the first time. When i assign it a second time i get the correct result. Am i doing something wrong? Maybe the update method is a bit fragile? -- Regards, Rainer mailto:thadi@gmx.de From khine@o-a-l.com Tue Jun 17 22:58:03 2003 From: khine@o-a-l.com (Norman Khine) Date: Tue, 17 Jun 2003 22:58:03 +0100 Subject: [Zope-CMF] auto generate the username on the join form Message-ID: <009a01c3351b$868ad360$0100a8c0@alpha> hello, is there a way to change the join_form so that the username is generated from a sequenced number, that is incremened with every new joining? thanks norman From zope-tests@squishdot.org Wed Jun 18 00:23:53 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Wed, 18 Jun 2003 00:23:53 +0100 Subject: [Zope-CMF] Win32 Tests - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ---------------------------------------------------------------------- Ran 327 tests in 14.766s OK From zope-tests@squishdot.org Wed Jun 18 04:02:32 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Wed, 18 Jun 2003 04:02:32 +0100 Subject: [Zope-CMF] Linux Test Results - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#1, May 20 2002, 12:02:16) [GCC 2.95.2 20000220 (Debian GNU/Linux)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ....................................................................................................................................................................................................................................................................................................................................... ---------------------------------------------------------------------- Ran 327 tests in 32.643s OK From r.ritz@biologie.hu-berlin.de Wed Jun 18 07:55:18 2003 From: r.ritz@biologie.hu-berlin.de (Raphael Ritz) Date: Wed, 18 Jun 2003 08:55:18 +0200 Subject: [Zope-CMF] Add properties to already existing content types References: <12429333133.20030617182203@gmx.de> Message-ID: <3EF00CD6.6040403@itb.biologie.hu-berlin.de> Rainer Thaden wrote: >Hi, > >i had to add some properties to a file system based class which >already had some instances in the ZODB. >I did it like this: >I defined a function do_update in the class and called the method on >all instances. >Here's the code: > > def do_update(self): > id = self.id > > container = self.aq_parent > ob = self > > ob.__dict__ = self.__dict__ > ob.__dict__['property1']='' > ob.__dict__['property2']='' > > container.manage_delObjects(ids=[id]) > container._setObject(id, ob) > >The problem is that the new properties are tuples by default. When i >debug in the edit method of the class and assign > >property1='bla' > >then i get property1=('bla') at the first time. >When i assign it a second time i get the correct result. > >Am i doing something wrong? Maybe the update method is a bit fragile? > > Portal Content inherits from PropertyManager. Have you tried just using 'manage_addProperty'? Raphael Or how about this: >From tseaver@zope.com Fri Aug 2 18:50:39 2002 >From: tseaver@zope.com (Tres Seaver) >Date: 02 Aug 2002 13:50:39 -0400 >Subject: [Zope-CMF] Additional property to portal_type >In-Reply-To: <008301c239b6$93c50930$315d4cd5@domowy> >References: <008301c239b6$93c50930$315d4cd5@domowy> >Message-ID: <1028310640.6076.3.camel@beauty> > >On Thu, 2002-08-01 at 19:44, Pawel Lewicki wrote: > >> Is there any simpler way to add an extra property to default CMFDocument >> (e.g.) than overriding the whole class? > >ScriptableTypeInfo is your friend: > >http://cmf.zope.org/Members/tseaver/how_tos/using_scriptable_type_info > >You can add properties after creating the object using >'manage_addProperty', e.g.:: > > product.manage_addProperty( 'some_prop', 'initial value', 'string' ) > >Tres. >-- >=============================================================== >Tres Seaver tseaver@zope.com >Zope Corporation "Zope Dealers" http://www.zope.com > > > Or this: There is a very easy way to do this built into CMF, the Scriptable Type Information. In the Types Tool, create a new Scriptable Type Information, deriving it from the base type you need. Name it "MyType" for instance. As "Constructor path", type the name of a Python Script, for instance MyType_create. Create this Python Script in the Types Tool: ##parameters=container, id, *args, **kw # create the base object container.invokeFactory('Some Base Portal Type', id) ob = getattr(container, id) # now add the properties you need ob.manage_addProperty('foo', 1, 'int') # finally return the object return ob The only thing you have to be aware of is that during script execution, the portal_type of your object will be the base portal type and not yet the one of your final type. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From smita singh" This is a multipart mime message --Next_1055938804---0-203.199.83.38-23271 Content-type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

=0AI am developing a website. I want to include following features in it= :
=0A
=0A1. Welcome page is displayed to the user.
=0A
=0A2. On= submission of this page zope authentication page pops up.
=0A
=0A3. = User enters his name and password.
=0A
=0A4.Suppose following directo= ry structure exists:
=0A
=0A           =                     &nbs= p;   /.
=0A                =                     |
= =0A                    &n= bsp;     A      B      C  &nbs= p;   D
=0A                &= nbsp;                 |   = ;         |
=0A          &= nbsp;                   E&nbs= p; F          G
=0A        =                      = ; |
=0A                  &n= bsp;           H  K
=0A
=0AUser XYZ is = manager of E.
=0A
=0AChild of root->A,B,C,D
=0AChildren of B-&g= t;E,F
=0AChildren of D->G
=0AChildren of E->H,K.
=0AThe user= XYZ has got role of manager on E but no role above the hierarchy.
=0A=0A5. I want zope to authenticate User XYZ.
=0A
=0A6. After this &q= uot;manage" page of E opens up and
=0A
=0A  a) User XYZ nee= d not enter the url to E in "http:\\..." clause ie. he should not= be aware of relative location of E.
=0A
=0Ab) User XYZ must not come= to know the presence of other directories except E,H and K.
=0A
=0AC= an anyone help me out to do this job?
=0A
=0AThanks in advance.
= =0A
=0A                  &n= bsp;                   Smita <= BR>=0A
=0A
=0A
=0A
=0A=0A

=0A

=0A=0A --Next_1055938804---0-203.199.83.38-23271 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I am developing a website. I want to include following features in it:=0A= =0A1. Welcome page is displayed to the user.=0A=0A2. On submission of this = page zope authentication page pops up.=0A=0A3. User enters his name and pas= sword.=0A=0A4.Suppose following directory structure exists:=0A=0A = /.=0A |=0A = A B C D=0A = | |=0A E F G=0A = |=0A H K=0A=0AUse= r XYZ is manager of E.=0A=0AChild of root->A,B,C,D=0AChildren of B->E,F=0AC= hildren of D->G=0AChildren of E->H,K.=0AThe user XYZ has got role of manage= r on E but no role above the hierarchy.=0A=0A5. I want zope to authenticate= User XYZ.=0A=0A6. After this "manage" page of E opens up and=0A=0A a) Use= r XYZ need not enter the url to E in "http:\\..." clause ie. he should not = be aware of relative location of E.=0A=0Ab) User XYZ must not come to know = the presence of other directories except E,H and K.=0A=0ACan anyone help me= out to do this job?=0A=0AThanks in advance.=0A=0A = Smita =0A=0A=0A=0A=0A --Next_1055938804---0-203.199.83.38-23271-- From malice120@yahoo.fr Wed Jun 18 13:35:38 2003 From: malice120@yahoo.fr (=?iso-8859-1?q?polo=20polo?=) Date: Wed, 18 Jun 2003 14:35:38 +0200 (CEST) Subject: [Zope-CMF] change the default view by index.html instead of index_html Message-ID: <20030618123538.83408.qmail@web40402.mail.yahoo.com> Hello, is it possible to change the default view by index.html instead of index_html? thanks ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com From pw_lists@slinkp.com Wed Jun 18 11:53:56 2003 From: pw_lists@slinkp.com (Paul Winkler) Date: Wed, 18 Jun 2003 06:53:56 -0400 Subject: [Zope-CMF] change the default view by index.html instead of index_html In-Reply-To: <20030618123538.83408.qmail@web40402.mail.yahoo.com> References: <20030618123538.83408.qmail@web40402.mail.yahoo.com> Message-ID: <20030618105356.GE1686@slinkp.com> On Wed, Jun 18, 2003 at 02:35:38PM +0200, polo polo wrote: > Hello, is it possible to change the default view by > index.html instead of index_html? The easiest way to do that is to create a simple index_html like so: (dtml version) (zpt version) -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's BURGLAR VON ALPHA! (random hero from isometric.spaceninja.com) From andy@agmweb.ca Wed Jun 18 17:43:10 2003 From: andy@agmweb.ca (Andy McKay) Date: Wed, 18 Jun 2003 09:43:10 -0700 Subject: [Zope-CMF] change the default view by index.html instead of index_html In-Reply-To: <20030618123538.83408.qmail@web40402.mail.yahoo.com> References: <20030618123538.83408.qmail@web40402.mail.yahoo.com> Message-ID: <3EF0969E.1060302@agmweb.ca> polo polo wrote: > Hello, is it possible to change the default view by > index.html instead of index_html? In plone 1.1 you will be able to go to site properties and specify the default page name you want in order eg index.html, index_html, index.foo -- Andy McKay http://www.agmweb.ca From seb@jamkit.com Wed Jun 18 18:55:00 2003 From: seb@jamkit.com (seb bacon) Date: 18 Jun 2003 18:55:00 +0100 Subject: [Zope-CMF] new cmf site Message-ID: <1055958899.11359.287.camel@bucharin.jamkit.com> Hi all, Just thought folks might be interested in a new CMF site we've done. I only mention it because it's very un-CMFy in how it works/looks - just goes to show how flexible the framework is... http://www.business-humanrights.org seb From jccooper@jcameroncooper.com Wed Jun 18 19:17:56 2003 From: jccooper@jcameroncooper.com (J Cameron Cooper) Date: Wed, 18 Jun 2003 13:17:56 -0500 Subject: [Zope-CMF] auto generate the username on the join form In-Reply-To: <009a01c3351b$868ad360$0100a8c0@alpha> References: <009a01c3351b$868ad360$0100a8c0@alpha> Message-ID: <3EF0ACD4.7000502@jcameroncooper.com> > > >is there a way to change the join_form so that the username is generated >from a sequenced number, that is incremened with every new joining? > > 1) Keep a property somewhere (like the membership tool or properties tool) that keeps your count. This can be done through the ZMI or by subclassing the membership tool. 2) Display that as the default on your login form (customize the skin.) 3) Increment that property every time a member is added, either through the appropriate skin script or via subclassing the membership tool. The subclass-ing the membership tool keeps things closer together, although you may find the initial work easier if you go TTW using mostly the skins. --jcc From dieter@handshake.de Wed Jun 18 19:52:43 2003 From: dieter@handshake.de (Dieter Maurer) Date: Wed, 18 Jun 2003 20:52:43 +0200 Subject: [Zope-CMF] Add properties to already existing content types In-Reply-To: <12429333133.20030617182203@gmx.de> References: <12429333133.20030617182203@gmx.de> Message-ID: <16112.46331.876491.551843@gargle.gargle.HOWL> Rainer Thaden wrote at 2003-6-17 18:22 +0200: > Hi, > > i had to add some properties to a file system based class which > already had some instances in the ZODB. > I did it like this: > I defined a function do_update in the class and called the method on > all instances. > Here's the code: > > def do_update(self): > id = self.id > > container = self.aq_parent > ob = self > > ob.__dict__ = self.__dict__ > ob.__dict__['property1']='' > ob.__dict__['property2']='' > > container.manage_delObjects(ids=[id]) > container._setObject(id, ob) This is really funny code: The following should be almost equivalent: def do_update(self): self.property1= '' self.property2= '' "manage_delObjects" will call "manage_beforeDelete" and "_setObject" "manage_afterAdd". If they do something essential for you (e.g. indexing), call them explicitly. > The problem is that the new properties are tuples by default. When i > debug in the edit method of the class and assign > > property1='bla' > > then i get property1=('bla') at the first time. > When i assign it a second time i get the correct result. There is probably a trailing "," somewhere. The code you show above will not assign a tuple. Dieter From yuppie@zedat.fu-berlin.de Wed Jun 18 19:54:58 2003 From: yuppie@zedat.fu-berlin.de (Yuppie) Date: Wed, 18 Jun 2003 20:54:58 +0200 Subject: [Zope-CMF] Re: How to do this? In-Reply-To: <20030618122004.23273.qmail@webmail28.rediffmail.com> References: <20030618122004.23273.qmail@webmail28.rediffmail.com> Message-ID: <3EF0B582.7060505@zedat.fu-berlin.de> Hi Smita! smita singh wrote: > 6. After this "manage" page of E opens up and > > a) User XYZ need not enter the url to E in "http:\\..." clause ie. he should not be aware of relative location of E. > > b) User XYZ must not come to know the presence of other directories except E,H and K. > > Can anyone help me out to do this job? Did you have a closer look at the CMFDefault skin files? login_form is the form where users enter their name and password. On submit, login_form calls logged_in. This is the basic structure of logged_in.pt:
Customize logged_in.pt by adding a redirect into the "not first_time" section of the code. All you need besides that is a method to find out which user should be redirected to which location. HTH, Yuppie From Andrew Williams" Message-ID: Seb: Looks good... it is nice to see a CMF solution that doesn't look exactly like everyone elses. I *especially* like the little bit of code at the very bottom....

Warning!

Your browser does not support web standards.
pricelesss! Andrew Williams "seb bacon" wrote in message news:1055958899.11359.287.camel@bucharin.jamkit.com... > Hi all, > > Just thought folks might be interested in a new CMF site we've done. I > only mention it because it's very un-CMFy in how it works/looks - just > goes to show how flexible the framework is... > > http://www.business-humanrights.org > > seb > > > _______________________________________________ > Zope-CMF maillist - Zope-CMF@zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests > From Dustin.Tennill@EKU.EDU Wed Jun 18 22:08:15 2003 From: Dustin.Tennill@EKU.EDU (Tennill, Dustin) Date: Wed, 18 Jun 2003 17:08:15 -0400 Subject: [Zope-CMF] subscribe Message-ID: This is a multi-part message in MIME format. ------_=_NextPart_001_01C335DD.BBD545FB Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable subscribe =20 =20 ------_=_NextPart_001_01C335DD.BBD545FB Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

subscribe    &n= bsp;    

 

------_=_NextPart_001_01C335DD.BBD545FB-- From malice120@yahoo.fr Wed Jun 18 23:50:03 2003 From: malice120@yahoo.fr (=?iso-8859-1?q?polo=20polo?=) Date: Thu, 19 Jun 2003 00:50:03 +0200 (CEST) Subject: [Zope-CMF] Re: [Plone-users] i can send index2_html by ftp but no index_html why? In-Reply-To: <3EF09B64.8090500@agmweb.ca> Message-ID: <20030618225003.8277.qmail@web40414.mail.yahoo.com> Hi !!I want to send index_html by ftp in a subfolder in my plone site and I use gftp with linux red hat and the message error is error creating file and after there is a deconnection .... --- Andy McKay a écrit : > You will probably find that index_html is not a > state that can be > edited. Please read the book, chapter 3 on workflow > and move it to state > that can be edited. > > However Im guessing, because you have not given any > information. Please > explain your question. To what folder are you > ftp'ing into in Plone. > Does it have a index_html already? What error > message is raised? Are you > logged in through ftp? > -- > Andy McKay > http://www.agmweb.ca > ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com From zope-tests@squishdot.org Thu Jun 19 00:24:09 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Thu, 19 Jun 2003 00:24:09 +0100 Subject: [Zope-CMF] Win32 Tests - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ---------------------------------------------------------------------- Ran 327 tests in 16.438s OK From ahalko@insivia.com Thu Jun 19 02:07:49 2003 From: ahalko@insivia.com (Andrew R. Halko) Date: Wed, 18 Jun 2003 21:07:49 -0400 Subject: [Zope-CMF] Domain Auth Message-ID: Does any one know about or have an alternate user folder implementation that has a faster domain auth mode? Andrew From ahalko@insivia.com Thu Jun 19 02:07:49 2003 From: ahalko@insivia.com (Andrew R. Halko) Date: Wed, 18 Jun 2003 21:07:49 -0400 Subject: [Zope-CMF] Domain Auth Message-ID: Does any one know about or have an alternate user folder implementation that has a faster domain auth mode? Andrew From ahalko@insivia.com Thu Jun 19 02:07:49 2003 From: ahalko@insivia.com (Andrew R. Halko) Date: Wed, 18 Jun 2003 21:07:49 -0400 Subject: [Zope-CMF] Domain Auth Message-ID: Does any one know about or have an alternate user folder implementation that has a faster domain auth mode? Andrew From zope-tests@squishdot.org Thu Jun 19 04:01:23 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Thu, 19 Jun 2003 04:01:23 +0100 Subject: [Zope-CMF] Linux Test Results - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#1, May 20 2002, 12:02:16) [GCC 2.95.2 20000220 (Debian GNU/Linux)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ....................................................................................................................................................................................................................................................................................................................................... ---------------------------------------------------------------------- Ran 327 tests in 32.198s OK From chrisw@nipltd.com Thu Jun 19 14:18:15 2003 From: chrisw@nipltd.com (Chris Withers) Date: Thu, 19 Jun 2003 14:18:15 +0100 Subject: [Zope-CMF] Upgrade Instructions for 1.3.1 to 1.4 Message-ID: <1056028695.3ef1b817bbfdb@webmail.nipltd.com> Hi, Where are the upgrade instructions for going from 1.3.1 to 1.4? I see you need to add portal_types to the action providers list. That's pretty important and doesn't seem to be documented anywhere. In fact, the 'upgrading from prior version' section in the docs on cmf.zope.org seems to be very out of date :-( What gives? Chris From Dustin.Tennill@EKU.EDU Thu Jun 19 14:52:47 2003 From: Dustin.Tennill@EKU.EDU (Tennill, Dustin) Date: Thu, 19 Jun 2003 09:52:47 -0400 Subject: [Zope-CMF] CMF modifcation question Message-ID: Preface: I am somewhat new to Zope/CMF, but have decided to use it at my University based on what I have seen so far. If the question I have is inappropriate for this list, someone let me know. I don't mind figuring it out on my own, but the combination of both products is a little daunting to me. =20 We would like to use the Zope/CMF to host our student web pages. The catch is we don't want to store the actual web content for each student's page in Zope. We currently have our students pages hosted via apache, and would like them to remain on the file system for easy restorability. I want to modify CMF so that when regular member is created, one of two things could happen: 1. The members folder is created, but the index_html just redirects anyone browsing there to their real webpage. OR 2. When I click on the members folder, that is really just link to the correct location for the students real webpage. Is there a programming guide for Zope/CMF that would help me figure this out? Does anyone have any suggestions? I guess related to all this: I need to create about 20,000 member accounts. Anyone have a script that would help me out with this? I didn't see a way to search this lists archives, or I would have looked there first. Dustin Tennill Eastern Kentucky University dustin.tennill@eku.edu From cleath@j9k.org Thu Jun 19 20:04:24 2003 From: cleath@j9k.org (Colin Leath) Date: Thu, 19 Jun 2003 15:04:24 -0400 (EDT) Subject: [Zope-CMF] A page of useful Zope / CMF links. Message-ID: I just put up a page of zope links, http://carfreeuniverse.org/Members/colin/webProgrammingLinks Probably little new to most of you, but if you've just started using zope / cmf it could be helpful. Colin http://j9k.org From rev_matt_y@yahoo.com Thu Jun 19 21:30:55 2003 From: rev_matt_y@yahoo.com (Reverend Matt) Date: Thu, 19 Jun 2003 20:30:55 -0000 Subject: [Zope-CMF] shortcutting new items Message-ID: I've started working on a new feature for a site, and I'm wondering what is the best way to shortcut adding a new document (I want a form on the main page that a user can simply enter title and content and hit submit and it will create a document using the title as the id and put the content into Description and publish all with the push of the button). From zope-tests@squishdot.org Fri Jun 20 00:26:16 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Fri, 20 Jun 2003 00:26:16 +0100 Subject: [Zope-CMF] Win32 Tests - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ---------------------------------------------------------------------- Ran 327 tests in 15.438s OK From zope-tests@squishdot.org Fri Jun 20 04:02:44 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Fri, 20 Jun 2003 04:02:44 +0100 Subject: [Zope-CMF] Linux Test Results - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#1, May 20 2002, 12:02:16) [GCC 2.95.2 20000220 (Debian GNU/Linux)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ....................................................................................................................................................................................................................................................................................................................................... ---------------------------------------------------------------------- Ran 327 tests in 32.473s OK From lickmycrotchythong7@yahoo.com Fri Jun 20 05:38:00 2003 From: lickmycrotchythong7@yahoo.com (lickmycrotchythong7) Date: Fri, 20 Jun 2003 04:38:00 -0000 Subject: [Zope-CMF] you left me with my thong around my ankles Message-ID: I was at work today just thinking about the other online when you left hanging there with my fingers in my pussy. I was so pissed. But, I got over it in no time. I had to care of myself if ya know what I mean. I was wondering if you still wanted to meet up and take care of me when Im coming through on my summer vacation. I hope your manhood is a big as you said it was. I want something over-satisfying. I found this other website last nite that has so many more features than the one were on now. It had a free trial so I was like "why not?". So if you dont see me then you know why. Look me up under my new site as "bootiusmaximus" xoxo hope to hear from ya. http://www.altmatchfinder.com/landing.asp?afl=MYHO From schubbe@web.de Fri Jun 20 08:39:33 2003 From: schubbe@web.de (Yuppie) Date: Fri, 20 Jun 2003 09:39:33 +0200 Subject: [Zope-CMF] [dev] un-hardwire FTPget: small proposal Message-ID: <3EF2BA35.2000506@web.de> Hi! I'd like to add a source_html.pt to zpt_content that is called by Document.manage_FTPget if Format is 'text/html'. This would make WebDAV authoring more fun: You could add style or dreamweaver template information to the head section of html source checkouts. Uploading the file again, PUT removes that kind of information anyway. Any thoughts? If there are no objections or better ideas, I'll implement this soon in cvs head (for CMF 1.5). Cheers, Yuppie From r.ritz@biologie.hu-berlin.de Fri Jun 20 08:51:41 2003 From: r.ritz@biologie.hu-berlin.de (Raphael Ritz) Date: Fri, 20 Jun 2003 09:51:41 +0200 Subject: [Zope-CMF] A page of useful Zope / CMF links. References: Message-ID: <3EF2BD0D.2050805@itb.biologie.hu-berlin.de> Colin Leath wrote: >I just put up a page of zope links, > >http://carfreeuniverse.org/Members/colin/webProgrammingLinks > >Probably little new to most of you, but if you've just >started using zope / cmf it could be helpful. > Hi Colin, nice summary. This just reminded me that I wrote something similar the other day and maybe some people find this useful too http://www.neuroinf.de/Miscellaneous/BeginnersGuide Raphael PS: I hesitated posting this so far because I am not so sure whether everything I write under the 'random gotchas' section is actually correct. So please let me know if I am wrong somewhere! > >Colin >http://j9k.org > > >_______________________________________________ >Zope-CMF maillist - Zope-CMF@zope.org >http://mail.zope.org/mailman/listinfo/zope-cmf > >See http://collector.zope.org/CMF for bug reports and feature requests > > > From schubbe@web.de Fri Jun 20 12:29:34 2003 From: schubbe@web.de (Yuppie) Date: Fri, 20 Jun 2003 13:29:34 +0200 Subject: [Zope-CMF] [dev] type actions, views and aliases: a proposal Message-ID: <3EF2F01E.2090509@web.de> Hi! Today is my proposal day. Here is the second one: Context / Problem ================= I'm still not happy with the limitations for type actions caused by getActionById and _getViewFor. _getViewFor is used by the view() method to return the default view. The view method allows to add a simple +'/view' to urls. www.example.org/foo/view is an alias for www.example.org/foo/document_view -or- www.example.org/foo/newsitem_view -or- www.example.org/foo/whatever_the_default_view_is But we can't get rid of these urls, because we can't use them in actions. If we would add an action like that, { 'id':'view', 'name':'View', 'action':'string:${object_url}/view', 'permissions':(View,) } there would be no way to find out that /view is an alias for /document_view, because actions are currently used to look up these method aliases. getActionById does something similar, so this is what I propose: Proposal / Solution =================== I'd like to add a dictionary to TypeInformations that maps aliases to methods and is configurable TTW. e.g. {'view':'document_view', 'edit':'document_edit_form', 'metadata':'metadata_edit_form'} That might look like redundant information, because right now we can get this information from the actions. But the need to store this information inside actions limits the use of actions right now and makes type actions different from other actions. getActionById and _getViewFor could use that dict instead of actions. In fact they'll become useless: A __before_publishing_traverse__ in PortalContent could do the mapping. That allows to always use the defined aliases, e.g.: www.example.org/foo/view www.example.org/foo/edit www.example.org/foo/metadata Any thoughts? Comments are welcome. Cheers, Yuppie From r.ritz@biologie.hu-berlin.de Fri Jun 20 13:04:43 2003 From: r.ritz@biologie.hu-berlin.de (Raphael Ritz) Date: Fri, 20 Jun 2003 14:04:43 +0200 Subject: [Zope-CMF] [dev] type actions, views and aliases: a proposal References: <3EF2F01E.2090509@web.de> Message-ID: <3EF2F85B.7060102@itb.biologie.hu-berlin.de> Not sure whether this is related but would this somehow affect the following: So far '/view' infers the default view even when the 'view' action in the types tool is set to something else. (is that actually still the case in 1.4?) Why on earth would you want that? So far I use this for file objects because their default view is the download action (and I think this is OK) but when a file object appears in a search result or the review slot (in Plone) I don't want to link to the download but to the descriptive view (title/name, size, description, download link). Currently this can be differentiated via the types tool some_file_object/view -> gives you the download some_file_object.getTypeInfo().getActionById('view') -> gives you whatever you define as view in the types tool. BTW: How do others deal with that issue? Raphael Yuppie wrote: > Hi! > > Today is my proposal day. Here is the second one: > > > Context / Problem > ================= > > I'm still not happy with the limitations for type actions caused by > getActionById and _getViewFor. > > _getViewFor is used by the view() method to return the default view. > > > The view method allows to add a simple +'/view' to urls. > > www.example.org/foo/view > > is an alias for > > www.example.org/foo/document_view > -or- > www.example.org/foo/newsitem_view > -or- > www.example.org/foo/whatever_the_default_view_is > > > But we can't get rid of these urls, because we can't use them in > actions. If we would add an action like that, > > { 'id':'view', > 'name':'View', > 'action':'string:${object_url}/view', > 'permissions':(View,) } > > there would be no way to find out that /view is an alias for > /document_view, because actions are currently used to look up these > method aliases. > > getActionById does something similar, so this is what I propose: > > > > Proposal / Solution > =================== > > I'd like to add a dictionary to TypeInformations that maps aliases to > methods and is configurable TTW. > > e.g. > {'view':'document_view', > 'edit':'document_edit_form', > 'metadata':'metadata_edit_form'} > > That might look like redundant information, because right now we can > get this information from the actions. But the need to store this > information inside actions limits the use of actions right now and > makes type actions different from other actions. > > getActionById and _getViewFor could use that dict instead of actions. > In fact they'll become useless: > > A __before_publishing_traverse__ in PortalContent could do the mapping. > That allows to always use the defined aliases, e.g.: > > www.example.org/foo/view > www.example.org/foo/edit > www.example.org/foo/metadata > > > > Any thoughts? Comments are welcome. > > > Cheers, > > Yuppie > > > > > > _______________________________________________ > Zope-CMF maillist - Zope-CMF@zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests > From gerry@dioceseonline.com Fri Jun 20 15:20:12 2003 From: gerry@dioceseonline.com (Gerry Kirk) Date: Fri, 20 Jun 2003 10:20:12 -0400 Subject: [Zope-CMF] available properties for .metadata file in CMF 1.4? Message-ID: Hi, I'd like to know what properties I can set in a .metadata file. Is there a standard list somewhere? Thanks, Gerry From schubbe@web.de Fri Jun 20 15:59:47 2003 From: schubbe@web.de (Yuppie) Date: Fri, 20 Jun 2003 16:59:47 +0200 Subject: [Zope-CMF] Re: [dev] type actions, views and aliases: a proposal In-Reply-To: <3EF2F85B.7060102@itb.biologie.hu-berlin.de> References: <3EF2F01E.2090509@web.de> <3EF2F85B.7060102@itb.biologie.hu-berlin.de> Message-ID: <3EF32163.1040900@web.de> Hi! Raphael Ritz wrote: > Not sure whether this is related but would this somehow affect the > following: > > So far '/view' infers the default view even when the > 'view' action in the types tool is set to something else. > (is that actually still the case in 1.4?) Can't reproduce that problem with CMF 1.4 and don't know of any recent changes related to that. In a current CMF, www.example.org/file/view returns the view specified in the view action www.example.org/file/index_html starts the download www.example.org/file/ calls index_html At least '/view' would be configurable with my proposal. I guess '/index_html' and '/'(default view) should be configurable the same way. Cheers, Yuppie From dieter@handshake.de Fri Jun 20 19:55:04 2003 From: dieter@handshake.de (Dieter Maurer) Date: Fri, 20 Jun 2003 20:55:04 +0200 Subject: [Zope-CMF] shortcutting new items In-Reply-To: References: Message-ID: <16115.22664.197149.364845@gargle.gargle.HOWL> Reverend Matt wrote at 2003-6-19 20:30 -0000: > I've started working on a new feature for a site, and I'm wondering > what is the best way to shortcut adding a new document (I want a form > on the main page that a user can simply enter title and content and > hit submit and it will create a document using the title as the id and > put the content into Description and publish all with the push of the > button). I think Tres usually mentions "Scriptable Type Information" for such purposes (but I may be wrong with this!). Search the archives... I use a custom form (collecting all relevant data) and a custom action (for this form). The custom action is a Python Script that calls "portal_types.constructInstance" and then edits the newly created object to give it the other collected values. Dieter From dieter@handshake.de Fri Jun 20 19:47:27 2003 From: dieter@handshake.de (Dieter Maurer) Date: Fri, 20 Jun 2003 20:47:27 +0200 Subject: [Zope-CMF] CMF modifcation question In-Reply-To: References: Message-ID: <16115.22207.704879.85690@gargle.gargle.HOWL> Tennill, Dustin wrote at 2003-6-19 09:52 -0400: > ... > We would like to use the Zope/CMF to host our student web pages. The > catch is we don't want to store the actual web content for each > student's page in Zope. We currently have our students pages hosted via > apache, and would like them to remain on the file system for easy > restorability. You can also restore the ZODB data file... > I want to modify CMF so that when regular member is created, one of two > things could happen: > 1. The members folder is created, but the index_html just redirects > anyone browsing there to their real webpage. > OR > 2. When I click on the members folder, that is really just link to the > correct location for the students real webpage. Why do you want Zope at all (when everything seems to be static)? > Is there a programming guide for Zope/CMF that would help me figure this > out? You might look at APE. It allows you to maintain content in the file system (or the ZODB or a relational database)... > I guess related to all this: I need to create about 20,000 member > accounts. Anyone have a script that would help me out with this? Use a UserFolder that maintains users in a database. The CMF allows you to create the member area automatically when the member first logs in. > I didn't see a way to search this lists archives, or I would have looked > there first. You can use Google to search the list archives ("site:lists.zope.org"). Dieter From pete@bcmpweb.com Fri Jun 20 23:49:19 2003 From: pete@bcmpweb.com (Peter Simmons) Date: Sat, 21 Jun 2003 10:49:19 +1200 Subject: [Zope-CMF] [dev] type actions, views and aliases: a proposal References: <3EF2F01E.2090509@web.de> Message-ID: <3EF38F6F.8030800@bcmpweb.com> I like your proposal. Another instance where we found the view method to get in the way was when we needed to make users be content. I know since then there has been something else which does this but we did it by diabling the view method and removing the __call__ attribute so that we could then use the instance in __of__ calls in MemberDataTool that wrap the user object with the member data. This of course broke some of the behaviour. So we went through all the templates that were used and fixed them to make the getActionById call. It would have been a lot easier to just have that mapping and do it in one place. Pete Yuppie wrote: > Hi! > > Today is my proposal day. Here is the second one: > > > Context / Problem > ================= > > I'm still not happy with the limitations for type actions caused by > getActionById and _getViewFor. > > _getViewFor is used by the view() method to return the default view. > > > The view method allows to add a simple +'/view' to urls. > > www.example.org/foo/view > > is an alias for > > www.example.org/foo/document_view > -or- > www.example.org/foo/newsitem_view > -or- > www.example.org/foo/whatever_the_default_view_is > > > But we can't get rid of these urls, because we can't use them in > actions. If we would add an action like that, > > { 'id':'view', > 'name':'View', > 'action':'string:${object_url}/view', > 'permissions':(View,) } > > there would be no way to find out that /view is an alias for > /document_view, because actions are currently used to look up these > method aliases. > > getActionById does something similar, so this is what I propose: > > > > Proposal / Solution > =================== > > I'd like to add a dictionary to TypeInformations that maps aliases to > methods and is configurable TTW. > > e.g. > {'view':'document_view', > 'edit':'document_edit_form', > 'metadata':'metadata_edit_form'} > > That might look like redundant information, because right now we can get > this information from the actions. But the need to store this > information inside actions limits the use of actions right now and makes > type actions different from other actions. > > getActionById and _getViewFor could use that dict instead of actions. In > fact they'll become useless: > > A __before_publishing_traverse__ in PortalContent could do the mapping. > That allows to always use the defined aliases, e.g.: > > www.example.org/foo/view > www.example.org/foo/edit > www.example.org/foo/metadata > > > > Any thoughts? Comments are welcome. > > > Cheers, > > Yuppie > > > > > > _______________________________________________ > Zope-CMF maillist - Zope-CMF@zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests > > From andy@agmweb.ca Sat Jun 21 00:23:04 2003 From: andy@agmweb.ca (Andy McKay) Date: Fri, 20 Jun 2003 16:23:04 -0700 Subject: [Zope-CMF] available properties for .metadata file in CMF 1.4? In-Reply-To: References: Message-ID: <3EF39758.1050104@agmweb.ca> From cvs/CMF/CMFCore/tests/fake_skins/fake_skin/test6.py.metadata [default] title = Test object cache = Default cache manager proxy = Manager,Anonymous [security] Access contents information = 1:Manager,Anonymous # and repeat for other security settings Gerry Kirk wrote: > Hi, > > I'd like to know what properties I can set in a .metadata file. Is there > a standard list somewhere? > > Thanks, > Gerry > > > > _______________________________________________ > Zope-CMF maillist - Zope-CMF@zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests > -- Andy McKay http://www.agmweb.ca From peterm@ucsc.edu Sat Jun 21 00:39:49 2003 From: peterm@ucsc.edu (Peter McMillan) Date: Fri, 20 Jun 2003 16:39:49 -0700 Subject: [Zope-CMF] Search results with portal_catalog - need a strategy Message-ID: I have what should be a simple objective. I'd like to search on the indexes of Title, Description and Summary. I have 191 documents in the site. When I search, I'm returning all 191 documents. I should be getting a smaller search result. If someone could give some pointers, I'd appreciate it. I'm using the stock search facilities within the Portal (Zope 2.5.1/CMF1.4). My indexes: Date FieldIndex Description KeywordIndex Subject KeywordIndex Title KeywordIndex Type FieldIndex Bobobase_modification_time FieldIndex Id FieldIndex Meta_type FieldIndex Thank you, Peter From zope-tests@squishdot.org Sat Jun 21 04:06:47 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Sat, 21 Jun 2003 04:06:47 +0100 Subject: [Zope-CMF] Linux Test Results - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#1, May 20 2002, 12:02:16) [GCC 2.95.2 20000220 (Debian GNU/Linux)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ....................................................................................................................................................................................................................................................................................................................................... ---------------------------------------------------------------------- Ran 327 tests in 32.771s OK From robert@redcor.ch Sat Jun 21 07:36:59 2003 From: robert@redcor.ch (robert) Date: Sat, 21 Jun 2003 08:36:59 +0200 Subject: [Zope-CMF] why am I Anonymous Message-ID: <200306210836.59437.robert@redcor.ch> Hi all, I have installed Shanes VerboseSecurity. I am logged in as user robert However VerboseSecurity reports as foolows Unauthorized: Your user account does not have the required permission.=20 Access to 'listFolderContents' of (PloneSite instance at 9d31850) denied. Your user account, Anonymous User, exists at (unknown). Access requires List_folder_contents_Permission, granted to the following roles: ['Manager', 'Owner']. Your roles in this context are ['Anonymous']. This seems not to have any effect. I do not sees any exception or requests = to authenticaded. But why do I have "temporariliy" the role Anonymous ? Thanks fo any explanation mit freundlichen Gr=FCssen Robert Rottermann www.redCOR.ch From pw_lists@slinkp.com Sat Jun 21 08:27:58 2003 From: pw_lists@slinkp.com (Paul Winkler) Date: Sat, 21 Jun 2003 03:27:58 -0400 Subject: [Zope-CMF] DCWorkflow: detecting changes to object Message-ID: <20030621072758.GA9317@slinkp.com> I've been tasked with creating a workflow that sends an email notification anytime an object is created or changed by ftp or webdav upload. This workflow is not used for anything other than triggering these emails. I've handled creation successfully, by creating two states ("new" and "notification sent"), and an automatic transition from the former to the latter. The transition ("notify") has as its guard expression "python:1", and after the state change it calls a script that sends email. "new" is set as the initial state. That works just fine. But it seems that re-upload of an existing object counts as modification, not delete & create. So in this case, the email is not sent - and we need it to be sent. I think what I need is a guard expression that says something like "Trigger this transition if the object's modification time is less than the last time I triggered this transition for this object." But I can't figure out how to do that. Any suggestions? -- Paul Winkler http://www.slinkp.com From tseaver@zope.com Sat Jun 21 15:30:12 2003 From: tseaver@zope.com (Tres Seaver) Date: 21 Jun 2003 10:30:12 -0400 Subject: [Zope-CMF] DCWorkflow: detecting changes to object In-Reply-To: <20030621072758.GA9317@slinkp.com> References: <20030621072758.GA9317@slinkp.com> Message-ID: <1056205815.8327.5.camel@trigger.palladion.com> On Sat, 2003-06-21 at 03:27, Paul Winkler wrote: > I've been tasked with creating a workflow that sends an email > notification anytime an object is created or changed by ftp > or webdav upload. This workflow is not used for anything other > than triggering these emails. > > I've handled creation successfully, by creating two states > ("new" and "notification sent"), and an automatic transition > from the former to the latter. The transition ("notify") > has as its guard expression "python:1", and after the state > change it calls a script that sends email. "new" is set as > the initial state. > > That works just fine. But it seems that re-upload of an existing > object counts as modification, not delete & create. So > in this case, the email is not sent - and we need it to be sent. > > I think what I need is a guard expression that says something like > "Trigger this transition if the object's modification time is > less than the last time I triggered this transition for this object." > But I can't figure out how to do that. Any suggestions? 1) Use a WorkflowMethod wrapper for PUT: from Products.CMFCore.WorkflowCore import WorkflowMethod ... def PUT( self, REQUEST, RESPONSE ): .... PUT = WorkflowMethod( PUT ) Then, add a "modify" transition to your workflow, which both starts and ends in the 'notification sent' state. 2) Use the catalog as an event channel: register a custom index whose only job is to leverage the calls to 'indexObject' to send your e-mail. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From tseaver@zope.com Sat Jun 21 15:34:48 2003 From: tseaver@zope.com (Tres Seaver) Date: 21 Jun 2003 10:34:48 -0400 Subject: [Zope-CMF] Search results with portal_catalog - need a strategy In-Reply-To: References: Message-ID: <1056206089.8375.10.camel@trigger.palladion.com> On Fri, 2003-06-20 at 19:39, Peter McMillan wrote: > I have what should be a simple objective. I'd like to search on the indexes > of Title, Description and Summary. I have 191 documents in the site. > > When I search, I'm returning all 191 documents. I should be getting a > smaller search result. If someone could give some pointers, I'd appreciate > it. > > I'm using the stock search facilities within the Portal (Zope 2.5.1/CMF1.4). > > My indexes: > Date FieldIndex > Description KeywordIndex > Subject KeywordIndex > Title KeywordIndex > Type FieldIndex > Bobobase_modification_time FieldIndex > Id FieldIndex > Meta_type FieldIndex > You probably want a ZCTextIndex on 'Title' and 'Description': KeywordIndex is really only useful for searching specific values (like FieldIndex), where the method / attribute being indexed returns / is a sequence of values: 'Subject' is the canonical example for this type of index. Your 'Date' index is likely not to be as useful as you might think: 'Date' actually returns a string. You might consider adding a DateIndex on 'modified' and / or 'created'. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From zope-tests@squishdot.org Sun Jun 22 04:04:04 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Sun, 22 Jun 2003 04:04:04 +0100 Subject: [Zope-CMF] Linux Test Results - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#1, May 20 2002, 12:02:16) [GCC 2.95.2 20000220 (Debian GNU/Linux)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ....................................................................................................................................................................................................................................................................................................................................... ---------------------------------------------------------------------- Ran 327 tests in 31.820s OK From Rainer Thaden Sun Jun 22 15:49:02 2003 From: Rainer Thaden (Rainer Thaden) Date: Sun, 22 Jun 2003 16:49:02 +0200 Subject: [Zope-CMF] shortcutting new items Message-ID: <13913727.20030622164902@gmx.de> > I've started working on a new feature for a site, and I'm wondering > what is the best way to shortcut adding a new document (I want a form > on the main page that a user can simply enter title and content and > hit submit and it will create a document using the title as the id and > put the content into Description and publish all with the push of the > button). Have a look at http://www.zopelabs.com/cookbook/1049787534 Maybe that helps. -- Regards, Rainer Thadi@gmx.de From schubbe@web.de Sun Jun 22 18:20:44 2003 From: schubbe@web.de (Yuppie) Date: Sun, 22 Jun 2003 19:20:44 +0200 Subject: [Zope-CMF] Re: [dev] type actions, views and aliases: prototype In-Reply-To: <3EF2F01E.2090509@web.de> References: <3EF2F01E.2090509@web.de> Message-ID: <3EF5E56C.2080403@web.de> Hi! Today I checked in a 'first cut' of the proposed 'aliases' feature. It gives you almost full control over type action URLs. Some examples that should work with the prototype: Alias: www.example.org/foo/index.html Method: www.example.org/foo/index_html Alias: www.example.org/foo/edit.html Method: www.example.org/foo/folder_edit_form Alias: www.example.org/bar/edit.html Method: www.example.org/bar/portal_form/document_edit_form Alias: www.example.org/bar/view.pdf Method: www.example.org/bar/document_view/html2pdf Alias: www.example.org/baz/download Method: www.example.org/baz If you want to try it out, check out this CMF branch: yuppie-ti_aliases-branch or download Add a new CMFSite and look at the Aliases Tab of portal_types. Comments are welcome! Please let me know if you think I'm on the wrong track. Cheers, Yuppie From dieter@handshake.de Sun Jun 22 22:57:37 2003 From: dieter@handshake.de (Dieter Maurer) Date: Sun, 22 Jun 2003 23:57:37 +0200 Subject: [Zope-CMF] Search results with portal_catalog - need a strategy In-Reply-To: <1056206089.8375.10.camel@trigger.palladion.com> References: <1056206089.8375.10.camel@trigger.palladion.com> Message-ID: <16118.9809.719854.691893@gargle.gargle.HOWL> Tres Seaver wrote at 2003-6-21 10:34 -0400: > ... > On Fri, 2003-06-20 at 19:39, Peter McMillan wrote: > > I have what should be a simple objective. I'd like to search on the indexes > > of Title, Description and Summary. I have 191 documents in the site. > > > > When I search, I'm returning all 191 documents. I should be getting a > > smaller search result. If someone could give some pointers, I'd appreciate > > it. > ... > You probably want a ZCTextIndex on 'Title' and 'Description': > ... But, when he gets too many hits, this sounds like a bug (I some time ago read about in the mailing list, but never met myself). Dieter From zope-tests@squishdot.org Mon Jun 23 00:10:44 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Mon, 23 Jun 2003 00:10:44 +0100 Subject: [Zope-CMF] Win32 Tests - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ---------------------------------------------------------------------- Ran 327 tests in 15.297s OK From peterm@ucsc.edu Mon Jun 23 00:35:08 2003 From: peterm@ucsc.edu (Peter McMillan) Date: Sun, 22 Jun 2003 16:35:08 -0700 Subject: [Zope-CMF] Search results with portal_catalog - need a strategy In-Reply-To: <16118.9809.719854.691893@gargle.gargle.HOWL> Message-ID: Tres, Dieter, I've made the suggested changes to the indexes and updated the catalog. I'm still getting a set of results for _all_ documents. My config: Zope Version (Zope 2.6.1 (source release, python 2.1, linux2), python 2.1.3, darwin6) Python Version 2.1.3 (#2, Mar 29 2003, 15:27:43) [GCC 3.1 20020420 (prerelease)] CMF 1.4 I'm not sure what steps to take next. We had hoped to roll this site out over the next week to our audience. I'm open to any ideas on how to get this fixed. Thanks, Peter On 6/22/03 2:57 PM, "Dieter Maurer" wrote: > Tres Seaver wrote at 2003-6-21 10:34 -0400: >> ... >> On Fri, 2003-06-20 at 19:39, Peter McMillan wrote: >>> I have what should be a simple objective. I'd like to search on the indexes >>> of Title, Description and Summary. I have 191 documents in the site. >>> >>> When I search, I'm returning all 191 documents. I should be getting a >>> smaller search result. If someone could give some pointers, I'd appreciate >>> it. >> ... >> You probably want a ZCTextIndex on 'Title' and 'Description': >> ... > > But, when he gets too many hits, this sounds like a bug > (I some time ago read about in the mailing list, but never met myself). > > > Dieter > From zope-tests@squishdot.org Mon Jun 23 04:04:03 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Mon, 23 Jun 2003 04:04:03 +0100 Subject: [Zope-CMF] Linux Test Results - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#1, May 20 2002, 12:02:16) [GCC 2.95.2 20000220 (Debian GNU/Linux)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ....................................................................................................................................................................................................................................................................................................................................... ---------------------------------------------------------------------- Ran 327 tests in 32.804s OK From gerry@dioceseonline.com Mon Jun 23 13:34:01 2003 From: gerry@dioceseonline.com (Gerry Kirk) Date: Mon, 23 Jun 2003 08:34:01 -0400 Subject: [Zope-CMF] Re: available properties for .metadata file in CMF 1.4? In-Reply-To: <3EF39758.1050104@agmweb.ca> References: <3EF39758.1050104@agmweb.ca> Message-ID: <3EF6F3B9.4000506@dioceseonline.com> Andy McKay wrote: > From cvs/CMF/CMFCore/tests/fake_skins/fake_skin/test6.py.metadata > > [default] > title = Test object > cache = Default cache manager > proxy = Manager,Anonymous > > [security] > Access contents information = 1:Manager,Anonymous > # and repeat for other security settings > Thanks, Andy. That covers them all, I take it? For security settings, one can enable and disable role permissions? To do that, would I need two lines, or can it be done in one? Would I define it as follows: Access contents information = 1:Manager Access contents information = 0:Member,Reviewer,Anonymous Thanks, Gerry From gerry@dioceseonline.com Mon Jun 23 13:34:01 2003 From: gerry@dioceseonline.com (Gerry Kirk) Date: Mon, 23 Jun 2003 08:34:01 -0400 Subject: [Zope-CMF] Re: available properties for .metadata file in CMF 1.4? In-Reply-To: <3EF39758.1050104@agmweb.ca> References: <3EF39758.1050104@agmweb.ca> Message-ID: <3EF6F3B9.4000506@dioceseonline.com> Andy McKay wrote: > From cvs/CMF/CMFCore/tests/fake_skins/fake_skin/test6.py.metadata > > [default] > title = Test object > cache = Default cache manager > proxy = Manager,Anonymous > > [security] > Access contents information = 1:Manager,Anonymous > # and repeat for other security settings > Thanks, Andy. That covers them all, I take it? For security settings, one can enable and disable role permissions? To do that, would I need two lines, or can it be done in one? Would I define it as follows: Access contents information = 1:Manager Access contents information = 0:Member,Reviewer,Anonymous Thanks, Gerry From tseaver@zope.com Mon Jun 23 15:24:49 2003 From: tseaver@zope.com (Tres Seaver) Date: 23 Jun 2003 10:24:49 -0400 Subject: [Zope-CMF] Re: [CMF-checkins] CVS: CMF/CMFCore/tests - test_DirectoryView.py:1.15 In-Reply-To: <200306231222.h5NCMDF32503@cvs.baymountain.com> References: <200306231222.h5NCMDF32503@cvs.baymountain.com> Message-ID: <1056378290.20755.44.camel@beauty> On Mon, 2003-06-23 at 08:22, Yvo Schubbe wrote: > Update of /cvs-repository/CMF/CMFCore/tests > In directory cvs.zope.org:/tmp/cvs-serv32338/CMFCore/tests > > Modified Files: > test_DirectoryView.py > @@ -45,7 +50,7 @@ > self.ob.fake_skin.manage_properties('Products/CMFCore/tests/fake_skins/fake_skin') > self.failUnless(hasattr(self.ob.fake_skin,'test1'),self.ob.fake_skin.getDirPath()) > > - def test_getDirectoryInfo5( self ): > + def test_getDirectoryInfo4( self ): > """ *nix SOFTWARE_HOME """ > self.ob.fake_skin.manage_properties('/usr/local/zope/2.5.1/Products/CMFCore/tests/fake_skins/fake_skin') > self.failUnless(hasattr(self.ob.fake_skin,'test1'),self.ob.fake_skin.getDirPath()) Thanks for fixing that bit while adding a test for the other bug. I presume that this change un-shadows the a test which wasn't being run due to cut-and-paste. I would say that using sequence numbers here, rather than a methodd name which describes the intent of the test, is sub-optimal. Let's not do that any more, in hopes of making such problems easier to spot: cut-and-paste could still "shadow" a test here, but human eyes are likelier to see incongruity if we give them some more clues. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From Bert.Vanderbauwhede@UGent.be Mon Jun 23 15:40:48 2003 From: Bert.Vanderbauwhede@UGent.be (Bert Vanderbauwhede) Date: Mon, 23 Jun 2003 16:40:48 +0200 (MEST) Subject: [Zope-CMF] Objects in portal_skins Message-ID: How can I check if an object is (physically) located in portal_skins? Bert Vanderbauwhede... --- "What good is a movie titled 'Matrix' with no decent transforms. I at least expected an eigenvector or two somewhere in there. Pshaw." From fg@nuxeo.com Mon Jun 23 15:22:08 2003 From: fg@nuxeo.com (Florent Guillaume) Date: Mon, 23 Jun 2003 16:22:08 +0200 Subject: [Zope-CMF] DublinCore Contributors In-Reply-To: <1053960015.7764.10.camel@trigger.palladion.com> References: <200305261145.08125.idosil@ccietic.usc.es> Message-ID: <20030623142207.GA10510@flo.in.nuxeo.com> In article <1053960015.7764.10.camel@trigger.palladion.com> you write: > On Mon, 2003-05-26 at 05:45, Ignacio Dosil Lago wrote: > > > > Hi all > > As a content can be modified by different users, for item, when several > > owners in the same folder: > > what about updating the contributors tuple automatically as a content is > > modified? > > This is easy enough to do, using only skin methods. > > > what if the last modifier login name is shown with the last modification time > > or, at least, add a method or attribute to the default DublinCore > > implementation to allow it? > > Last modifier is harder, unless you force the ordering of the > contributors to be significant. > > > Are there any reasons not to do this? > > The biggest issue is wiring up all your content to call the method you > write at appropriate times. Zope3's event service makes this simpler: > all an object is responsible for is notifying the world that it is > created / modified, while one of the listeners to those events updates > the created / created_by / modified / modified_by metadata. In fact, > Christian Theune wired that listener up to do exactly what you propose. In CMF >= 1.3 it's pretty easy, just overload the notifyModified() method to do any additional bookkeeping it needs. The last modifier problem is exactly why I added this. See http://cvs.nuxeo.org/cgi-bin/viewcvs.cgi/NuxCPSDocuments/BaseDocument.py?rev=HEAD&content-type=text/vnd.viewcvs-markup for an example of how it's done in CPS. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From fg@nuxeo.com Mon Jun 23 15:46:48 2003 From: fg@nuxeo.com (Florent Guillaume) Date: Mon, 23 Jun 2003 16:46:48 +0200 Subject: [Zope-CMF] why am I Anonymous In-Reply-To: <200306210836.59437.robert@redcor.ch> Message-ID: <20030623144647.GA10574@flo.in.nuxeo.com> In article <200306210836.59437.robert@redcor.ch> you write: > Hi all, > I have installed Shanes VerboseSecurity. > I am logged in as user robert > > However VerboseSecurity reports as foolows > > Unauthorized: Your user account does not have the required permission. > Access to 'listFolderContents' of (PloneSite instance at 9d31850) denied. > Your user account, Anonymous User, exists at (unknown). Access requires > List_folder_contents_Permission, granted to the following roles: ['Manager', > 'Owner']. Your roles in this context are ['Anonymous']. > > This seems not to have any effect. I do not sees any exception or requests to > authenticaded. > But why do I have "temporariliy" the role Anonymous ? Maybe because you're uid is present in the root acl_users and in the CMF one with different passwords ? Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From fg@nuxeo.com Mon Jun 23 16:42:41 2003 From: fg@nuxeo.com (Florent Guillaume) Date: Mon, 23 Jun 2003 17:42:41 +0200 Subject: [Zope-CMF] Re: [CMF-checkins] CVS: CMF/CMFCore - FSMetadata.py:1.5 In-Reply-To: <200305240113.h4O1D0g11276@cvs.baymountain.com> Message-ID: <20030623154241.GA10682@flo.in.nuxeo.com> Could you tell us where is the above bare except: so that we fix it? Also, why did you add another bare except:? Surely only specific exceptions are useful. By the way, the cmf collector is at http://collector.zope.org/CMF (google also knows it). Florent In article <200305240113.h4O1D0g11276@cvs.baymountain.com> you write: > Log Message: > I cant remember where the collector is, so here's the problem. If there is a > problem parsing a metadata file then an error is raised. Unfortunately > because upstream of the metadata parsing there is a bare try and except > no-one is notified and a whole directory can be ignored. > > This patch makes sure that the files continue to be parsed, and more > importantly tells the user there is an error. > > > === CMF/CMFCore/FSMetadata.py 1.4 => 1.5 === > --- CMF/CMFCore/FSMetadata.py:1.4 Mon Mar 24 00:12:27 2003 > +++ CMF/CMFCore/FSMetadata.py Fri May 23 21:12:59 2003 > @@ -65,12 +65,22 @@ > # private API > def _readMetadata(self): > """ Read the new file format using ConfigParser """ > - cfg = CMFConfigParser() > - cfg.read(self._filename + '.metadata') > + self._properties = {} > + self._security = {} > + > + try: > + cfg = CMFConfigParser() > + cfg.read(self._filename + '.metadata') > > - # the two sections we care about > - self._properties = self._getSectionDict(cfg, 'default') > - self._security = self._getSectionDict(cfg, 'security', > self._securityParser) > + # the two sections we care about > + self._properties = self._getSectionDict(cfg, 'default') > + self._security = self._getSectionDict(cfg, 'security', > self._securityParser) > + except: > + LOG('FSMetadata', > + ERROR, > + 'Error parsing .metadata file', > + error=exc_info()) > + > # to add in a new value such as proxy roles, > # just add in the section, call it using getSectionDict > # if you need a special parser for some whacky > -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From fg@nuxeo.com Mon Jun 23 16:48:19 2003 From: fg@nuxeo.com (Florent Guillaume) Date: Mon, 23 Jun 2003 17:48:19 +0200 Subject: [Zope-CMF] Re: [CMF-checkins] CVS: CMF/CMFDefault - MembershipTool.py:1.35.2.1 In-Reply-To: <200305291440.h4TEeT014471@cvs.baymountain.com> Message-ID: <20030623154819.GA10692@flo.in.nuxeo.com> > Log Message: > changed member area creation: > - made logged_in page instead of wrapUser call 'createMemberarea' > - made MembershipTool folderish to store skeleton content inside > - added a hook to 'createMemberarea' to customize member content creation > - adjusted tests > > === CMF/CMFDefault/MembershipTool.py 1.35 => 1.35.2.1 === > --- CMF/CMFDefault/MembershipTool.py:1.35 Wed May 28 07:52:16 2003 > +++ CMF/CMFDefault/MembershipTool.py Thu May 29 10:39:58 2003 [...] > + if not members: > + return None > + if self.isAnonymousUser(): > + return None > + # Note: We can't use getAuthenticatedMember() and getMemberById() > + # because they might be wrapped by MemberDataTool. Why is that a problem ? [...] > + # Note: We can't use invokeFactory() to add folder and content because > + # the user might not have the necessary permissions. > + > + # Create Member's home folder. > + members.manage_addPortalFolder(id=member_id, > + title="%s's Home" % member_id) > + f = getattr(members, member_id) It would be nice if the portal type of the folder was customizable too. And properly in the workflows. I know I need this for CPS. This would need modified TypesTool methods that can create content without the security checks -- I plan to do this at some point. > # Grant Ownership and Owner role to Member > - f.index_html.changeOwnership(user) > + f.index_html.changeOwnership(member) > f.index_html.__ac_local_roles__ = None > f.index_html.manage_setLocalRoles(member_id, ['Owner']) > > f.index_html._setPortalTypeName( 'Document' ) > - > - # Overcome an apparent catalog bug. > f.index_html.reindexObject() > - wftool = getToolByName( f, 'portal_workflow' ) > - wftool.notifyCreated( f.index_html ) > + f.index_html.notifyWorkflowCreated() God this is ugly, we shouldn't have to do TypesTool's work here either. I hope I can work on it. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From andy@agmweb.ca Mon Jun 23 16:44:47 2003 From: andy@agmweb.ca (Andy McKay) Date: Mon, 23 Jun 2003 08:44:47 -0700 Subject: [Zope-CMF] Re: available properties for .metadata file in CMF 1.4? In-Reply-To: <3EF6F3B9.4000506@dioceseonline.com> References: <3EF39758.1050104@agmweb.ca> <3EF6F3B9.4000506@dioceseonline.com> Message-ID: <3EF7206F.9000508@agmweb.ca> > Thanks, Andy. That covers them all, I take it? For security settings, > one can enable and disable role permissions? To do that, would I need > two lines, or can it be done in one? Would I define it as follows: > > Access contents information = 1:Manager > Access contents information = 0:Member,Reviewer,Anonymous Eh? That makes no sense mate. Think of it as directly reflecting the security tab you see in the ZMI To me this says have acquire permissions be both one and zero (obviously a problem) and give permission to Manager, Memeber, Reviewer and Anonymous. Think what you would have in the security tab and put it in the code. -- Andy McKay http://www.agmweb.ca From fg@nuxeo.com Mon Jun 23 17:36:02 2003 From: fg@nuxeo.com (Florent Guillaume) Date: 23 Jun 2003 18:36:02 +0200 Subject: [Zope-CMF] Re: [CMF-checkins] CVS: CMF/CMFCore - FSMetadata.py:1.5 In-Reply-To: <3EF727A9.8040102@agmweb.ca> References: <20030623154241.GA10682@flo.in.nuxeo.com> <3EF727A9.8040102@agmweb.ca> Message-ID: <1056386161.24345.4.camel@twin.in.efge.org> On Mon, 2003-06-23 at 18:15, Andy McKay wrote: > > Also, why did you add another bare except:? Surely only specific > > exceptions are useful. > > They are but there are so many exceptions that I know of that > ConfigParser can through I did the next useful thing, if a error is > raised tell the world about it. They seem to all be subclasses of ConfigParser.Error, besides ValueError. > The problem is that an error here would go upstream and was fail without > telling anyone, thats really bad. Guess it depends upon the attitude :) I have no problem with logging stuff. > That patch was over a month ago mate, so one of us would have to go and > recreate this to find why it was failing without raising an error or > logging to anything. I'd try to recreate it if I knew the specifics of the errors you encountered. As it is, I'll mark on my todo list to try and revisit this. I hate bare excepts. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From andy@agmweb.ca Mon Jun 23 17:15:37 2003 From: andy@agmweb.ca (Andy McKay) Date: Mon, 23 Jun 2003 09:15:37 -0700 Subject: [Zope-CMF] Re: [CMF-checkins] CVS: CMF/CMFCore - FSMetadata.py:1.5 In-Reply-To: <20030623154241.GA10682@flo.in.nuxeo.com> References: <20030623154241.GA10682@flo.in.nuxeo.com> Message-ID: <3EF727A9.8040102@agmweb.ca> > Also, why did you add another bare except:? Surely only specific > exceptions are useful. They are but there are so many exceptions that I know of that ConfigParser can through I did the next useful thing, if a error is raised tell the world about it. The problem is that an error here would go upstream and was fail without telling anyone, thats really bad. Guess it depends upon the attitude :) That patch was over a month ago mate, so one of us would have to go and recreate this to find why it was failing without raising an error or logging to anything. -- Andy McKay http://www.agmweb.ca From andy@agmweb.ca Mon Jun 23 18:08:51 2003 From: andy@agmweb.ca (Andy McKay) Date: Mon, 23 Jun 2003 10:08:51 -0700 Subject: [Zope-CMF] Re: [CMF-checkins] CVS: CMF/CMFCore - FSMetadata.py:1.5 In-Reply-To: <1056386161.24345.4.camel@twin.in.efge.org> References: <20030623154241.GA10682@flo.in.nuxeo.com> <3EF727A9.8040102@agmweb.ca> <1056386161.24345.4.camel@twin.in.efge.org> Message-ID: <3EF73423.2070005@agmweb.ca> > I'd try to recreate it if I knew the specifics of the errors you > encountered. As it is, I'll mark on my todo list to try and revisit > this. I hate bare excepts. There's a lot of them in Zope code to hate :) I'll try to recreate and track down the *real* problem now I have slightly more time. -- Andy McKay http://www.agmweb.ca From schubbe@web.de Mon Jun 23 18:27:25 2003 From: schubbe@web.de (Yuppie) Date: Mon, 23 Jun 2003 19:27:25 +0200 Subject: [Zope-CMF] Re: [CMF-checkins] CVS: CMF/CMFDefault - MembershipTool.py:1.35.2.1 In-Reply-To: <20030623154819.GA10692@flo.in.nuxeo.com> References: <200305291440.h4TEeT014471@cvs.baymountain.com> <20030623154819.GA10692@flo.in.nuxeo.com> Message-ID: <3EF7387D.6010506@web.de> Hi Florent! Florent Guillaume wrote: >>+ # Note: We can't use getAuthenticatedMember() and getMemberById() >>+ # because they might be wrapped by MemberDataTool. > > > Why is that a problem ? changeOwnership() doesn't work with full wrapped users, because the path of these users points to the MemberDataTool and not to acl_users. If we would hide Ownership completely from the portal user, there would be no need at all to change Ownership. Changing Ownership is also an unresolved issue with the new createMemberContent hook. See also >>+ # Note: We can't use invokeFactory() to add folder and content because >>+ # the user might not have the necessary permissions. >>+ >>+ # Create Member's home folder. >>+ members.manage_addPortalFolder(id=member_id, >>+ title="%s's Home" % member_id) >>+ f = getattr(members, member_id) > > > It would be nice if the portal type of the folder was customizable too. > And properly in the workflows. I know I need this for CPS. This would +0 I think in the long run, CMFDefault MembershipTool should inherit createMemberarea() from CMFCore. Right now there is a lot of redundant code. That would mean: - adding getMembersFolder() to CMFCore MembershipTool (Tres did want to have this only in CMFDefault, but maybe he could live with a hardcoded getMembersFolder method in CMFCore) - if there is no createMemberContent script, createMemberarea() has to do the same as the old CMFCore createMemberarea() did. (I didn't make the folder customizable to keep this in sync) I think createMemberarea() should always create a Memberarea, but maybe there is a good solution to make this customizable. As a workaround, you can delete the default Folder and add another using the script. >> f.index_html._setPortalTypeName( 'Document' ) >>- >>- # Overcome an apparent catalog bug. >> f.index_html.reindexObject() >>- wftool = getToolByName( f, 'portal_workflow' ) >>- wftool.notifyCreated( f.index_html ) >>+ f.index_html.notifyWorkflowCreated() > > > God this is ugly, we shouldn't have to do TypesTool's work here either. > I hope I can work on it. +1 Would be great! Cheers, Yuppie From tseaver@zope.com Mon Jun 23 18:37:07 2003 From: tseaver@zope.com (Tres Seaver) Date: 23 Jun 2003 13:37:07 -0400 Subject: [Zope-CMF] Re: [CMF-checkins] CVS: CMF/CMFCore - FSMetadata.py:1.5 In-Reply-To: <3EF73423.2070005@agmweb.ca> References: <20030623154241.GA10682@flo.in.nuxeo.com> <3EF727A9.8040102@agmweb.ca> <1056386161.24345.4.camel@twin.in.efge.org> <3EF73423.2070005@agmweb.ca> Message-ID: <1056389828.20749.53.camel@beauty> On Mon, 2003-06-23 at 13:08, Andy McKay wrote: > > I'd try to recreate it if I knew the specifics of the errors you > > encountered. As it is, I'll mark on my todo list to try and revisit > > this. I hate bare excepts. > > There's a lot of them in Zope code to hate :) I'll try to recreate and > track down the *real* problem now I have slightly more time. Bare excepts in Zope are particularly nasty, because they swallow ConflictErrors; in any currently-released Zope, such ill-mannered behavior can lead to transactions which commit using inconsistent data. I would vote for disabling 'except:' altogether in TTW code, and would make 'ConflictError' and all its bases inaccessible from TTW code as well (there is *no way* TTW code can know enough to do the Right Thing in the face of a conflict error; most filesystem code can't either, but we "trust" those authors :( ). For even more bonus points, we could remove Exception as a base class for the POSErrors (make a pool first on how many new bugs we inject). Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From gerry@dioceseonline.com Mon Jun 23 18:42:49 2003 From: gerry@dioceseonline.com (Gerry Kirk) Date: Mon, 23 Jun 2003 13:42:49 -0400 Subject: [Zope-CMF] Re: available properties for .metadata file in CMF 1.4? In-Reply-To: <3EF7206F.9000508@agmweb.ca> References: <3EF39758.1050104@agmweb.ca> <3EF6F3B9.4000506@dioceseonline.com> <3EF7206F.9000508@agmweb.ca> Message-ID: <3EF73C19.5040007@dioceseonline.com> Andy McKay wrote: >> Thanks, Andy. That covers them all, I take it? For security settings, >> one can enable and disable role permissions? To do that, would I need >> two lines, or can it be done in one? Would I define it as follows: >> >> Access contents information = 1:Manager >> Access contents information = 0:Member,Reviewer,Anonymous > > > Eh? That makes no sense mate. Think of it as directly reflecting the > security tab you see in the ZMI > > To me this says have acquire permissions be both one and zero (obviously > a problem) and give permission to Manager, Memeber, Reviewer and Anonymous. > > Think what you would have in the security tab and put it in the code. What purpose does the '1' have then? So, if I don't include a role in the list, then that implies that they don't have permission? Sorry if I'm being a little dense here. Gerry > -- > Andy McKay > http://www.agmweb.ca > From gerry@dioceseonline.com Mon Jun 23 18:42:49 2003 From: gerry@dioceseonline.com (Gerry Kirk) Date: Mon, 23 Jun 2003 13:42:49 -0400 Subject: [Zope-CMF] Re: available properties for .metadata file in CMF 1.4? In-Reply-To: <3EF7206F.9000508@agmweb.ca> References: <3EF39758.1050104@agmweb.ca> <3EF6F3B9.4000506@dioceseonline.com> <3EF7206F.9000508@agmweb.ca> Message-ID: <3EF73C19.5040007@dioceseonline.com> Andy McKay wrote: >> Thanks, Andy. That covers them all, I take it? For security settings, >> one can enable and disable role permissions? To do that, would I need >> two lines, or can it be done in one? Would I define it as follows: >> >> Access contents information = 1:Manager >> Access contents information = 0:Member,Reviewer,Anonymous > > > Eh? That makes no sense mate. Think of it as directly reflecting the > security tab you see in the ZMI > > To me this says have acquire permissions be both one and zero (obviously > a problem) and give permission to Manager, Memeber, Reviewer and Anonymous. > > Think what you would have in the security tab and put it in the code. What purpose does the '1' have then? So, if I don't include a role in the list, then that implies that they don't have permission? Sorry if I'm being a little dense here. Gerry > -- > Andy McKay > http://www.agmweb.ca > From andy@agmweb.ca Mon Jun 23 19:08:01 2003 From: andy@agmweb.ca (Andy McKay) Date: Mon, 23 Jun 2003 11:08:01 -0700 Subject: [Zope-CMF] Re: available properties for .metadata file in CMF 1.4? In-Reply-To: <3EF73C19.5040007@dioceseonline.com> References: <3EF39758.1050104@agmweb.ca> <3EF6F3B9.4000506@dioceseonline.com> <3EF7206F.9000508@agmweb.ca> <3EF73C19.5040007@dioceseonline.com> Message-ID: <3EF74201.7010900@agmweb.ca> > What purpose does the '1' have then? 1 is for acquistion being turned on (the check box on the far left in the security tab) > So, if I don't include a role in the list, then that implies that they > don't have permission? Depending upon acquistion, yes. -- Andy McKay http://www.agmweb.ca From fg@nuxeo.com Mon Jun 23 19:15:11 2003 From: fg@nuxeo.com (Florent Guillaume) Date: 23 Jun 2003 20:15:11 +0200 Subject: [Zope-CMF] Re: [CMF-checkins] CVS: CMF/CMFDefault - MembershipTool.py:1.35.2.1 In-Reply-To: <3EF7387D.6010506@web.de> References: <200305291440.h4TEeT014471@cvs.baymountain.com> <20030623154819.GA10692@flo.in.nuxeo.com> <3EF7387D.6010506@web.de> Message-ID: <1056392111.24346.15.camel@twin.in.efge.org> Hi, On Mon, 2003-06-23 at 19:27, Yuppie wrote: > Florent Guillaume wrote: > >>+ # Note: We can't use getAuthenticatedMember() and getMemberById() > >>+ # because they might be wrapped by MemberDataTool. > > > > Why is that a problem ? > > changeOwnership() doesn't work with full wrapped users, because the path > of these users points to the MemberDataTool and not to acl_users. That's if you use a member (=wrapped user), but member.getUser() should return a normal user object whose acquisition path is correct, and you can use that. > If we would hide Ownership completely from the portal user, there would > be no need at all to change Ownership. Changing Ownership is also an > unresolved issue with the new createMemberContent hook. > > See also > > >>+ # Note: We can't use invokeFactory() to add folder and content because > >>+ # the user might not have the necessary permissions. > >>+ > >>+ # Create Member's home folder. > >>+ members.manage_addPortalFolder(id=member_id, > >>+ title="%s's Home" % member_id) > >>+ f = getattr(members, member_id) > > > > > > It would be nice if the portal type of the folder was customizable too. > > And properly in the workflows. I know I need this for CPS. This would > > +0 > > I think in the long run, CMFDefault MembershipTool should inherit > createMemberarea() from CMFCore. Right now there is a lot of redundant code. > > That would mean: > > - adding getMembersFolder() to CMFCore MembershipTool > (Tres did want to have this only in CMFDefault, but maybe he could live > with a hardcoded getMembersFolder method in CMFCore) > > - if there is no createMemberContent script, createMemberarea() has to > do the same as the old CMFCore createMemberarea() did. > (I didn't make the folder customizable to keep this in sync) > > I think createMemberarea() should always create a Memberarea, but maybe > there is a good solution to make this customizable. > As a workaround, you can delete the default Folder and add another using > the script. Hmmm, right, I think in CPS we need to subclass the membership tool in any case so we can do whatever we want. > >> f.index_html._setPortalTypeName( 'Document' ) > >>- > >>- # Overcome an apparent catalog bug. > >> f.index_html.reindexObject() > >>- wftool = getToolByName( f, 'portal_workflow' ) > >>- wftool.notifyCreated( f.index_html ) > >>+ f.index_html.notifyWorkflowCreated() > > > > > > God this is ugly, we shouldn't have to do TypesTool's work here either. > > I hope I can work on it. > > +1 > > Would be great! Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From fg@nuxeo.com Mon Jun 23 19:18:09 2003 From: fg@nuxeo.com (Florent Guillaume) Date: 23 Jun 2003 20:18:09 +0200 Subject: [Zope-CMF] Re: [CMF-checkins] CVS: CMF/CMFCore - FSMetadata.py:1.5 In-Reply-To: <1056389828.20749.53.camel@beauty> References: <20030623154241.GA10682@flo.in.nuxeo.com> <3EF727A9.8040102@agmweb.ca> <1056386161.24345.4.camel@twin.in.efge.org> <3EF73423.2070005@agmweb.ca> <1056389828.20749.53.camel@beauty> Message-ID: <1056392288.24346.19.camel@twin.in.efge.org> On Mon, 2003-06-23 at 19:37, Tres Seaver wrote: > On Mon, 2003-06-23 at 13:08, Andy McKay wrote: > > > I'd try to recreate it if I knew the specifics of the errors you > > > encountered. As it is, I'll mark on my todo list to try and revisit > > > this. I hate bare excepts. > > > > There's a lot of them in Zope code to hate :) I'll try to recreate and > > track down the *real* problem now I have slightly more time. > > Bare excepts in Zope are particularly nasty, because they swallow > ConflictErrors; in any currently-released Zope, such ill-mannered > behavior can lead to transactions which commit using inconsistent data. > > I would vote for disabling 'except:' altogether in TTW code, and would > make 'ConflictError' and all its bases inaccessible from TTW code as > well (there is *no way* TTW code can know enough to do the Right Thing > in the face of a conflict error; most filesystem code can't either, but > we "trust" those authors :( ). Except for TTW code that wishes to do: try: somestuff() except ConflictError: raise except: raise ValueError("check your values bob") But that's still quite bad. > For even more bonus points, we could remove Exception as a base class > for the POSErrors (make a pool first on how many new bugs we inject). > > Tres. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From tseaver@zope.com Mon Jun 23 20:00:03 2003 From: tseaver@zope.com (Tres Seaver) Date: 23 Jun 2003 15:00:03 -0400 Subject: [Zope-CMF] Re: [CMF-checkins] CVS: CMF/CMFCore - FSMetadata.py:1.5 In-Reply-To: <1056392288.24346.19.camel@twin.in.efge.org> References: <20030623154241.GA10682@flo.in.nuxeo.com> <3EF727A9.8040102@agmweb.ca> <1056386161.24345.4.camel@twin.in.efge.org> <3EF73423.2070005@agmweb.ca> <1056389828.20749.53.camel@beauty> <1056392288.24346.19.camel@twin.in.efge.org> Message-ID: <1056394803.20755.78.camel@beauty> On Mon, 2003-06-23 at 14:18, Florent Guillaume wrote: > On Mon, 2003-06-23 at 19:37, Tres Seaver wrote: > > On Mon, 2003-06-23 at 13:08, Andy McKay wrote: > > > > I'd try to recreate it if I knew the specifics of the errors you > > > > encountered. As it is, I'll mark on my todo list to try and revisit > > > > this. I hate bare excepts. > > > > > > There's a lot of them in Zope code to hate :) I'll try to recreate and > > > track down the *real* problem now I have slightly more time. > > > > Bare excepts in Zope are particularly nasty, because they swallow > > ConflictErrors; in any currently-released Zope, such ill-mannered > > behavior can lead to transactions which commit using inconsistent data. > > > > I would vote for disabling 'except:' altogether in TTW code, and would > > make 'ConflictError' and all its bases inaccessible from TTW code as > > well (there is *no way* TTW code can know enough to do the Right Thing > > in the face of a conflict error; most filesystem code can't either, but > > we "trust" those authors :( ). > > Except for TTW code that wishes to do: > try: > somestuff() > except ConflictError: > raise > except: > raise ValueError("check your values bob") > > But that's still quite bad. Right, because *every* bare except in TTW code should do that. I just finished a jihad in co-developed code where we went through and added such tourniquets, which sucked a lot. I would rather have TTW code be *unable* to catch a bare 'except:' at all. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From zope-tests@squishdot.org Tue Jun 24 00:11:09 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Tue, 24 Jun 2003 00:11:09 +0100 Subject: [Zope-CMF] Win32 Tests - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ---------------------------------------------------------------------- Ran 329 tests in 14.860s OK From ngps@netmemetic.com Tue Jun 24 04:04:37 2003 From: ngps@netmemetic.com (Ng Pheng Siong) Date: Tue, 24 Jun 2003 11:04:37 +0800 Subject: [Zope-CMF] Guest Book & News Item products Message-ID: <20030624030437.GA1037@vista.netmemetic.com> Hi, [ No response on zope@ so try here... ] I'm looking for the following Zope products: 1. Guest book. 2. News item, a la zope.org's. Searching zope.org didn't turn up (1). CMF looks like it has (2); is there a standalone one? TIA. Cheers. -- Ng Pheng Siong http://firewall.rulemaker.net -+- Manage Your Firewall Rulebase Changes http://www.post1.com/home/ngps -+- Open Source Python Crypto & SSL _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ----- End forwarded message ----- -- Ng Pheng Siong http://firewall.rulemaker.net -+- Manage Your Firewall Rulebase Changes http://www.post1.com/home/ngps -+- Open Source Python Crypto & SSL From zope-tests@squishdot.org Tue Jun 24 04:03:33 2003 From: zope-tests@squishdot.org (zope-tests@squishdot.org) Date: Tue, 24 Jun 2003 04:03:33 +0100 Subject: [Zope-CMF] Linux Test Results - CMF - OK :-) Message-ID: ====================================================================== Python Version:2.1.3 (#1, May 20 2002, 12:02:16) [GCC 2.95.2 20000220 (Debian GNU/Linux)] Modules included: Zope (Zope-2_6-branch) CMF (HEAD) ......................................................................................................................................................................................................................................................................................................................................... ---------------------------------------------------------------------- Ran 329 tests in 33.459s OK From dieter@handshake.de Mon Jun 23 18:07:46 2003 From: dieter@handshake.de (Dieter Maurer) Date: Mon, 23 Jun 2003 19:07:46 +0200 Subject: [Zope-CMF] Objects in portal_skins In-Reply-To: References: Message-ID: <16119.13282.484397.531135@gargle.gargle.HOWL> Bert Vanderbauwhede wrote at 2003-6-23 16:40 +0200: > How can I check if an object is (physically) located in portal_skins? I use the "Find" tab in "portal_skins" for this purpose. Dieter From dieter@handshake.de Mon Jun 23 18:04:20 2003 From: dieter@handshake.de (Dieter Maurer) Date: Mon, 23 Jun 2003 19:04:20 +0200 Subject: [Zope-CMF] Search results with portal_catalog - need a strategy In-Reply-To: References: <16118.9809.719854.691893@gargle.gargle.HOWL> Message-ID: <16119.13076.665871.905603@gargle.gargle.HOWL> Peter McMillan wrote at 2003-6-22 16:35 -0700: > I've made the suggested changes to the indexes and updated the catalog. I'm > still getting a set of results for _all_ documents. When a catalog search returns all documents, this usually means that the indexes have not been recognized. In this case, the search has the effect of an empty search with returns all documents. When I remember right, the mentioned bug returned all documents when a keyword index did not recognize any of the supplied keywords. You must search the mailing list archives to verify my memory ;-) I (in your place) would use a debugger to find out why the catalog returns apparently wrong results. Dieter From Michael.Lindig@informatik.tu-chemnitz.de Tue Jun 24 05:53:04 2003 From: Michael.Lindig@informatik.tu-chemnitz.de (Michael Lindig) Date: Tue, 24 Jun 2003 06:53:04 +0200 Subject: [Zope-CMF] Question to navigation_tree_builder.py and navigation_tree_slot.pt Message-ID: Hi, I have following question: Isn't it better to use the permission 'Access contents information' and 'View' instead of rolesSeeContentsView for decission of which items are visible in navigation slot? If the navigation slot checks only for permissions (not for roles) then it would be better to hide some content for specific users. Is it a good feature request for plone? Michael From Bert.Vanderbauwhede@UGent.be Tue Jun 24 06:31:38 2003 From: Bert.Vanderbauwhede@UGent.be (Bert Vanderbauwhede) Date: Tue, 24 Jun 2003 07:31:38 +0200 (MEST) Subject: [Zope-CMF] Objects in portal_skins In-Reply-To: <16119.13282.484397.531135@gargle.gargle.HOWL> References: <16119.13282.484397.531135@gargle.gargle.HOWL> Message-ID: On Mon, 23 Jun 2003, Dieter Maurer wrote: > Bert Vanderbauwhede wrote at 2003-6-23 16:40 +0200: > > How can I check if an object is (physically) located in portal_skins? > > I use the "Find" tab in "portal_skins" for this purpose. I was thinking of something I could use as a test in a script or template. Methods like absolute_url() give me no indication if an object is located in portal_skins or one of its subfolders. Bert Vanderbauwhede... --- "What good is a movie titled 'Matrix' with no decent transforms. I at least expected an eigenvector or two somewhere in there. Pshaw." From gitte@mmmanager.org Tue Jun 24 13:44:08 2003 From: gitte@mmmanager.org (Gitte Wange) Date: Tue, 24 Jun 2003 14:44:08 +0200 Subject: [Zope-CMF] Objects in portal_skins In-Reply-To: References: <16119.13282.484397.531135@gargle.gargle.HOWL> Message-ID: <200306241444.08515.gitte@mmmanager.org> Tirsdag 24 juni 2003 07:31 skrev Bert Vanderbauwhede: > On Mon, 23 Jun 2003, Dieter Maurer wrote: > > Bert Vanderbauwhede wrote at 2003-6-23 16:40 +0200: > > > How can I check if an object is (physically) located in portal_skins? > > > > I use the "Find" tab in "portal_skins" for this purpose. > > I was thinking of something I could use as a test in a script or template. > Methods like absolute_url() give me no indication if an object is located > in portal_skins or one of its subfolders. > > > Bert Vanderbauwhede... Hi Bert, I have some code I use to find objects that are not cataloged by portal_catalog. It looks like this: portal = getToolByName(self, 'portal_url').getPortalObject() findres = self.PrincipiaFind(portal, obj_metatypes=self.listLayoutTypes(), search_sub=1) res = [] for findtuple in findres: parent = findtuple[0] obj = findtuple[1] res.append(obj) return res Instead of the portal object you should use the portal_skins object And then insert the meta_type of the PageTemplate .. Hope it helps ... -- Gitte Wange Technical Manager Email: gitte@mmmanager.org Web: http://www.mmmanager.org Tlf: +45 36 46 20 02 This guy is quite far up his own arse :-) -- Chris Withers on an article "Why Not Zope?", 30 Nov 2000 From fg@nuxeo.com Tue Jun 24 14:43:47 2003 From: fg@nuxeo.com (Florent Guillaume) Date: Tue, 24 Jun 2003 15:43:47 +0200 Subject: [Zope-CMF] Store development with CMF (new guy) In-Reply-To: <1054309420.1840.21.camel@beauty> References: <3ED3DACB.3090201@zope.com> Message-ID: <20030624134347.GA8279@flo.in.nuxeo.com> In article <1054309420.1840.21.camel@beauty> you write: > > No, it never was. But now that I look at RegistrationTool, I see that > > someone removed the method for setting member properties! Yet it was > > left in the interface. I'm sure someone meant well, but this is not > > what was intended. The loss of that method means you really do have to > > access the memberdata tool directly. :-( > > The registration tool won't be present either, on sites which do not > allow through-the-web registration. If we consider the memberdata tool > to be a private detail of the membership tool, then we must extend the > contract of the membership tool (*not* the registration tool) to allow > setting properties (getting them is already done by the member object > fetched via 'wrapUser'). Yes, and we must extend it to discover the list of available properties too (someone already mentionned it in this thread). This is something which is currently done with portal_memberdata.propertyIds() and which frankly I don't see as a problem -- the contract of portal_memberdata is to manage members' data, if the underlying user folder gives the user properties of its own then portal_memberdata should make them available transparently. I don't see why this tool should be a private implementation detail of portal_membership, even if it's how it was originally designed. Also, the search API of portal_membership is woefully inadequate, I'd like to propose that it be extended at least to a multicriteria search. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From fg@nuxeo.com Tue Jun 24 15:02:48 2003 From: fg@nuxeo.com (Florent Guillaume) Date: Tue, 24 Jun 2003 16:02:48 +0200 Subject: [Zope-CMF] DCWorkflow patch: A couple of docstrings .. In-Reply-To: <3DEF17F2.4090002@upfrontsystems.co.za> Message-ID: <20030624140248.GA8958@flo.in.nuxeo.com> (Late :-) Thanks, I checked in most of this, and other cleanups. Florent In article <3DEF17F2.4090002@upfrontsystems.co.za> you write: > -=-=-=-=-=- > > Hi there > > Here's a patch to add a couple of docstrings to States.py > > -- > Jean Jordaan > http://www.upfrontsystems.co.za > > -=-=-=-=-=- > > --- DCWorkflow/States.py~ Tue Dec 3 09:38:36 2002 > +++ DCWorkflow/States.py Thu Dec 5 10:46:12 2002 > @@ -132,12 +132,12 @@ > return vv.items() > > def getWorkflowVariables(self): > - ''' get all variables that are available form > + ''' get all variables that are available from > workflow and not handled yet. > ''' > wf_vars = self.getAvailableVarIds() > if self.var_values is None: > - return wf_vars > + return wf_vars > ret = [] > for vid in wf_vars: > if not self.var_values.has_key(vid): > @@ -185,7 +185,7 @@ > _permissions_form = DTMLFile('state_permissions', _dtmldir) > > def manage_permissions(self, REQUEST, manage_tabs_message=None): > - ''' > + ''' Present TTW UI for managing a State's permissions. > ''' > > return self._permissions_form(REQUEST, > @@ -194,8 +194,8 @@ > ) > > def setPermissions(self, REQUEST): > - ''' Form action of './dtml/state_permissions.dtml'. Sets > - all managed permissions for all the roles. > + ''' Form action of _permissions_form. Sets all managed > + permissions for all the roles. > ''' > pr = self.permission_roles > if pr is None: > @@ -212,7 +213,8 @@ > return self.manage_permissions(REQUEST, 'Permissions changed.') > > def setPermission(self, permission, acquired, roles): > - ''' > + ''' Used as DCWorkflow API. Sets one permission at a time for > + specific roles. > ''' > pr = self.permission_roles > if pr is None: > > -=-=-=-=-=- -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From fg@nuxeo.com Tue Jun 24 15:06:11 2003 From: fg@nuxeo.com (Florent Guillaume) Date: Tue, 24 Jun 2003 16:06:11 +0200 Subject: [Zope-CMF] Calling context.setTitle() doesn't work when you're not a Manager In-Reply-To: <1043247196.20751.22.camel@beauty> References: <55360F67A4EAD611B38F00B0D0D1AC6B207855@UXSTAFF.resource.rmcs.cranfield.ac.uk> <55360F67A4EAD611B38F00B0D0D1AC6B207855@UXSTAFF.resource.rmcs.cranfield.ac.uk> Message-ID: <20030624140611.GA8968@flo.in.nuxeo.com> A long time ago Tres wrote: > On Wed, 2003-01-22 at 09:27, Slade Mrs A wrote: > > Calling context.setTitle() doesn't work when you're not a Manager. I get > > the following error: Unauthorized: You are not allowed to access setTitle > > in this context > > > > I tried giving the script a Proxy role of Manager but that didn't help, why? > > (FYI, I am trying to execute my script on a 'Skinned Folder'). > > SkinnedFolder's 'setTitle' comes from PortalFolder, where it is > protected by the "Manage Properties"; as a workaround, you could give > that permission to the "Owner" role. > > This is likely a bug, as SkinnedFolder is supposed to be "content", > rather than "site structure" (PortalFolders normally make up the > structure of the site, and hence had a different permission guarding > their metadata than "ordinary" content). How about adding DefaultDublinCoreImpl to SkinnedFolder's base classes ? Would that pose a problem to anyone ? I think it's the right thing here. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From fg@nuxeo.com Tue Jun 24 15:14:31 2003 From: fg@nuxeo.com (Florent Guillaume) Date: Tue, 24 Jun 2003 16:14:31 +0200 Subject: [Zope-CMF] bug in CMFCore/PortalFolder.py or content/folder_edit.py In-Reply-To: Message-ID: <20030624141431.GA8992@flo.in.nuxeo.com> [From last February] In article you write: > Version: 1.3.1 beta 1 > > When you edit a portal folder, clicking Change and View causes > folder_edit.py to set this as the target action: > > target_action = context.getTypeInfo().getActionById('view') > context.REQUEST.RESPONSE.redirect(%s/%s?%s' % (context.absolute_url(), > target_action, > qst)) > > This means the resulting url is: > > folder_name/?portal_status_message=message > > Instead of: > > folder_name/folder_contents?portal_status_message=message > > Is that intended? In part, yes. Folders have a view mode and a contents mode that are different. Change and View here is rightly named, even if most of the time you'd like to go to folder_contents. The problem is that PortalFolder doesn't have a "folderContents" action that would give us "folder_contents". The link to folder_contents in the actions box is provided by the global Actions Tool (urgh). A way to clean this up would be to have the Actions Tool provide a "folderContents" action only if folder is not object, and in the case of folder is object let the folder's Type actions provide that action. The problem, again, would be backward compat... Not a big problem here I guess. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From tseaver@zope.com Tue Jun 24 15:09:40 2003 From: tseaver@zope.com (Tres Seaver) Date: 24 Jun 2003 10:09:40 -0400 Subject: [Zope-CMF] Calling context.setTitle() doesn't work when you're not a Manager In-Reply-To: <20030624140611.GA8968@flo.in.nuxeo.com> References: <55360F67A4EAD611B38F00B0D0D1AC6B207855@UXSTAFF.resource.rmcs.cranfield.ac.u k> <55360F67A4EAD611B38F00B0D0D1AC6B207855@UXSTAFF.resource.rmcs.cranfield.ac.u k> <20030624140611.GA8968@flo.in.nuxeo.com> Message-ID: <1056463781.22224.2.camel@beauty> On Tue, 2003-06-24 at 10:06, Florent Guillaume wrote: > A long time ago Tres wrote: > > On Wed, 2003-01-22 at 09:27, Slade Mrs A wrote: > > > Calling context.setTitle() doesn't work when you're not a Manager. I get > > > the following error: Unauthorized: You are not allowed to access setTitle > > > in this context > > > > > > I tried giving the script a Proxy role of Manager but that didn't help, why? > > > (FYI, I am trying to execute my script on a 'Skinned Folder'). > > > > SkinnedFolder's 'setTitle' comes from PortalFolder, where it is > > protected by the "Manage Properties"; as a workaround, you could give > > that permission to the "Owner" role. > > > > This is likely a bug, as SkinnedFolder is supposed to be "content", > > rather than "site structure" (PortalFolders normally make up the > > structure of the site, and hence had a different permission guarding > > their metadata than "ordinary" content). > > How about adding DefaultDublinCoreImpl to SkinnedFolder's base classes ? > Would that pose a problem to anyone ? > I think it's the right thing here. Another option would be to add a new content class, ContentFolder, which mixed in the two items. It might be a good candidate for the cataloguing stuff, as well. I would actually prefer to be able to build a site entirely without PortalFolder, because I no longer find its "acquire index_html" behavior useful anywhere. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From fg@nuxeo.com Tue Jun 24 15:23:56 2003 From: fg@nuxeo.com (Florent Guillaume) Date: Tue, 24 Jun 2003 16:23:56 +0200 Subject: [Zope-CMF] Calling context.setTitle() doesn't work when you're not a Manager In-Reply-To: <1056463781.22224.2.camel@beauty> References: <55360F67A4EAD611B38F00B0D0D1AC6B207855@UXSTAFF.resource.rmcs.cranfield.ac.u k> <55360F67A4EAD611B38F00B0D0D1AC6B207855@UXSTAFF.resource.rmcs.cranfield.ac.u k> <20030624140611.GA8968@flo.in.nuxeo.com> <1056463781.22224.2.camel@beauty> Message-ID: <3EF85EFC.4060408@nuxeo.com> Tres Seaver wrote: >>How about adding DefaultDublinCoreImpl to SkinnedFolder's base classes ? >>Would that pose a problem to anyone ? >>I think it's the right thing here. > > > Another option would be to add a new content class, ContentFolder, which > mixed in the two items. It might be a good candidate for the > cataloguing stuff, as well. I would actually prefer to be able to build > a site entirely without PortalFolder, because I no longer find its > "acquire index_html" behavior useful anywhere. That works too, and indeed is cleaner. We're talking about CMFCore here, right ? Would PortalContentFolder be a good name then, to follow the Portal prefix ? ContentFolder is ok too if you prefer. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From tseaver@zope.com Tue Jun 24 15:27:35 2003 From: tseaver@zope.com (Tres Seaver) Date: 24 Jun 2003 10:27:35 -0400 Subject: [Zope-CMF] Calling context.setTitle() doesn't work when you're not a Manager In-Reply-To: <3EF85EFC.4060408@nuxeo.com> References: <55360F67A4EAD611B38F00B0D0D1AC6B207855@UXSTAFF.resource.rmcs.cranfield.ac.u k> <55360F67A4EAD611B38F00B0D0D1AC6B207855@UXSTAFF.resource.rmcs.cranfield. ac.u k> <20030624140611.GA8968@flo.in.nuxeo.com> <1056463781.22224.2.camel@beauty> <3EF85EFC.4060408@nuxeo.com> Message-ID: <1056464856.22254.11.camel@beauty> On Tue, 2003-06-24 at 10:23, Florent Guillaume wrote: > Tres Seaver wrote: > >>How about adding DefaultDublinCoreImpl to SkinnedFolder's base classes ? > >>Would that pose a problem to anyone ? > >>I think it's the right thing here. > > > > > > Another option would be to add a new content class, ContentFolder, which > > mixed in the two items. It might be a good candidate for the > > cataloguing stuff, as well. I would actually prefer to be able to build > > a site entirely without PortalFolder, because I no longer find its > > "acquire index_html" behavior useful anywhere. > > That works too, and indeed is cleaner. > We're talking about CMFCore here, right ? SkinnedFolder is in CMFDefault, n'est-ce pas? > Would PortalContentFolder be a good name then, to follow the Portal > prefix ? ContentFolder is ok too if you prefer. In CMFDefault, I would just call it 'ContentFolder'. Forward compatibility is a bit problematic here, because SkinnedFolder is likely already widely used for "content". What if we added a new class, 'DynamicFolder', which derived from PortalFolder and had the __call__ which is currently in SkinnedFolder? SkinnedFolder would then derive from DynamicFolder, instead of from PortalFolder, while still mixing in CMFCatalogAware, but also adding DefaultDublinCoreImpl. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From fg@nuxeo.com Tue Jun 24 16:03:29 2003 From: fg@nuxeo.com (Florent Guillaume) Date: Tue, 24 Jun 2003 17:03:29 +0200 Subject: [Zope-CMF] Calling context.setTitle() doesn't work when you're not a Manager In-Reply-To: <1056464856.22254.11.camel@beauty> References: <55360F67A4EAD611B38F00B0D0D1AC6B207855@UXSTAFF.resource.rmcs.cranfield.ac.u k> <55360F67A4EAD611B38F00B0D0D1AC6B207855@UXSTAFF.resource.rmcs.cranfield. ac.u k> <20030624140611.GA8968@flo.in.nuxeo.com> <1056463781.22224.2.camel@beauty> <3EF85EFC.4060408@nuxeo.com> <1056464856.22254.11.camel@beauty> Message-ID: <3EF86841.4000506@nuxeo.com> >>>>How about adding DefaultDublinCoreImpl to SkinnedFolder's base classes ? >>>>Would that pose a problem to anyone ? >>>>I think it's the right thing here. >>> >>> >>>Another option would be to add a new content class, ContentFolder, which >>>mixed in the two items. It might be a good candidate for the >>>cataloguing stuff, as well. I would actually prefer to be able to build >>>a site entirely without PortalFolder, because I no longer find its >>>"acquire index_html" behavior useful anywhere. >> >>That works too, and indeed is cleaner. >>We're talking about CMFCore here, right ? > > SkinnedFolder is in CMFDefault, n'est-ce pas? I thought it would be best two have the three base classes in CMFCore: PortalContent, PortalFolder and PortalContentFolder. But now a realize that if we mixin DefaultDublinCoreImpl it would have to live in CMFDefault. >>Would PortalContentFolder be a good name then, to follow the Portal >>prefix ? ContentFolder is ok too if you prefer. > > In CMFDefault, I would just call it 'ContentFolder'. Forward > compatibility is a bit problematic here, because SkinnedFolder is likely > already widely used for "content". What if we added a new class, > 'DynamicFolder', which derived from PortalFolder and had the __call__ > which is currently in SkinnedFolder? SkinnedFolder would then derive > from DynamicFolder, instead of from PortalFolder, while still mixing in > CMFCatalogAware, but also adding DefaultDublinCoreImpl. What's the problem with forward compat if we add a new class? I would even propose making SkinnedFolder thus: class SkinnedFolder(CMFCatalogAware, PortalFolder, PortalContent, DefaultDublinCoreImpl): PortalContent would then give us also SearchableText. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From dieter@handshake.de Tue Jun 24 19:04:23 2003 From: dieter@handshake.de (Dieter Maurer) Date: Tue, 24 Jun 2003 20:04:23 +0200 Subject: [Zope-CMF] Objects in portal_skins In-Reply-To: References: <16119.13282.484397.531135@gargle.gargle.HOWL> Message-ID: <16120.37543.603791.815621@gargle.gargle.HOWL> Bert Vanderbauwhede wrote at 2003-6-24 07:31 +0200: > On Mon, 23 Jun 2003, Dieter Maurer wrote: > > > Bert Vanderbauwhede wrote at 2003-6-23 16:40 +0200: > > > How can I check if an object is (physically) located in portal_skins? > > > > I use the "Find" tab in "portal_skins" for this purpose. > > I was thinking of something I could use as a test in a script or template. > Methods like absolute_url() give me no indication if an object is located > in portal_skins or one of its subfolders. Why do you need this? You may be able to combine "absolute_url" and "meta_type" to approximate your condition. Dieter From pw_lists@slinkp.com Tue Jun 24 22:54:37 2003 From: pw_lists@slinkp.com (Paul Winkler) Date: Tue, 24 Jun 2003 17:54:37 -0400 Subject: [Zope-CMF] Objects in portal_skins In-Reply-To: References: <16119.13282.484397.531135@gargle.gargle.HOWL> Message-ID: <20030624215436.GD2240@slinkp.com> On Tue, Jun 24, 2003 at 07:31:38AM +0200, Bert Vanderbauwhede wrote: > I was thinking of something I could use as a test in a script or template. > Methods like absolute_url() give me no indication if an object is located > in portal_skins or one of its subfolders. hmm, well if you put it that way i can't resist :) if foo.absolute_url().count("portal_skins"): ... -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's SPAZ GARGANTUAN SHROOM! (random hero from isometric.spaceninja.com) From peterm@ucsc.edu Tue Jun 24 23:49:21 2003 From: peterm@ucsc.edu (Peter McMillan) Date: Tue, 24 Jun 2003 15:49:21 -0700 Subject: [Zope-CMF] Search results with portal_catalog - need a strategy In-Reply-To: <16119.13076.665871.905603@gargle.gargle.HOWL> Message-ID: On 6/23/03 10:04 AM, "Dieter Maurer" wrote: [snip] > > I (in your place) would use a debugger to find out why the catalog > returns apparently wrong results. > > > Dieter > Dieter, I'll do the research in the list. I've just read 'the debugger is your friend' article. I'm new enough to not understand how to write the appropriate test case. I may need some additional help on that. Thanks, Peter From Bert.Vanderbauwhede@UGent.be Wed Jun 25 08:14:36 2003 From: Bert.Vanderbauwhede@UGent.be (Bert Vanderbauwhede) Date: Wed, 25 Jun 2003 09:14:36 +0200 (MEST) Subject: [Zope-CMF] Objects in portal_skins In-Reply-To: <20030624215436.GD2240@slinkp.com> References: <16119.13282.484397.531135@gargle.gargle.HOWL> <20030624215436.GD2240@slinkp.com> Message-ID: On Tue, 24 Jun 2003, Paul Winkler wrote: > On Tue, Jun 24, 2003 at 07:31:38AM +0200, Bert Vanderbauwhede wrote: > > I was thinking of something I could use as a test in a script or template. > > Methods like absolute_url() give me no indication if an object is located > > in portal_skins or one of its subfolders. > > hmm, well if you put it that way i can't resist :) > > if foo.absolute_url().count("portal_skins"): > ... Unfortunately, acquisition and skinning magic allows you to access objects in portal_skins without explicitly specifying the portal_skins in the path. And then your trick doesn't work. Bert Vanderbauwhede... --- "What good is a movie titled 'Matrix' with no decent transforms. I at least expected an eigenvector or two somewhere in there. Pshaw." From gitte@mmmanager.org Wed Jun 25 08:51:56 2003 From: gitte@mmmanager.org (Gitte Wange) Date: Wed, 25 Jun 2003 09:51:56 +0200 Subject: [Zope-CMF] Objects in portal_skins In-Reply-To: References: <20030624215436.GD2240@slinkp.com> Message-ID: <200306250951.56849.gitte@mmmanager.org> Onsdag 25 juni 2003 09:14 skrev Bert Vanderbauwhede: > On Tue, 24 Jun 2003, Paul Winkler wrote: > > On Tue, Jun 24, 2003 at 07:31:38AM +0200, Bert Vanderbauwhede wrote: > > > I was thinking of something I could use as a test in a script or > > > template. Methods like absolute_url() give me no indication if an > > > object is located in portal_skins or one of its subfolders. > > > > hmm, well if you put it that way i can't resist :) > > > > if foo.absolute_url().count("portal_skins"): > > ... > > Unfortunately, acquisition and skinning magic allows you to access objects > in portal_skins without explicitly specifying the portal_skins in the > path. And then your trick doesn't work. > > > Bert Vanderbauwhede... How about the code I sent you? Did that help ? -- Gitte Wange Technical Manager Email: gitte@mmmanager.org Web: http://www.mmmanager.org Tlf: +45 36 46 20 02 Everything is fine except I have about 8,564 questions about how to integrate the client side scripting, server side scripting, and all things in between. -- Joseph Griffin: Zope mailing list, Setting up Zope. From schubbe@web.de Wed Jun 25 10:35:37 2003 From: schubbe@web.de (Yuppie) Date: Wed, 25 Jun 2003 11:35:37 +0200 Subject: [Zope-CMF] [dev] Heads up! Landing Method Aliases tomorrow Message-ID: <3EF96CE9.5040905@web.de> Hi! If there are no objections, I'm going to merge yuppie-ti_aliases-branch into HEAD tomorrow. I think it's quite stable, but as always: Using CVS checkouts is on your own risk! Backup your data before upgrading. Known issues: 1.) If you have Cookie Crumbler (or other __before_traverse__ hook objects) inside an existing CMF Site, Method Aliases don't work straight-off. Workaround: cut&paste your Cookie Crumbler in place. That triggers re-registration. 2.) UI isn't finished, but it works. Need to add batch mode and Aliases tab for single Type Informations. Workaround: Use the Aliases tab of Types Tool and a big monitor. Please let me know if you run into other problems. Cheers, Yuppie From a.huizer@kennisnet.org Wed Jun 25 11:17:57 2003 From: a.huizer@kennisnet.org (Arjan Huizer) Date: Wed, 25 Jun 2003 12:17:57 +0200 Subject: [Zope-CMF] Portal Types: default action Message-ID: <9DEA5D491B2EF249A697F39431464F54D95BDA@kermit.kennisnet.org> Hi, I am using Zope 2.6.1 with CMF 1.3 on a Linux box. I have a question: = How does Zope/CMF determine what to send to the user when he visits a = URL like http://localhost/portal/myObject without a trailing method = added to it? How can this behaviour be changed? I am asking this because I have created a new portal_type and I want it = to be possible for users to point to objects based on my new portal type = and get the right method. So instead of = http://localhost/portal/myObject/news_view they will be able to type in = http://localhost/portal/myObject when for instance creating a link to = this object. Thanks in advance! Arjan Huijzer From fg@nuxeo.com Wed Jun 25 11:53:12 2003 From: fg@nuxeo.com (Florent Guillaume) Date: Wed, 25 Jun 2003 12:53:12 +0200 Subject: [Zope-CMF] [dev] type actions, views and aliases: a proposal In-Reply-To: <3EF2F01E.2090509@web.de> Message-ID: <20030625105312.GA10824@flo.in.nuxeo.com> Hi, I like the idea in principle, but have concerns with the way it's configured. Basically what you're having is, for each Action, a new property associated to it, let's call it traversal_alias. I would want this new field to be present in the Actions in the types tool, which is its natural place. I must say I've not followed that closely the refactoring of the Actions, and the semantics now associated to the actions field of an Action. Would you mind doing a short writeup of these semantics ? The way I understand them is: - the actions field is a full contextual URL, destined to the UI, - because _getViewFor and getActionById are used to find a method, they have to extract it from the above URL using a hack (passing a context-less expression-context, with an empty object_url and then stripping resulting the initial slash). If that's how it works, that's good for backward compat, but in CMF 1.5 I'd like to see: - an actions field that gets an URL, - a method field that gets a method name (suitable for restrictedTraverse), - and, to implement your proposal, a traverse_alias field. Really, these things are a component of the Action, so that's where they should live. Now it may be the case that Actions are not well designed to be extended, but I think the fix should be there. Note that there are other things I'd like to be able to add to Actions, for instance an icon name, an i18n msgid, etc. Florent In article <3EF2F01E.2090509@web.de> you write: > Hi! > > Today is my proposal day. Here is the second one: > > > Context / Problem > ================= > > I'm still not happy with the limitations for type actions caused by > getActionById and _getViewFor. > > _getViewFor is used by the view() method to return the default view. > > > The view method allows to add a simple +'/view' to urls. > > www.example.org/foo/view > > is an alias for > > www.example.org/foo/document_view > -or- > www.example.org/foo/newsitem_view > -or- > www.example.org/foo/whatever_the_default_view_is > > > But we can't get rid of these urls, because we can't use them in > actions. If we would add an action like that, > > { 'id':'view', > 'name':'View', > 'action':'string:${object_url}/view', > 'permissions':(View,) } > > there would be no way to find out that /view is an alias for > /document_view, because actions are currently used to look up these > method aliases. > > getActionById does something similar, so this is what I propose: > > > > Proposal / Solution > =================== > > I'd like to add a dictionary to TypeInformations that maps aliases to > methods and is configurable TTW. > > e.g. > {'view':'document_view', > 'edit':'document_edit_form', > 'metadata':'metadata_edit_form'} > > That might look like redundant information, because right now we can get > this information from the actions. But the need to store this > information inside actions limits the use of actions right now and makes > type actions different from other actions. > > getActionById and _getViewFor could use that dict instead of actions. In > fact they'll become useless: > > A __before_publishing_traverse__ in PortalContent could do the mapping. > That allows to always use the defined aliases, e.g.: > > www.example.org/foo/view > www.example.org/foo/edit > www.example.org/foo/metadata > > > > Any thoughts? Comments are welcome. > > > Cheers, > > Yuppie -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From schubbe@web.de Wed Jun 25 12:55:14 2003 From: schubbe@web.de (Yuppie) Date: Wed, 25 Jun 2003 13:55:14 +0200 Subject: [Zope-CMF] Re: [dev] type actions, views and aliases: a proposal In-Reply-To: <20030625105312.GA10824@flo.in.nuxeo.com> References: <3EF2F01E.2090509@web.de> <20030625105312.GA10824@flo.in.nuxeo.com> Message-ID: <3EF98DA2.3030901@web.de> Hi Florent, thanks for the feedback! Florent Guillaume wrote: [...] > Basically what you're having is, for each Action, a new property > associated to it, let's call it traversal_alias. I would want this new > field to be present in the Actions in the types tool, which is its > natural place. Well. I considered that, but I doubt it's its natural place. Method Aliases and Actions are related, but they are not the same. > I must say I've not followed that closely the refactoring of the > Actions, and the semantics now associated to the actions field of an > Action. Would you mind doing a short writeup of these semantics ? No need: > The way I understand them is: > > - the actions field is a full contextual URL, destined to the UI, Yes. > - because _getViewFor and getActionById are used to find a method, they > have to extract it from the above URL using a hack (passing a > context-less expression-context, with an empty object_url and then > stripping resulting the initial slash). Correct. The current implementation of this hack fails with some expressions, so the use of expressions in type actions is limited. > If that's how it works, that's good for backward compat, but in CMF 1.5 > I'd like to see: > > - an actions field that gets an URL, > - a method field that gets a method name (suitable for restrictedTraverse), > - and, to implement your proposal, a traverse_alias field. Yes. The only difference of opinion is where these fiels should be. [...] > Note that there are other things I'd like to be able to add to Actions, > for instance an icon name, an i18n msgid, etc. All these properties are related to UI usage. All these properties are needed to create an actions box (or something like that) in a template. Method Aliases are used on traversal. Method Aliases lookup should be fast, we can't resolve Action Expressions on each traversal step. There are Actions that are not related to a Method. There are Methods that are not related to an Action. One Method Alias can be used in many Actions, there can be many aliases for one Method used in an Action. I put the merge on hold until this is discussed. But maybe you want to checkout the current implementation from the branch. (Of course Method Aliases need a configuration tab for each TypeInfo, but I'll not add that before we agree about the basics.) Cheers, Yuppie From jo@meder.de Wed Jun 25 13:05:39 2003 From: jo@meder.de (Jo Meder) Date: Wed, 25 Jun 2003 14:05:39 +0200 Subject: [Zope-CMF] traverse_subpath and Filesystem Directory Views Message-ID: <20030625120539.GH11387@meder.de> Hello all! Just recently we stumbled across the following problem and up to now we haven't found a solution. Zope version does not seem to have an effect, we have checked with 2.6.1 and 2.6.2b1. We have not yet upgraded to CMF 1.4 though, perhaps this is fixed in 1.4? Anyway, here's the problem: We have this small Python Skript inside a CMF Skin that uses traverse_subpath to fetch some parameters. - working setup: If the skin-folder is located directly in the ZODB everything works fine. - problem setup: If the skin-folder is connected via a Filesystem Directory View any call to the skript with a subpath fails until we call the skript once without any subpath. - working example for usage in problem setup: Assume the skript is called "myskript". Directly after Zope startup we call 1) http://foo.bar.baz/somewhere/myskript 2) and after that http://foo.bar.baz/somewhere/myskript/something/other This works as expected. - failing example for usage in problem setup: Again assume the skript is called "myskript". Directly after Zope startup we call 1) http://foo.bar.baz/somewhere/myskript/something/other This consistently results in not found errors for /somewhere/myskript/something/other until the moment we again once call http://foo.bar.baz/somewhere/myskript Has anybody heard of such a behaviour and found a workaround or a solution for it. Thanks for any help! Jo. -- Internetmanufaktur Jo Meder ---------------------- Berlin, Germany http://www.meder.de/ ------------------- fon: ++49-30-417 17 63 33 Kollwitzstr. 75 ------------------------ fax: ++49-30-417 17 63 45 10435 Berlin --------------------------- mob: ++49-170- 2 98 89 97 Public GnuPG-Key ---------- http://www.meder.de/keys/jo-pubkey.txt From schubbe@web.de Wed Jun 25 13:16:25 2003 From: schubbe@web.de (Yuppie) Date: Wed, 25 Jun 2003 14:16:25 +0200 Subject: [Zope-CMF] Re: Portal Types: default action In-Reply-To: <9DEA5D491B2EF249A697F39431464F54D95BDA@kermit.kennisnet.org> References: <9DEA5D491B2EF249A697F39431464F54D95BDA@kermit.kennisnet.org> Message-ID: <3EF99299.5050908@web.de> Hi! Arjan Huizer wrote: > I am using Zope 2.6.1 with CMF 1.3 on a Linux box. I have a question: > How does Zope/CMF determine what to send to the user when he visits a > URL like http://localhost/portal/myObject without a trailing method > added to it? How can this behaviour be changed? CMF 1.3 and News Item: 1. Go to portal_types > News Item > Actions tab 2. Set 'view' Action to 'news_view' 3. Make sure the user has the Permission specified for this Action It's different with Folders and Files. See also the current dicussion about aliases. HTH, Yuppie From a.huizer@kennisnet.org Wed Jun 25 13:27:18 2003 From: a.huizer@kennisnet.org (Arjan Huizer) Date: Wed, 25 Jun 2003 14:27:18 +0200 Subject: [Zope-CMF] RE: Portal Types: default action Message-ID: <9DEA5D491B2EF249A697F39431464F54D3D7F7@kermit.kennisnet.org> Hi, >> It's different with Folders and Files. And that is the case. I have written a portal_type "Newsletter" that = uses PortalFolder as a base class. This newsletter type can only contain = Documents. My "view" action assembles all documents and creates a nice = HTML table.=20 Since I want my users to create links from other documents to this = newsletter I do not want them to have to include the method in the URL. Is this simple to solve? Thanks for your help so far! Arjan -----Oorspronkelijk bericht----- Van: Yuppie [mailto:schubbe@web.de] Verzonden: woensdag 25 juni 2003 14:16 Aan: Arjan Huizer; Zope-CMF List Onderwerp: Re: Portal Types: default action Hi! Arjan Huizer wrote: > I am using Zope 2.6.1 with CMF 1.3 on a Linux box. I have a question: > How does Zope/CMF determine what to send to the user when he visits a > URL like http://localhost/portal/myObject without a trailing method > added to it? How can this behaviour be changed? CMF 1.3 and News Item: 1. Go to portal_types > News Item > Actions tab 2. Set 'view' Action to 'news_view' 3. Make sure the user has the Permission specified for this Action It's different with Folders and Files. See also the current dicussion about aliases. HTH, Yuppie From schubbe@web.de Wed Jun 25 14:02:35 2003 From: schubbe@web.de (Yuppie) Date: Wed, 25 Jun 2003 15:02:35 +0200 Subject: [Zope-CMF] Re: Portal Types: default action In-Reply-To: <9DEA5D491B2EF249A697F39431464F54D3D7F7@kermit.kennisnet.org> References: <9DEA5D491B2EF249A697F39431464F54D3D7F7@kermit.kennisnet.org> Message-ID: <3EF99D6B.8050806@web.de> Hi! Arjan Huizer wrote: > Since I want my users to create links from other documents to this > newsletter I do not want them to have to include the method in the > URL. > > Is this simple to solve? ZPublisher looks for index_html. Either you adjust index_html or you do in your class the same PortalContent does: def __call__(self): ''' Invokes the default view. ''' view = _getViewFor(self) if getattr(aq_base(view), 'isDocTemp', 0): return view(self, self.REQUEST) else: return view() index_html = None # This special value informs ZPublisher to use __call__ HTH, Yuppie From pw_lists@slinkp.com Wed Jun 25 15:45:53 2003 From: pw_lists@slinkp.com (Paul Winkler) Date: Wed, 25 Jun 2003 10:45:53 -0400 Subject: [Zope-CMF] traverse_subpath and Filesystem Directory Views In-Reply-To: <20030625120539.GH11387@meder.de> References: <20030625120539.GH11387@meder.de> Message-ID: <20030625144553.GA1366@slinkp.com> Since you can regularly reproduce it, this smells like a bug. File a collector issue at http://collector.zope.org/CMF . -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's SUPER GRUESOME CONSTABLE! (random hero from isometric.spaceninja.com) From a.cruickshank@ccs.bbk.ac.uk Wed Jun 25 15:22:31 2003 From: a.cruickshank@ccs.bbk.ac.uk (Agata Cruickshank) Date: Wed, 25 Jun 2003 15:22:31 +0100 Subject: [Zope-CMF] Cache Manager and images Message-ID: Dear all,=20 I would be grateful if someone could point me in the right direction. I = have a cmf site with the header file containing an image called top = (). I would like the editors to be able to change = this image through the editorial screens (rather than management = interface) and to add new images when they create new folders, but = unfortunately the image gets cashed so it doesn't change from section = to section. Is there any code I could put around that image to make it = always refresh? (By the way shift-refresh in the browser doesn't do = anything, I can only get the right image by removing the call for top = image from header, and then re-inserting it in the header file). I'm using Zope-2.6.1 and CMF 1.3.1. Thanks for your help,=20 Agata From andy@agmweb.ca Wed Jun 25 16:25:05 2003 From: andy@agmweb.ca (Andy McKay) Date: Wed, 25 Jun 2003 08:25:05 -0700 Subject: [Zope-CMF] Objects in portal_skins In-Reply-To: References: <16119.13282.484397.531135@gargle.gargle.HOWL> <20030624215436.GD2240@slinkp.com> Message-ID: <3EF9BED1.6070909@agmweb.ca> You either have to loop through all the skins as Gitte suggested, which can be slow or just quickly test the metatype obj.meta_type.startswith('Filesystem') its pointless looking absolute_url, getPhysicalPath or any other traditional method for giving you its location on an object. -- Andy McKay http://www.agmweb.ca From fg@nuxeo.com Wed Jun 25 18:18:06 2003 From: fg@nuxeo.com (Florent Guillaume) Date: Wed, 25 Jun 2003 19:18:06 +0200 Subject: [Zope-CMF] traverse_subpath and Filesystem Directory Views In-Reply-To: <20030625120539.GH11387@meder.de> Message-ID: <20030625171806.GA12199@flo.in.nuxeo.com> I've seen this problem too. I never found time to investigate. It's definitely a bug. Florent In article <20030625120539.GH11387@meder.de> you write: > > Hello all! > > Just recently we stumbled across the following problem and up to now > we haven't found a solution. > > Zope version does not seem to have an effect, we have checked with > 2.6.1 and 2.6.2b1. We have not yet upgraded to CMF 1.4 though, perhaps > this is fixed in 1.4? > > Anyway, here's the problem: We have this small Python Skript inside a > CMF Skin that uses traverse_subpath to fetch some parameters. > > - working setup: > If the skin-folder is located directly in the ZODB everything works > fine. > > - problem setup: > If the skin-folder is connected via a Filesystem Directory View any > call to the skript with a subpath fails until we call the skript > once without any subpath. > > - working example for usage in problem setup: > > Assume the skript is called "myskript". Directly after Zope startup > we call > > 1) http://foo.bar.baz/somewhere/myskript > 2) and after that http://foo.bar.baz/somewhere/myskript/something/other > > This works as expected. > > - failing example for usage in problem setup: > > Again assume the skript is called "myskript". Directly after Zope > startup we call > > 1) http://foo.bar.baz/somewhere/myskript/something/other > > This consistently results in not found errors for > /somewhere/myskript/something/other until the moment we again once > call http://foo.bar.baz/somewhere/myskript > > > Has anybody heard of such a behaviour and found a > workaround or a solution for it. -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From jo@meder.de Wed Jun 25 19:52:59 2003 From: jo@meder.de (Jo Meder) Date: Wed, 25 Jun 2003 20:52:59 +0200 Subject: [Zope-CMF] traverse_subpath and Filesystem Directory Views In-Reply-To: <20030625171806.GA12199@flo.in.nuxeo.com> References: <20030625120539.GH11387@meder.de> <20030625171806.GA12199@flo.in.nuxeo.com> Message-ID: <20030625185259.GC25251@meder.de> Am 25.06.2003, 19:18 Uhr schrob Florent Guillaume : > I've seen this problem too. > I never found time to investigate. > It's definitely a bug. Thank's, at least I can now stop tearing my hair out. We've now updated to CMFCore 1.4 and judging from the first tests the problem is much less reproductible now. Judging from a diff against Version 1.3 there have been a bunch of changes to DirectoryView.py. Does it make any sense to file a bug report for 1.3 now that 1.4 has been out for quite some time? Jo. -- Internetmanufaktur Jo Meder ---------------------- Berlin, Germany http://www.meder.de/ ------------------- fon: ++49-30-417 17 63 33 Kollwitzstr. 75 ------------------------ fax: ++49-30-417 17 63 45 10435 Berlin --------------------------- mob: ++49-170- 2 98 89 97 Public GnuPG-Key ---------- http://www.meder.de/keys/jo-pubkey.txt From khk@uiah.fi Wed Jun 25 21:17:17 2003 From: khk@uiah.fi (Kari-Hans Kommonen) Date: Wed, 25 Jun 2003 23:17:17 +0300 Subject: [Zope-CMF] user identity crisis - proxy server cache problem? In-Reply-To: <20030624215436.GD2240@slinkp.com> References: <16119.13282.484397.531135@gargle.gargle.HOWL> <20030624215436.GD2240@slinkp.com> Message-ID: Hi all! We have a CMF site where we believe we are not doing anything extraordinary compared to an out of the box CMF site in the context of this problem: A user has first browsed the site as anonymous, and then joined and logged in, and has seen her name appear as the username. However, when she moves to another page where she has been before as anonymous, the site shows the anonymous version and ignores the fact that she has logged in. She says cookies are on, their IT support people have tried all the tricks they can think of with browser cookie and cache settings etc. The strangest thing is that when they look up a page on another machine where this user has never worked, the page shows up with her username on top??? We have not had any problems of this sort with any other users - so it looks like something idiosyncratic to their configuration. Could it be that there is a proxy server in their network somehow messing things up? Is it something else? Is there a way to fight these kinds of problems from the zope server side? From jo@meder.de Wed Jun 25 21:36:03 2003 From: jo@meder.de (Jo Meder) Date: Wed, 25 Jun 2003 22:36:03 +0200 Subject: [Zope-CMF] user identity crisis - proxy server cache problem? In-Reply-To: References: <16119.13282.484397.531135@gargle.gargle.HOWL> <20030624215436.GD2240@slinkp.com> Message-ID: <20030625203603.GD25251@meder.de> Am 25.06.2003, 22:17 Uhr schrob Kari-Hans Kommonen : > Could it be that there is a proxy server in their network somehow > messing things up? Definitely. > Is it something else? Is there a way to fight these kinds of problems > from the zope server side? We had moderate success by using the following snippet for all pages whenever they are delivered to logged in users: if not context.portal_membership.isAnonymousUser(): setHeader = container.REQUEST.RESPONSE.setHeader z=context.ZopeTime() setHeader('Pragma','no-cache') setHeader('Expires',z) setHeader('Last-Modified',z) This should strongly discourage caching except for proxies and browsers explicitly configured to cache anything. Note that this indiscriminately discourages client side caching regardless whether a page is updated or not, so your server load may rise significantly. Another way would be to go for https for editing purposes, since encrypted pages should never be cached. Jo. -- Internetmanufaktur Jo Meder ---------------------- Berlin, Germany http://www.meder.de/ ------------------- fon: ++49-30-417 17 63 33 Kollwitzstr. 75 ------------------------ fax: ++49-30-417 17 63 45 10435 Berlin --------------------------- mob: ++49-170- 2 98 89 97 Public GnuPG-Key ---------- http://www.meder.de/keys/jo-pubkey.txt From pw_lists@slinkp.com Wed Jun 25 22:34:53 2003 From: pw_lists@slinkp.com (Paul Winkler) Date: Wed, 25 Jun 2003 17:34:53 -0400 Subject: [Zope-CMF] Objects in portal_skins In-Reply-To: References: <16119.13282.484397.531135@gargle.gargle.HOWL> <20030624215436.GD2240@slinkp.com> Message-ID: <20030625213453.GA2048@slinkp.com> On Wed, Jun 25, 2003 at 09:14:36AM +0200, Bert Vanderbauwhede wrote: > On Tue, 24 Jun 2003, Paul Winkler wrote: > > > On Tue, Jun 24, 2003 at 07:31:38AM +0200, Bert Vanderbauwhede wrote: > > > I was thinking of something I could use as a test in a script or template. > > > Methods like absolute_url() give me no indication if an object is located > > > in portal_skins or one of its subfolders. > > > > hmm, well if you put it that way i can't resist :) > > > > if foo.absolute_url().count("portal_skins"): > > ... > > Unfortunately, acquisition and skinning magic allows you to access objects > in portal_skins without explicitly specifying the portal_skins in the > path. And then your trick doesn't work. ah, sorry, of course you're right. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's FRED WITH EXTRA CHOCOLATE! (random hero from isometric.spaceninja.com) From pw_lists@slinkp.com Wed Jun 25 22:36:42 2003 From: pw_lists@slinkp.com (Paul Winkler) Date: Wed, 25 Jun 2003 17:36:42 -0400 Subject: [Zope-CMF] Objects in portal_skins In-Reply-To: <3EF9BED1.6070909@agmweb.ca> References: <16119.13282.484397.531135@gargle.gargle.HOWL> <20030624215436.GD2240@slinkp.com> <3EF9BED1.6070909@agmweb.ca> Message-ID: <20030625213642.GB2048@slinkp.com> On Wed, Jun 25, 2003 at 08:25:05AM -0700, Andy McKay wrote: > You either have to loop through all the skins as Gitte suggested, which > can be slow or just quickly test the metatype > > obj.meta_type.startswith('Filesystem') wellll... that will fail for anything that's been customized. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's THE UNDERAPPRECIATED DA FUNK! (random hero from isometric.spaceninja.com) From fg@nuxeo.com Wed Jun 25 23:40:32 2003 From: fg@nuxeo.com (Florent Guillaume) Date: 26 Jun 2003 00:40:32 +0200 Subject: [Zope-CMF] traverse_subpath and Filesystem Directory Views In-Reply-To: <20030625185259.GC25251@meder.de> References: <20030625120539.GH11387@meder.de> <20030625171806.GA12199@flo.in.nuxeo.com> <20030625185259.GC25251@meder.de> Message-ID: <1056580831.25901.12.camel@twin.in.efge.org> On Wed, 2003-06-25 at 20:52, Jo Meder wrote: > > I've seen this problem too. > > I never found time to investigate. > > It's definitely a bug. > > Thank's, at least I can now stop tearing my hair out. We've now > updated to CMFCore 1.4 and judging from the first tests the problem is > much less reproductible now. > > Judging from a diff against Version 1.3 there have been a bunch of > changes to DirectoryView.py. > > Does it make any sense to file a bug report for 1.3 now that 1.4 has > been out for quite some time? It could make sense to fix it on a 1.3 maintenance branch, but I'm not sure there really is one. In my experience in 1.3 the bug was quite deterministic, the first time after a restart or a change of the file, it produced correct behavior (correct traverse_subpath binding set), and afterwards traverse_subpath was always None or [], I can't remember. The question is, is it still there in 1.4. When you say "much less reproducible", do you mean that it still happens sometimes? Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com From Anton.Hughes@utas.edu.au Thu Jun 26 01:25:24 2003 From: Anton.Hughes@utas.edu.au (Anton Hughes) Date: Thu, 26 Jun 2003 10:25:24 +1000 Subject: [Zope-CMF] Archetypes and CMFDefault? Message-ID: This is a multi-part message in MIME format. ------=_NextPart_000_0000_01C33BCD.40FD1C50 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi all, I'm just about to develop a new CMF product to replace the old Exam product for a customer with a CMFDefault based site. I like the look of Archetypes, and although I know this product currently depends on Plone, but how? In other words, what bits would I need to pinch from plone to get Archetypes to work, or is this just so silly it would be a waste of time :) Thanks, Anton Data Administrator Childhood Determinants of Adult Health Project Menzies Centre for Population Health Research Private Bag 23, Hobart Tasmania 7001 Email: anton.hughes@utas.edu.au Web: http://www.menzies.utas.edu.au/cohort/CDAH.htm Phone: +61 (0) 3 6226 7761 =+=+++=====+++++++++=================+++++++++++++++++++++++++++++++ If you think education is expensive, try ignorance. -- Derek Bok, president of Harvard ------=_NextPart_000_0000_01C33BCD.40FD1C50 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi=20 all,
 
I'm = just about to=20 develop a new CMF product to replace the old Exam product for = a=20 customer with a CMFDefault based site. I like the look of Archetypes, = and=20 although I know this product currently depends on Plone, but how? In = other=20 words, what bits would I need to pinch from plone to get Archetypes to = work, or=20 is this just so silly it would be a waste of time :)
 
Thanks,
 
Anton
 
 
Data Administrator
Childhood Determinants of Adult = Health=20 Project
Menzies Centre for Population = Health=20 Research
Private Bag 23, Hobart Tasmania 7001
 
Email: anton.hughes@utas.edu.au
Web:  http://www.menzie= s.utas.edu.au/cohort/CDAH.htm
Phone: +61 (0) 3 6226 = 7761
 
=3D+=3D+++=3D=3D=3D=3D=3D+++++++++=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D+++++++++++++++++++++++++++++++
If you think = education is=20 expensive, try=20 ignorance.
          = ;     =20 -- Derek Bok, president of = Harvard
 
------=_NextPart_000_0000_01C33BCD.40FD1C50-- From jo@meder.de Thu Jun 26 08:17:34 2003 From: jo@meder.de (Jo Meder) Date: Thu, 26 Jun 2003 09:17:34 +0200 Subject: [Zope-CMF] traverse_subpath and Filesystem Directory Views In-Reply-To: <1056580831.25901.12.camel@twin.in.efge.org> References: <20030625120539.GH11387@meder.de> <20030625171806.GA12199@flo.in.nuxeo.com> <20030625185259.GC25251@meder.de> <1056580831.25901.12.camel@twin.in.efge.org> Message-ID: <20030626071734.GN11387@meder.de> Am 26.06.2003, 00:40 Uhr schryb Florent Guillaume : > In my experience in 1.3 the bug was quite deterministic, the first time > after a restart or a change of the file, it produced correct behavior > (correct traverse_subpath binding set), and afterwards traverse_subpath > was always None or [], I can't remember. Huh? We had it the other way round. First call always fails, all the others were successfull. Anyway: > The question is, is it still there in 1.4. When you say "much less > reproducible", do you mean that it still happens sometimes? I was not sure if what I had seen was some browser misbehaving/caching or a real bug, now we have tested it more thoroughly with 1.4 and the bug is gone. So the solution for problems with Filesystem Directory Views and traverse_subpath is: Upgrade to CMF 1.4 Jo. -- Internetmanufaktur Jo Meder ---------------------- Berlin, Germany http://www.meder.de/ ------------------- fon: ++49-30-417 17 63 33 Kollwitzstr. 75 ------------------------ fax: ++49-30-417 17 63 45 10435 Berlin --------------------------- mob: ++49-170- 2 98 89 97 Public GnuPG-Key ---------- http://www.meder.de/keys/jo-pubkey.txt From Rainer Thaden Thu Jun 26 13:46:29 2003 From: Rainer Thaden (Rainer Thaden) Date: Thu, 26 Jun 2003 14:46:29 +0200 Subject: [Zope-CMF] StringIO error Message-ID: <1193428328.20030626144629@gmx.de> Hi, i have a little script makeThumbnails which automatically generates thumbnails of images on certain pages. In most cases it works. But in some cases i get the following error: 8<------- snipped first part --------->8 Module Script (Python), line 8, in makeThumbnails - - Line 8 Module Products.ITA.ita_utils, line 66, in makeThumbnail TypeError: expected string, ImplicitAcquirerWrapper found The code is here: from PIL import Image from cStringIO import StringIO import os.path # create a thumbnail image file original_image=getattr(self, original_id) # the line below must be responsible for the error i think: original_file=StringIO(original_image.data) image=Image.open(original_file) image=image.convert('RGB') image.thumbnail((size,size)) thumbnail_file=StringIO() image.save(thumbnail_file, "JPEG") thumbnail_file.seek(0) The image is a jpg, which is uploaded in a Portal Image. Any ideas? -- Regards, Rainer mailto:thadi@gmx.de From Rainer Thaden Thu Jun 26 14:57:44 2003 From: Rainer Thaden (Rainer Thaden) Date: Thu, 26 Jun 2003 15:57:44 +0200 Subject: [Zope-CMF] Re: StringIO error In-Reply-To: <1193428328.20030626144629@gmx.de> References: <1193428328.20030626144629@gmx.de> Message-ID: <1617703517.20030626155744@gmx.de> RT> i have a little script makeThumbnails which automatically generates RT> thumbnails of images on certain pages. In most cases it works. But in RT> some cases i get the following error: RT> 8<------- snipped first part --------->8 RT> Module Script (Python), line 8, in makeThumbnails RT> - RT> - Line 8 RT> Module Products.ITA.ita_utils, line 66, in makeThumbnail RT> TypeError: expected string, ImplicitAcquirerWrapper found RT> The code is here: RT> from PIL import Image RT> from cStringIO import StringIO RT> import os.path RT> # create a thumbnail image file RT> original_image=getattr(self, original_id) RT> # the line below must be responsible for the error i think: RT> original_file=StringIO(original_image.data) RT> image=Image.open(original_file) RT> image=image.convert('RGB') RT> image.thumbnail((size,size)) RT> thumbnail_file=StringIO() RT> image.save(thumbnail_file, "JPEG") RT> thumbnail_file.seek(0) RT> The image is a jpg, which is uploaded in a Portal Image. RT> Any ideas? Anyone who's interested: Think i found it: http://www.zopelabs.com/cookbook/1010702887 -- Regards, Rainer mailto:thadi@gmx.de From schubbe@web.de Thu Jun 26 16:49:55 2003 From: schubbe@web.de (Yuppie) Date: Thu, 26 Jun 2003 17:49:55 +0200 Subject: [Zope-CMF] Re: [dev] Heads up! Landing Method Aliases tomorrow In-Reply-To: <3EF96CE9.5040905@web.de> References: <3EF96CE9.5040905@web.de> Message-ID: <3EFB1623.5040709@web.de> Hi! Yuppie wrote: > If there are no objections, I'm going to merge yuppie-ti_aliases-branch > into HEAD tomorrow. This is on hold because Florent did express some concerns regarding the way aliases are configured: This is my reply: So far there was no further discussion. I don't know if I was able to convince Florent or what other people think. If there are no further responses until tommorow evening, I'll asume everybody can at least live with merging the current implementation from the branch. Cheers, Yuppie From richard.ettema@yoursolutions.com Thu Jun 26 19:30:12 2003 From: richard.ettema@yoursolutions.com (Richard Ettema) Date: Thu, 26 Jun 2003 19:30:12 +0100 Subject: [Zope-CMF] KeywordIndex search with operator 'and' returns all results when only one keyword matches Message-ID: Hi, When I search a CMF site catalog with the dtml shown below (searching with 'review_state' (fieldindex) and 'food' (keywordIndex) ) the following occurs: -if there are SOME cataloged items with both 'oranges' and 'apples', published items cataloged with a 'food' index matching 'oranges' AND 'apples' are returned as expected. -if there are NO cataloged items with both 'oranges' and 'apples', published items cataloged with a 'food' index matching 'oranges' OR 'apples' are returned. No items should be returned by my reckoning? I have searched around for anyone with this situation, but have not found anything. Thanks for any ideas or pointers. I did see some mention of the operator being passed as "operator='and'" rather than in a dict, but that didn't make any sense to me. ### () ### Running: -zope 2.5.1 -cmf 1.3 -python 2.1.3 Thanks for your help with this. Richard --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.490 / Virus Database: 289 - Release Date: 16/06/2003 From shane@zope.com Thu Jun 26 21:31:43 2003 From: shane@zope.com (Shane Hathaway) Date: Thu, 26 Jun 2003 16:31:43 -0400 Subject: [Zope-CMF] user identity crisis - proxy server cache problem? In-Reply-To: References: <20030624215436.GD2240@slinkp.com> Message-ID: <3EFB582F.5040309@zope.com> Kari-Hans Kommonen wrote: > Could it be that there is a proxy server in their network somehow > messing things up? Is it something else? Is there a way to fight these > kinds of problems from the zope server side? TCPWatch is designed to help in just this kind of situation. Download TCPWatch: http://hathaway.freezope.org/Software/TCPWatch Run it like this: python tcpwatch.py -p 3128 (Use -s if you don't have Tkinter installed. Use -r to log to a directory if -s produces too much data.) Then change your user's proxy settings to point to your proxy. Look to see if the browser sends the cookie or not. If the browser is sending the cookie but Zope isn't getting it, use TCPWatch on the server side. If Zope is running on port 8080, do this on the same box running Zope: python tcpwatch.py -L 8090:localhost:8080 Then ask your user to use port 8090 instead of 8080 to access Zope. Shane From Rainer Thaden Thu Jun 26 23:05:58 2003 From: Rainer Thaden (Rainer Thaden) Date: Fri, 27 Jun 2003 00:05:58 +0200 Subject: [Zope-CMF] Proposal: CMFCalendar shows events depending on permissions Message-ID: <1931275276.20030627000558@gmx.de> Hi, the Events shown in the calendar are search results with review_state='published'. Wouldn't it be better if events are shown depending on the permissions the user has? So a user with a manager role would also see the private and visible events. For a modification the review_state='published' has to be removed from the catalog query in catalog_getevents and getEventsForThisDay in CalendarTool.py and a line query = ZTUtils.LazyFilter(query, skip='View') has to be inserted. Comments? -- Regards, Rainer Thadi@gmx.de From stephen@bartlettsoftware.biz Fri Jun 27 00:13:21 2003 From: stephen@bartlettsoftware.biz (Stephen Bartlett) Date: Thu, 26 Jun 2003 16:13:21 -0700 Subject: [Zope-CMF] DCWorkflow enhancement patch: Worklist specs Message-ID: <200306261613.28829.stephen@bartlettsoftware.biz> =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 In using DCWorkflow 0.4.2, I found this patch to DCWorkflow.py to be useful. It is a backward-compatible enhancement to listGlobalActions() that allows= =20 you to use expression variables in Worklist specifications (the "Cataloged= =20 variable matches" fields) rather than just literal values. The practical up= shot=20 for me was it allowed me to filter on user_id, thereby achieving per-user=20 worklists. I also posted this on http://cmf.zope.org/Members/sbart17 =2D - Stephen =2D --=20 Stephen Bartlett, President Bartlett Software, Inc. http://www.bartlettsoftware.biz/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D *** DCWorkflow.py 2001-11-28 11:06:27.000000000 -0800 =2D --- /usr/local/zope/2.6.1/lib/python/Products/DCWorkflow/DCWorkflow.py = 2003-06-25 14:38:29.000000000 -0700 *************** *** 213,230 **** guard =3D qdef.guard if guard is None or guard.check(sm, self, portal): searchres =3D None if qdef.var_matches: # Check the catalog for items in the worklist. catalog =3D getToolByName(self, 'portal_catalog') dict =3D {} for k, v in qdef.var_matches.items(): ! dict[k] =3D v searchres =3D apply(catalog.searchResults, (), di= ct) if not searchres: continue =2D - if fmt_data is None: =2D - fmt_data =3D TemplateDict() =2D - fmt_data._push(info) searchres_len =3D lambda searchres=3Dsearchres: len(s= earchres) fmt_data._push({'count': searchres_len}) res.append((id, {'name': qdef.actbox_name % fmt_data, =2D --- 213,230 ---- guard =3D qdef.guard if guard is None or guard.check(sm, self, portal): searchres =3D None + if fmt_data is None: + fmt_data =3D TemplateDict() + fmt_data._push(info) if qdef.var_matches: # Check the catalog for items in the worklist. catalog =3D getToolByName(self, 'portal_catalog') dict =3D {} for k, v in qdef.var_matches.items(): ! dict[k] =3D v % fmt_data searchres =3D apply(catalog.searchResults, (), di= ct) if not searchres: continue searchres_len =3D lambda searchres=3Dsearchres: len(s= earchres) fmt_data._push({'count': searchres_len}) res.append((id, {'name': qdef.actbox_name % fmt_data, =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE++34YR7d3GIt7UjgRAostAJ9Q/G7+hRMCJ2P2hZbEuCDlnBAGPwCgg2gM K7pmG7nUR6G16NGnPvW1fhw=3D =3DFdcp =2D----END PGP SIGNATURE----- From dieter@handshake.de Thu Jun 26 23:51:50 2003 From: dieter@handshake.de (Dieter Maurer) Date: Fri, 27 Jun 2003 00:51:50 +0200 Subject: [Zope-CMF] Portal Types: default action In-Reply-To: <9DEA5D491B2EF249A697F39431464F54D95BDA@kermit.kennisnet.org> References: <9DEA5D491B2EF249A697F39431464F54D95BDA@kermit.kennisnet.org> Message-ID: <16123.30982.438057.424409@gargle.gargle.HOWL> Arjan Huizer wrote at 2003-6-25 12:17 +0200: > I am using Zope 2.6.1 with CMF 1.3 on a Linux box. I have a question: How does Zope/CMF determine what to send to the user when he visits a URL like http://localhost/portal/myObject without a trailing method added to it? How can this behaviour be changed? It uses the method "_getViewFor" to determine the action. Read its source to find out the details. When I remember right (it was documented somewhere but I forgot where), it searches for a "view" action. If it does not find one, it uses the first action available for "Anonymous". Dieter From dieter@handshake.de Thu Jun 26 23:54:40 2003 From: dieter@handshake.de (Dieter Maurer) Date: Fri, 27 Jun 2003 00:54:40 +0200 Subject: [Zope-CMF] traverse_subpath and Filesystem Directory Views In-Reply-To: <20030625120539.GH11387@meder.de> References: <20030625120539.GH11387@meder.de> Message-ID: <16123.31152.295254.475383@gargle.gargle.HOWL> Jo Meder wrote at 2003-6-25 14:05 +0200: > Just recently we stumbled across the following problem and up to now > we haven't found a solution. > ... > - problem setup: > If the skin-folder is connected via a Filesystem Directory View any > call to the skript with a subpath fails until we call the skript > once without any subpath. This has been a bug in "FSPythonScript". The binding code was executed too late. Search the mailing list archives for details. The bug was fixed (in CVS) a long time ago. Dieter From dieter@handshake.de Fri Jun 27 00:16:51 2003 From: dieter@handshake.de (Dieter Maurer) Date: Fri, 27 Jun 2003 01:16:51 +0200 Subject: [Zope-CMF] user identity crisis - proxy server cache problem? In-Reply-To: References: <16119.13282.484397.531135@gargle.gargle.HOWL> <20030624215436.GD2240@slinkp.com> Message-ID: <16123.32483.140621.748161@gargle.gargle.HOWL> Kari-Hans Kommonen wrote at 2003-6-25 23:17 +0300: > .... > A user has first browsed the site as anonymous, and then joined and > logged in, and has seen her name appear as the username. > > However, when she moves to another page where she has been before as > anonymous, the site shows the anonymous version and ignores the fact > that she has logged in. > .... > Could it be that there is a proxy server in their network somehow > messing things up? What you see is standard caching behaviour. This can be verified by telling the browser to reload the page without intermediate caches ("Shift-Reload" often do this). When this brings up the correct result, you have a caching problem. To avoid this problem, you must control caching. There is a HowTo on Zope.org. Dieter From dieter@handshake.de Thu Jun 26 23:59:49 2003 From: dieter@handshake.de (Dieter Maurer) Date: Fri, 27 Jun 2003 00:59:49 +0200 Subject: [Zope-CMF] Cache Manager and images In-Reply-To: References: Message-ID: <16123.31461.790649.381014@gargle.gargle.HOWL> Agata Cruickshank wrote at 2003-6-25 15:22 +0100: > I would be grateful if someone could point me in the right direction. I have a cmf site with the header file containing an image called top (). I would like the editors to be able to change this image through the editorial screens (rather than management interface) and to add new images when they create new folders, but unfortunately the image gets cashed so it doesn't change from section to section. Is there any code I could put around that image to make it always refresh? (By the way shift-refresh in the browser doesn't do anything, I can only get the right image by removing the call for top image from header, and then re-inserting it in the header file). When you have different images for different sections, then the URLs for these images should be different. In this case, the image cached for a section were the correct one. You would still have the cache problem when a image (for one section) is changed. The browser command "Shift-Reload" usually tells the browser to validate the page content and reload the image. If this is not enough for you, you can use the images "precondition" to set cache control headers (to control caching). Search "zope.org" for details. Dieter From dieter@handshake.de Thu Jun 26 23:21:39 2003 From: dieter@handshake.de (Dieter Maurer) Date: Fri, 27 Jun 2003 00:21:39 +0200 Subject: [Zope-CMF] Search results with portal_catalog - need a strategy In-Reply-To: References: <16119.13076.665871.905603@gargle.gargle.HOWL> Message-ID: <16123.29171.168566.204084@gargle.gargle.HOWL> Peter McMillan wrote at 2003-6-24 15:49 -0700: > On 6/23/03 10:04 AM, "Dieter Maurer" wrote: > [snip] > > > > I (in your place) would use a debugger to find out why the catalog > > returns apparently wrong results. > ... > I'll do the research in the list. I've just read 'the debugger is your > friend' article. > > I'm new enough to not understand how to write the appropriate test case. I > may need some additional help on that. Sad. Using the debugger is sufficiently complex that it cannot be teached in an email... When you are able to reproduce your problem with a really small setup (no more than a few kB!), you can export your catalog together with the failing scripts/templates and send me the "zexp" for analysis. Dieter From steinheuer@sector.de Fri Jun 27 10:27:55 2003 From: steinheuer@sector.de (Andreas Steinheuer) Date: Fri, 27 Jun 2003 11:27:55 +0200 Subject: [Zope-CMF] ExtDocument as Portal Type? Message-ID: Hello, I'm looking for a possibility to integrate ExtDocument into plone. The user should be able to upload extern documents from the Plone Contents View like other files. So I create a new Portal Type named ExtDocument with the method "manage_addExtDocument" from ExtDocument.py as the Product factory method. If I try to add a new ExtDocument I get an IOError. I guess the reason for this is that the Plone-Form doesn't assign all necessary values to the method. Therefore I want to change Extdocument.py. There should be a method which calls the form of the Product (addExtDocument.dtml). But how do I call this form from a method within the product? Another question: Is there any other way to use Extdocument in Plone? thanks Andreas From malice120@yahoo.fr Fri Jun 27 12:30:39 2003 From: malice120@yahoo.fr (=?iso-8859-1?q?polo=20polo?=) Date: Fri, 27 Jun 2003 13:30:39 +0200 (CEST) Subject: [Zope-CMF] Pb with edit my image field: o.edit('title':'doc1','image':toto.gif) Message-ID: <20030627113039.86183.qmail@web40403.mail.yahoo.com> Hi i have in trouble for few days with my image field i have write a python script to edit my archetype object o.edit('title':'doc1','image':toto.gif) but the field 'image' doesn't work Someone can help me please? bye ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com From sam@webslingerz.com Fri Jun 27 14:21:58 2003 From: sam@webslingerz.com (Sam Brauer) Date: Fri, 27 Jun 2003 09:21:58 -0400 Subject: [Zope-CMF] fixing ownership after site move Message-ID: <3EFC44F6.10006@webslingerz.com> After recently putting my first CMF-based site into production, I found that the stories are true: after renaming a CMF site, content objects owned by users defined in the CMF site's acl_users have their ownership info still referrring to the acl_users object at the old name. I saw mentions of this problem at: http://www.zopelabs.com/cookbook/1037469388 http://cmf.zope.org/Members/cleath/movePortal/view But neither of these offer ready-to-use solutions for fixing all content objects in the site. I put together a script that seemed to work for me (I'll include it at the end of this message). You can use it by putting a copy of the script in $ZOPE/Extensions (I named it "fixCMFOwnership.py") then set it up as an External Method in the root of your CMF site (set the "function" to "handler") after the move/rename, then run it (via the "test" tab). It walks through all of the content objects on the site and tries to fix their ownership if they appear to suffer from the problem described above. I'm tempted to post my script to zopelabs, but wanted to run it by the CMF list first for feedback. Here's the script: # After you rename or move a CMF site, the ownership of content will # be screwed up (items owned by users in the site's acl_users will # appear to be unowned, and if you look at the ownership tab for the # object in the ZMI, it will refer to oldname/acl_users). # This script will find all such content objects and fix the ownership. # Create an ExternalMethod in the root of your CMF site that refers to # this script, then run it (via the "test" tab). # Sam Brauer - 20030624 # Loosely based on code from # http://cmf.zope.org/Members/cleath/movePortal/view from Products.CMFCore import utils def handler(self): buff=[] buff.append("Entered fixCMFOwnership...") acl_users = self.acl_users portal_url = utils.getToolByName(self, 'portal_url') root = portal_url.getPortalObject() fixOwnership(root, acl_users, buff) buff.append("Exiting fixCMFOwnership().") return '\n'.join(buff) def fixOwnership(obj, acl_users, outputbuffer): creator = obj.Creator() ownerid = obj.owner_info()['id'] outputbuffer.append("fixOwnership() for '%s' (creator:'%s' and ownerid:'%s')" % (obj.getId(), creator, ownerid)) if(not creator): try: user = acl_users.getUserById(ownerid) except: outputbuffer.append("getUserById raised an exception for '%s'!" % ownerid) else: if user: user = user.__of__(acl_users) obj.changeOwnership(user, recursive=0) obj.manage_addLocalRoles(ownerid, ('Owner',)) obj.reindexObject() outputbuffer.append("Changed ownership") else: outputbuffer.append("Didn't change ownership") if(getattr(obj, 'isPrincipiaFolderish', 0)): for child in obj.contentValues(): fixOwnership(child, acl_users, outputbuffer) -- Sam Brauer Systems Programmer sam@webslingerZ.com From sam@webslingerz.com Fri Jun 27 14:28:10 2003 From: sam@webslingerz.com (Sam Brauer) Date: Fri, 27 Jun 2003 09:28:10 -0400 Subject: [Zope-CMF] context-sensitive undo form Message-ID: <3EFC466A.4020105@webslingerz.com> By default, the undo_form shows all transactions (that the user can undo) for the whole CMF site. It would be nice if it instead showed only the transactions for the current object that the user is working with. (In the case of a folderish object, I suppose you might want to see all of the transactions recursively under that folder.) I tried hitting a url like: http://mycmfsite.org/someobject/undo_form thinking that it would do what I wanted, but that still produces a list of all transactions for the whole site. Has anyone customized the undo_form to list transactions in a context-sensitive manner? Or can someone offer hints about how that might be done? Many thanks, Sam -- Sam Brauer Systems Programmer sam@webslingerZ.com From tseaver@zope.com Fri Jun 27 14:56:30 2003 From: tseaver@zope.com (Tres Seaver) Date: 27 Jun 2003 09:56:30 -0400 Subject: [Zope-CMF] context-sensitive undo form In-Reply-To: <3EFC466A.4020105@webslingerz.com> References: <3EFC466A.4020105@webslingerz.com> Message-ID: <1056722191.3717.4.camel@beauty> On Fri, 2003-06-27 at 09:28, Sam Brauer wrote: > By default, the undo_form shows all transactions (that the user can > undo) for the whole CMF site. It would be nice if it instead showed > only the transactions for the current object that the user is working > with. (In the case of a folderish object, I suppose you might want to > see all of the transactions recursively under that folder.) I tried > hitting a url like: http://mycmfsite.org/someobject/undo_form thinking > that it would do what I wanted, but that still produces a list of all > transactions for the whole site. > > Has anyone customized the undo_form to list transactions in a > context-sensitive manner? Or can someone offer hints about how that > might be done? This can't be done in the general case, because the ZODB doesn't maintain enough metadata about the transaction to allow it. The only metadata it knows is the physical path of the *method* which drove the transaction; because of skinning, the method always has the CMFSite object as its aq_parent, rather than the (?) content object (since some transactions touch multiple objects, even that would be iffy were it possible). Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From sam@webslingerz.com Fri Jun 27 15:36:03 2003 From: sam@webslingerz.com (Sam Brauer) Date: Fri, 27 Jun 2003 10:36:03 -0400 Subject: [Zope-CMF] context-sensitive undo form In-Reply-To: <1056722191.3717.4.camel@beauty> References: <3EFC466A.4020105@webslingerz.com> <1056722191.3717.4.camel@beauty> Message-ID: <3EFC5653.4080909@webslingerz.com> Tres Seaver wrote: > On Fri, 2003-06-27 at 09:28, Sam Brauer wrote: > >>By default, the undo_form shows all transactions (that the user can >>undo) for the whole CMF site. It would be nice if it instead showed >>only the transactions for the current object that the user is working >>with. (In the case of a folderish object, I suppose you might want to >>see all of the transactions recursively under that folder.) I tried >>hitting a url like: http://mycmfsite.org/someobject/undo_form thinking >>that it would do what I wanted, but that still produces a list of all >>transactions for the whole site. >> >>Has anyone customized the undo_form to list transactions in a >>context-sensitive manner? Or can someone offer hints about how that >>might be done? > > > This can't be done in the general case, because the ZODB doesn't > maintain enough metadata about the transaction to allow it. The only > metadata it knows is the physical path of the *method* which drove the > transaction; because of skinning, the method always has the CMFSite > object as its aq_parent, rather than the (?) content object (since some > transactions touch multiple objects, even that would be iffy were it > possible). > > Tres. Tres, Thanks for the explanation. Since "context-sensitive undo" isn't a possiblity, I wonder if it would be possible to add a little more info to the transaction history, such as the URI that triggered the transaction. As it is, everytime someone edits a document (for instance) there's a transaction like this: /mysite/document_edit by mysite sam Zope on June 26 at 15:34:53 It doesn't mention which document was edited, only that some document was edited. But if I edited /mysite/someobject (by submitting the edit form to http://127.0.0.1:8080/mysite/someobject/document_edit), it would be nicer to see: /mysite/someobject/document_edit by mysite sam Zope on June 26 at 15:34:53 From the little that I currently know about Zope transactions, that first string is the "description". So I guess what I want to be able to do is control what the description is for each transaction performed in the CMFSite. I can dig around and try to figure that out. Of course, any tips would be much appreciated :) -- Sam Brauer Systems Programmer sam@webslingerZ.com From dieter@handshake.de Fri Jun 27 19:06:49 2003 From: dieter@handshake.de (Dieter Maurer) Date: Fri, 27 Jun 2003 20:06:49 +0200 Subject: [Zope-CMF] KeywordIndex search with operator 'and' returns all results when only one keyword matches In-Reply-To: References: Message-ID: <16124.34745.706925.389826@gargle.gargle.HOWL> Richard Ettema wrote at 2003-6-26 19:30 +0100: > When I search a CMF site catalog with the dtml shown below (searching with > 'review_state' (fieldindex) and 'food' (keywordIndex) ) the following > occurs: > > -if there are SOME cataloged items with both 'oranges' and 'apples', > published items cataloged with a 'food' index matching 'oranges' AND > 'apples' are returned as expected. > > -if there are NO cataloged items with both 'oranges' and 'apples', > published items cataloged with a 'food' index matching 'oranges' OR 'apples' > are returned. No items should be returned by my reckoning? > > I have searched around for anyone with this situation, but have not found > anything. This bug has been reported to the mailing list some time ago. Someone disagreed that it were a bug. I strongly agree with you. Please file a bug report. Dieter From malice120@yahoo.fr Mon Jun 30 10:58:15 2003 From: malice120@yahoo.fr (=?iso-8859-1?q?polo=20polo?=) Date: Mon, 30 Jun 2003 11:58:15 +0200 (CEST) Subject: [Zope-CMF] dicussion reply in python script Message-ID: <20030630095815.90043.qmail@web40403.mail.yahoo.com> Hi here a script to create a document: # adds a document at the root of the site document_id = 'a_document' portal = self.portal_url.getPortalObject() portal.invokeFactory(portal_type='Document', document_id) doc = portal._getOb(groups_id) # dubline core stuff doc.setTitle('A Document') doc.setDescription('This is a document for testing.') # Document specific doc.edit( text_format='structured-text', text='Some Text Goes Here\n\n A paragraph\n for you.' ) HOW do you create the discussion reply of this document? ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com