[Zope-dev] bug in zpatterns-0.4 ?

2000-06-27 Thread Jephte CLAIN

hello,

Rack.createItem (low level method) first calls Rack.getItem (higher
level method) to check the existence of the item.
This causes infinite loop in certain cases. It should (IMHO) call
Rack.retrieveItem instead

regards,
jephte clain
[EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] bug in zpatterns-0.4 ?

2000-06-27 Thread mike

Jephte CLAIN wrote:
 
 hello,
 
 Rack.createItem (low level method) first calls Rack.getItem (higher
 level method) to check the existence of the item.
 This causes infinite loop in certain cases. It should (IMHO) call
 Rack.retrieveItem instead
 

Could you provide an example please?

Mike

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Full-text Indexing FOLLOW-UP

2000-06-27 Thread Thomas Weholt

Hi ( again )

Wouldn`t Zope as a web-database integrator benefit from a feature like
full-text searching? ( Everybody answers yes and nods. )
It seems as if Zope is aimed at information-publishing, using a RDBMS as
source for that information. An initiative from the Zope community to
either create products that support this using the most common RDBMS,
support these features in database-adapters if the RDBMS supports it and/or
create documentation
 ( HowTos/Tips ) on how to build a simple full-text searching, give ideas,
overviews etc, would make Zope a more viable solution for
information-publishing.

My reason for asking this is that I`m trying to sell OpenSource to my
co-workers, show that Open can be just as good as any commercial,
Closed-Sourced alternative. When I said that
full-text searching wasn`t running out-of-the-box I was laughed at. The
solution used in my company is Windows 2000 server, MS SQL 7.0 and
SiteServer/MS IIS. To compete with this
full-text searching is a must. I used PostgreSQL 7.0.2 with Zope and
PostgreSQL has a c-library for full-text searching included in the source.
If we could get this to work with Zope we would
be a bit closer. 

I`m going to dive into this, so if somebody wants to help, has tips or
whatever, please feel free to email me.

Thomas

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Full-text Indexing FOLLOW-UP

2000-06-27 Thread Oleg Broytmann

Hi!

   http://mysearch.udm.net/

   It is not Zope-related, but pretty good. Integrate its engine with Zope
- and voila!

On Tue, 27 Jun 2000, Thomas Weholt wrote:
 Wouldn`t Zope as a web-database integrator benefit from a feature like
 full-text searching? ( Everybody answers yes and nods. )
 It seems as if Zope is aimed at information-publishing, using a RDBMS as
 source for that information. An initiative from the Zope community to
 either create products that support this using the most common RDBMS,
 support these features in database-adapters if the RDBMS supports it and/or
 create documentation
  ( HowTos/Tips ) on how to build a simple full-text searching, give ideas,
 overviews etc, would make Zope a more viable solution for
 information-publishing.
 
 My reason for asking this is that I`m trying to sell OpenSource to my
 co-workers, show that Open can be just as good as any commercial,
 Closed-Sourced alternative. When I said that
 full-text searching wasn`t running out-of-the-box I was laughed at. The
 solution used in my company is Windows 2000 server, MS SQL 7.0 and
 SiteServer/MS IIS. To compete with this
 full-text searching is a must. I used PostgreSQL 7.0.2 with Zope and
 PostgreSQL has a c-library for full-text searching included in the source.
 If we could get this to work with Zope we would
 be a bit closer. 
 
 I`m going to dive into this, so if somebody wants to help, has tips or
 whatever, please feel free to email me.

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Re: [Zope] :xxx syntax (was: HTML Editors that recognize DTML)

2000-06-27 Thread Lalo Martins

On Fri, Jun 23, 2000 at 07:49:21PM -0400, Jon Franz wrote:
 
 Also, its not XML compliant either, but I have a shorter dtml syntax patch
 available for download at:
 
 http://www.zope.org/Members/Coventry/dtml_shortcut
 
 it is a really small patch, and just allows : to replace dtml- or !--#
 inside your documents, such as in the snippet below:
 
 :var foo
 :if expr="la=lala"
 So you think la and lala are the same!?
 :else
 Ah, so you see a diffrence!
 /:if

I like this syntax; I'm in favour of adding it to a future
version of Zope (2.2.1?).

Except that your patch says it's GPLed, and GPL code cannot be
added to a ZPL product; please re-release as ZPL (I'm all in
favour of GPL, but this is not a good case for it :-) )

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




RE: [Zope-dev] Confera fix

2000-06-27 Thread Jon Franz

Hrm, I'm using hot-fixed and updated 2.1.6, and cant seem to find this
anywhere on my box - and Zope throws up the error 'Invalid attribute' 
with an id of 'reg' When I try to use (unfixed) Confera with newlines 
in the body of a message... 

I'm not advocating removing or ignoring ts_regex, I just
can't find it and figured if I ran into this problem, so would others...
the code change to Confera.py was _very_ trivial, so I don't see any big 
benefit or requiring ts_regex, though...


-Original Message-
From: Pavlos Christoforou [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 27, 2000 6:19 PM
To: Jon Franz
Cc: '[EMAIL PROTECTED]'
Subject: Re: [Zope-dev] Confera fix


On Tue, 27 Jun 2000, Jon Franz wrote:

 Attached is a slightly modified Confera.py that does not require the
 ts_regex
 python package (something I do not have on my system and cant seem to 
 find - and yet something Confera will choke on during message posting if 
 it doesn't exist)
 

I have not been follwoing the email list so ignore my comments if not
applicable. ts_regex used to be part of the Zope distribution. I am not
sure what happened with the newer versions ...


Pavlos


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Zope2.2.0b3 Image/File object create/upload bug (w/patch)

2000-06-27 Thread Adam Karpierz

This bug causes that there is impossible to
add/create/upload etc. Image and/or File object
if image/file body has a file type
(type(file) == FileType) in:
def manage_addImage(self, id, file, title='',..
def manage_addFile(self, id, file='', title='',..

The patch has attached.



begin 666 Image.py.patch
M*BHJ(QI8EQP71H;VY3T937$EM86=E+G!Y+F]R9PE4=64@2G5N(#(P(#$U
M.C(X.C,Y(#(P,# *+2TM(QI8EQP71H;VY3T937$EM86=E+G!Y"5=E9"!*
M=6X@,C@@,#,Z,3,Z,S$@,C P, HJ*BHJ*BHJ*BHJ*BHJ*BH**BHJ(#DW+#$P
M-B J*BHJ"B @9G)O;2!';]B86QS(EM]R="!097)S:7-T96YT"B @9G)O
M;2!!8W%U:7-I=EO;B!I;7!OG0@26UP;EC:70*("!FF]M($1A=54:6UE
M(EM]R="!$871E5EM90H@( H@( HM(%-TFEN9U1Y4]='EP92@G)RD*
M+2 *("!M86YA9V5?861D1FEL949OFT]2%1-3$9I;4H)VEM86=E061D)RP@
M9VQO8F%LR@I+$MI;F0])T9I;4G+MI;F0])V9I;4G*0H@(1E9B!M86YA
M9V5?861D1FEL92AS96QF+ED+9I;4])RL=ET;4])RL')E8V]N9ET
M:6]N/2G+"!C;VYT96YT7W1Y4])RL"B @(" @(" @(" @(" @(" @(" @
M(%)%455%4U0]3F]N92DZ"BTM+2 Y-RPQ,#4@+2TM+0H@(9R;VT@1VQO8F%L
MR!I;7!OG0@45RVES=5N= H@(9R;VT@06-Q=6ES:71I;VX@:6UP;W)T
M($EMQI8VET"B @9G)O;2!$871E5EM92!I;7!OG0@1%T951I;64**R!F
MF]M('1Y5S(EM]R="!);G-T86YC951Y4L(%-TFEN9U1Y4*(" *
M(" *("!M86YA9V5?861D1FEL949OFT]2%1-3$9I;4H)VEM86=E061D)RP@
M9VQO8F%LR@I+$MI;F0])T9I;4G+MI;F0])V9I;4G*0H@(1E9B!M86YA
M9V5?861D1FEL92AS96QF+ED+9I;4])RL=ET;4])RL')E8V]N9ET
M:6]N/2G+"!C;VYT96YT7W1Y4])RL"B @(" @(" @(" @(" @(" @(" @
M(%)%455%4U0]3F]N92DZ"BHJ*BHJ*BHJ*BHJ*BHJ*@HJ*BH@,C@R+#(Y-R J
M*BHJ"B @"B @(" @(1E9B!?F5A9%]D871A*'-E;8L(9I;4I.@H@(" @
M(" @(" @"B @(" @(" @("!N/3$\/#$V"B @(" @(" @(" *(" @(" @(" @
M(EF('1Y4H9FEL92D@:7,@4W1R:6YG5'EP93H*(" @(" @(" @(" @("!S
M:7IE/6QE;BAF:6QE*0H@(" @(" @(" @(" @(EF('-IF4@/"!N.B!R971U
MFX@9FEL92P@VEZ90H@(" @(" @(" @(" @(')E='5R;B!09%T82AF:6QE
M*2P@VEZ90HM( HM(" @(" @(" @:68@9FEL92Y?7V-L87-S7U\@:7,@41A
M=$Z"BT@(" @(" @(" @(" @VEZ93UL96XH9FEL92D*+2 @(" @(" @(" @
M("!R971UFX@9FEL92P@VEZ90H@( H@(" @(" @(" @V5E:SUF:6QE+G-E
M96L*(" @(" @(" @(')E860]9FEL92YR96%D"BTM+2 R.#$L,CDV("TM+2T*
M(" *(" @(" @95F(%]R96%D7V1A=$HV5L9BP@9FEL92DZ"B @(" @(" @
M(" **R @(" @(" @(EF('1Y4H9FEL92D@:7,@26YS=%N8V547!E(%N
M9"!F:6QE+E]?8VQAW-?7R!IR!09%T83H**R @(" @(" @(" @("!S:7IE
M/6QE;BAF:6QE*0HK(" @(" @(" @(" @(')E='5R;B!F:6QE+"!S:7IE"BL@
M"B @(" @(" @("!N/3$\/#$V"B @(" @(" @(" *(" @(" @(" @(EF('1Y
M4H9FEL92D@:7,@4W1R:6YG5'EP93H*(" @(" @(" @(" @("!S:7IE/6QE
M;BAF:6QE*0H@(" @(" @(" @(" @(EF('-IF4@/"!N.B!R971UFX@9FEL
M92P@VEZ90H@(" @(" @(" @(" @(')E='5R;B!09%T82AF:6QE*2P@VEZ
M90H@( H@(" @(" @(" @V5E:SUF:6QE+G-E96L*(" @(" @(" @(')E860]
*9FEL92YR96%D"@``
`
end


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope] range with variables

2000-06-27 Thread Armin Wappenschmidt

Hi all,

I've a problem using the following dtml construct:

dtml-let start=Variable_from_Formular # -- that's the problem!!
dtml-let stop="100"
dtml-let period="5"
   dtml-in "_.range(start,stop,period)"
  dtml-comment do something /dtml-comment
   /dtml-in
/dtml-let
/dtml-let
/dtml-let


How can I set the variable "start" from a user given input?

Thanks!
armin

-- 
Armin Wappenschmidt - Consultant Engineer

 SDRC Ford Program OfficeSDRC Software und Service GmbH
 Spessartstrasse (D-MD/PA-2) Martin-Behaim-Strasse 12
 D-50725 Koeln-Merkenich D-63263 Neu-Isenburg
 Phone  (+49) 0221-90 33619  Phone   (+49) 06102-747-0
 Fax(+49) 0221-90 31243  Fax (+49) 06102-747 299
 PROFS  AWAPPENS
mailto:[EMAIL PROTECTED]

_/_/_/_/   _/_/_/ _/_/_/  _/_/_/_/
   _/ _/_/   _/_/_/
  _/_/_/_/   _/ _/  _/_/_/  _/
   _/   _/ _/  _/   _/ _/
_/_/_/_/   _/_/_/_/   _/ _/   _/_/_/_/
S O F T W A R E  U N D  S E R V I C E  G M B H


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] ZOracleDA

2000-06-27 Thread Michal Bukovjan

Avoid using Oracle 8.1.5 at all costs. It has mislinked executables and 
libraries, I can't believe Oracle could have released such a shit.

Instead, download and try Oracle 8.1.6 R2 - the current release.
It fixes a number of issues (though not all of them) and at least it works.

Michal Bukovjan

Citace Kiran Jonnalagadda [EMAIL PROTECTED]:

 Hi,
 
 I'm trying to install ZOracleDA. I've managed to get DCOracle to build,
 but the test fails with this traceback:
 
 -
 [root@balrog src]# python DCOracle_test.py 
 Traceback (innermost last):
   File "DCOracle_test.py", line 1, in ?
 import Buffer, oci_, sys
 ImportError: /u01/app/oracle/product/8.1.5/lib/libordvir8.so: undefined
 symbol: __pure_virtual
 -
 
 I'm running Zope 2.1.6 with Python 1.5.2 on Linux. DCOracle and
 ZOracleDA are both the stab;e releases. Oracle is 8.1.5 (needed the
 Setup file from this list).
 
 I added -lordvir8 a couple of times extra to Setup to see if this
 problem went away, but it wouldn't.
 
 nm on libordvir8.so says that it contains the __pure_virtual symbol.
 
 Does anyone know how to get around this?
 
 -- 
 
 Kiran Jonnalagadda
 http://lunateks.com
 
 baby.sh: while true; do echo "^G^G^G^G^G"; sed -e 's/food/poop/';
 sync; sync; sleep 15; done
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Access object inside a folder

2000-06-27 Thread Sin Hang Kin

Hi,

I have put objects inside a folder tabledef and would like to refer them :

dtml-in "_.getitem('tabledef').objectItems(['DTML Document'])" sort=id
mapping
dtml-var "_['sequence-item']" html_quote
/dtml-in

However, this does not work, But putting the objects in the current folder
works without problems:

dtml-in "objectItems(['DTML Document'])" sort=id
dtml-var "_['sequence-item']" html_quote
/dtml-in

I also try:

dtml-with tabledef
dtml-in "objectItems(['DTML Document'])" sort=id
   dtml-var "_['sequence-item']"
/dtml-in/dtml-with

and some other combinations, all without success.

How can I access the objects (DTML DOCUMENTS) inside a folder?

Moreover, I would like to do the following:

I have some properties of an object abc which have same name with the object
ids in the tabledef folder, I would also lookup the objects' properties :

dtml-in propertyMap mapping
   dtml-with tabledef.id
  dtml-var help
 dtml-var taborder
  /dtml-with
/dtml-in

Assume abc have a property address, then there should be a dtmldoc call
address in tabledef, which have properties "help" and "tableorder". I would
like to retrieve them.

Can somebody help me with these?

Rgs,

Kent Sin
-
kentsin.weblogs.com
kentsin.imeme.net



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Newbie: String work

2000-06-27 Thread Andy Gates

Simple stuff from the simple people today: string manipulation.

I have a string variable which has various chunks delimited by double 
tildes ~~. In order to do what I need to do, I need to extract the 
section of the string after the last double-tilde, so that

"fred~~bloggs" returns "bloggs"
"fred" returns "fred"
"fred~~bloggs~aardvark" returns "aardvark"

I can see that rfind is the thing I need to use, but as usual (gah! 
newbie!) I'm stuck on the syntax.  Help!
--
Andy Gates, Learning and Research Technology
[EMAIL PROTECTED] - ICQ#74362415


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Newbie: String work

2000-06-27 Thread Rik Hoekstra



Andy Gates wrote:
 
 Simple stuff from the simple people today: string manipulation.
 
 I have a string variable which has various chunks delimited by double
 tildes ~~. In order to do what I need to do, I need to extract the
 section of the string after the last double-tilde, so that
 
 "fred~~bloggs" returns "bloggs"
 "fred" returns "fred"
 "fred~~bloggs~aardvark" returns "aardvark"
 
 I can see that rfind is the thing I need to use, but as usual (gah!
 newbie!) I'm stuck on the syntax.  Help!


what about (in convoluted DTML very lightly tested):
dtml-call "REQUEST.set('instr', yourstring)"
dtml-call "REQUEST.set('ix', _.string.rfind(instr,'~~'))"
dtml-var "instr[ix]"

If you want the part after the ~~, you'll have to add +2 to the string
index, like instr[ix+2:]. Making this fit for the 'fred' case is left as
an exercise for the reader ;-=)

hth

Rik

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Newbie: String work

2000-06-27 Thread Geir Bækholt

on Tuesday, June 27, 2000 Andy Gates wrote :
AG Simple stuff from the simple people today: string manipulation.

AG I have a string variable which has various chunks delimited by double 
AG tildes ~~. In order to do what I need to do, I need to extract the 
AG section of the string after the last double-tilde, so that

AG "fred~~bloggs" returns "bloggs"
AG "fred" returns "fred"
AG "fred~~bloggs~aardvark" returns "aardvark"

AG I can see that rfind is the thing I need to use, but as usual (gah! 
AG newbie!) I'm stuck on the syntax.  Help!

try something like :

dtml-var expr="_.string.split('fred~~bloggs','~~')[-1]"

this is documented at
http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.4.4.2.3.html
 - but not very newbie-friendly

 took me a long time to figure out how to use :-)

--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.com



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] mod_rewrite rule to close managment screens from outsiders

2000-06-27 Thread Riku Voipio

I'm trying to deny external access to zope maintainance from elsewhere
(just for  sure), with Zope behind apache. However, It 
just doesn't seem work... Sure It's more apache's problem, but I guess 
someone around there has a working solution?

#/IfModule
dule mod_rewrite.c
RewriteEngine on
RewriteCond %{HTTP:Authorization}  ^(.*)
RewriteRule ^/Zope(.*) /usr/lib/cgi-bin/Zope/$1 
[e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]

RewriteCond %{REMOTE_ADDR} !^193\.143\.156\.(.*)
RewriteRule ^/Zope.*manage - [F]
#/IfModule

-- 
Riku Voipio
[EMAIL PROTECTED]
09-862 60764


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] ZClass question?

2000-06-27 Thread Webmaster

I am running 2.2.0b2 on a RH linux and have created a simple ZClass. All of
my modified constructor objects work perfect however when I created a
separate dtml method to add instances I get some weird errors.

First when I try and create a new instance remotely I get a zope error
"unauthorized" no matter what username and password I type. If I try and
create a new instance locally on the same box (or within the internal
network) I get a KeyError and then at the bottom of the same page is a
second included page with a 404 file not found error. If I change the method
from "post" to "get" so I can see if the new_goLiveDate is being passed I
get the "unauthorized" error.

Any idea what is going on?
Here is my "add_instance_html" code.

dtml-call "REQUEST.set('goLiveDate',REQUEST.form['new_goLiveDate'])"
dtml-with "manage_addProduct['myZClass']" 
 dtml-call "myZClass_add(_.None,_, NoRedir=1)"
/dtml-with

dtml-in "objectValues(['myclass'])"
  dtml-if "(_['sequence-item'].id == 
  REQUEST.form['new_goLiveDate'])"
dtml-call "REQUEST.set('new_goLiveDate',_['sequence-item'])"
  /dtml-if
/dtml-in
dtml-call
"_['new_goLiveDate'].propertysheets.myZClass_info.manage_changeProperties({
   'title'  : REQUEST.form['title'],
   'summary': REQUEST.form['summary'],
   'text'   : REQUEST.form['text'] 
})"

Let me know if you need more info.

-Jamey

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] embed an SQL method inside a dtml-in tag

2000-06-27 Thread jpenny

On Tue, Jun 27, 2000 at 12:05:56PM +1000, Andrew Kenneth Milton wrote:
 +[ Dieter Maurer ]-
 | Andrew Kenneth Milton writes:
 |   
 |   So...
 |   dtml-in "bcd_statement(a=a, b=b, c=c)"
 | Alternatively, you could place the values from "abc_sql_statement"
 | into the "REQUEST" object:
 | 
 | dtml-call "REQUEST.set(a=a)"
 | 
 
 Except you get one line per variable you want to set... It's ok if you've
 only got one variable and you want to use it outside the loop, setting
 four or five would get messy I think.

Actually this is not so bad.

Set up a DTML-method that has all of these calls in it.  I like to call 
mine currySomethingArgs

For example, if you have a SQL method Foo requiring args a,b,c,d,e,f,g
then curryFooArgs would have body
dtml-call "REQUEST.set(a=a)"
 .
 .
 .
dtml-call "REQUEST.set(f=f)"

and your calling sequence to Foo looks like

dtml-call curryFooArgs
dtml-call Foo

This also makes the nested SQL call problem easier to read.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] mod_rewrite rule to close managment screens from outsiders

2000-06-27 Thread Marcel Preda


- Original Message -
From: Riku Voipio [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 27, 2000 4:05 PM
Subject: [Zope] mod_rewrite rule to close managment screens from outsiders


 I'm trying to deny external access to zope maintainance from elsewhere
 (just for  sure), with Zope behind apache. However, It
 just doesn't seem work... Sure It's more apache's problem, but I guess
 someone around there has a working solution?

 #/IfModule
 dule mod_rewrite.c
 RewriteEngine on
 RewriteCond %{HTTP:Authorization}  ^(.*)
 RewriteRule ^/Zope(.*) /usr/lib/cgi-bin/Zope/$1
[e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]

 RewriteCond %{REMOTE_ADDR} !^193\.143\.156\.(.*)
 RewriteRule ^/Zope.*manage - [F]
 #/IfModule

 --


I didn't use ,  the `rewrite' module for something like this,
but I remember that the order of the rules is VERY important.
I suppose that when the first Cond is matched the last doesn't matter

So maybe is better to invert the rules...

PM




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Generating products that perform a smart clone of a master site?

2000-06-27 Thread Chris Withers

Hamish Lawson wrote:
 I envisaged turning a tutor's site into a product that could be
 instantiated.

Hi Hamish,

I'd suggest downloading the ZWikiWeb product from:
http://www.zope.org/Members/chrisw/ZWikiWeb

It does pretty much exactly what you're talking about. It's doesn't take
very long to knock up a product like this and I don't think I even used
ZClasses. My basis was the example stuff from the Zope Content Managers
Guide.

I'm guessing this is what you're trying to do. If you're looking into
using inheritence (so for example, your tutor changes his example, which
causes all the instances to be updated) then you'll need to use
ZClasses. I have vague memories of the Zope Developers Guide covering
this, if not, try BeeHive's ZClass guide.

cheers,

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] STUPID_FILE_LOGGER

2000-06-27 Thread Andy McKay

Hi,

Im trying to run Zope on Win2k and use the stupid_file_logger. No matter
what I seem to do to the command line or z2.py I still get the logs going to
stderr (ie ms-dos console). Can anyone help?

Here are command lines I have tried:

"C:\Zope\bin\python.exe" "C:\Zope\z2.py" -D
STUPID_FILE_LOGGER="c:\\zope.log" %1 %2 %3 %4 %5 %6 %7 %8 %9
"C:\Zope\bin\python.exe" "C:\Zope\z2.py" -D STUPID_FILE_LOGGER="c:\Zope.log"
%1 %2 %3 %4 %5 %6 %7 %8 %9
"C:\Zope\bin\python.exe" "C:\Zope\z2.py" -D "STUPID_FILE_LOGGER=c:\zope.log"
%1 %2 %3 %4 %5 %6 %7 %8 %9

etc..

I was hoping to write my own Logger, but when they didnt work to well I
thought using the stupid_file_logger would suffice...

Thanks.



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Can't override standard_error_message on NotFound?

2000-06-27 Thread R. David Murray

On Mon, 26 Jun 2000, matt wrote:
 I'm having some problems with standard_error_message on 2.2.0b2.  According to the 
mailing list archives I should be able to override NotFound errors (I even 
cut-n-pasted http://www.zope.org/standard_error_message/view_source into my own 
standard_error_message in case I was missing something) but requesting a nonexistent 
object still gets me what appears to be a built-in page.

Usually this means your standard_error_message is throwing an exception,
in which case Zope use the one hardcoded in the source.

--RDM


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Can't override standard_error_message on NotFound?

2000-06-27 Thread Chris Withers

"R. David Murray" wrote:
 On Mon, 26 Jun 2000, matt wrote:
  I'm having some problems with standard_error_message on 2.2.0b2.  According to the 
mailing list archives I should be able to override NotFound errors (I even 
cut-n-pasted http://www.zope.org/standard_error_message/view_source into my own 
standard_error_message in case I was missing something) but requesting a nonexistent 
object still gets me what appears to be a built-in page.

standard_error_message is also notoriously buggy in the way it handles
things unless you're using Zope 2.2. I have lost significant hair in
this area ;-)

 Usually this means your standard_error_message is throwing an exception,
 in which case Zope use the one hardcoded in the source.

The way to check this is to look at the error. If your error message is
throwing an exception, the origin of the error will be your error page.
If it's still showing the original Not Found error then you're suffering
from bugginess.

HTH,

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] PowerMac 7500 with LinuxPPC and Zope?

2000-06-27 Thread Daniel Muller

Hi,

I would like to turn an old Mac 7500 into a Zope server.  LinuxPPC installs
on the Mac PowerPC using the Red Hat 6.1 linux distribution.  Does anyone
have any experience with Zope with this type of set up?

Should I consider a different linux distribution than PPC?

Thanks,  Daniel 

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] STUPID_FILE_LOGGER

2000-06-27 Thread Andy McKay

The document by Amos (http://www.zope.org/Documentation/Misc/LOGGING.txt)
says set the
"STUPID_FILE_LOGGER" variable. That doesnt work but STUPID_LOG_FILE does. I
just set it in the command line:

"C:\Zope\bin\python.exe" "C:\Zope\z2.py" -D STUPID_LOG_FILE="C:\zope.log"

Thanks.

- Original Message -
From: "Loren Stafford" [EMAIL PROTECTED]
To: "Andy McKay" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, June 27, 2000 11:04 AM
Subject: RE: [Zope] STUPID_FILE_LOGGER


 I develop on Win98 with MKS tools. Using the MKS shell, this is what works
 for me, but may not be relevnt to you:

  C:/Zope220b3/bin/python.exe C:/Zope220b3/z2.py -D
 STUPID_LOG_FILE=C:/Zope220b3/var/stupidlog.txt

 Before I started using MKS shell, I just set STUPID_LOG_FILE in the
 environment before starting Zope:

set STUPID_LOG_FILE=C:\Zope\var\zopeapp.log

 If you don't find another solution, try the FrozenLogger product, which
sets
 STUPID_LOG_FILE for you from inside Zope.
 http://www.zope.org/Members/lstaffor/FrozenLogger

 -- Loren

  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Andy
  McKay
  Sent: Tuesday, June 27, 2000 08:59
  To: [EMAIL PROTECTED]
  Subject: [Zope] STUPID_FILE_LOGGER
 
 
  Hi,
 
  Im trying to run Zope on Win2k and use the stupid_file_logger. No matter
  what I seem to do to the command line or z2.py I still get the
  logs going to
  stderr (ie ms-dos console). Can anyone help?
 
  Here are command lines I have tried:
 
  "C:\Zope\bin\python.exe" "C:\Zope\z2.py" -D
  STUPID_FILE_LOGGER="c:\\zope.log" %1 %2 %3 %4 %5 %6 %7 %8 %9
  "C:\Zope\bin\python.exe" "C:\Zope\z2.py" -D
  STUPID_FILE_LOGGER="c:\Zope.log"
  %1 %2 %3 %4 %5 %6 %7 %8 %9
  "C:\Zope\bin\python.exe" "C:\Zope\z2.py" -D
  "STUPID_FILE_LOGGER=c:\zope.log"
  %1 %2 %3 %4 %5 %6 %7 %8 %9
 
  etc..
 
  I was hoping to write my own Logger, but when they didnt work to well I
  thought using the stupid_file_logger would suffice...
 
  Thanks.
 
 
 
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope-dev )
 



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Making ZCatalog catalog the results from a ZSQL query

2000-06-27 Thread Ivan Raikov


Greetings,

How can I make a ZCatalog object to catalog the result set produced
from a ZSQL method?

I'm subclassing ZCatalog and replacing the default manage_catalogFind
with a DTML method which in turn invokes a ZSQL method, but I get an
error, "You are not authorized to access SQLPatientSearch."
(SQLPatientSearch is the ZSQL method). I think I've set all
permissions right, so I don't know why I get this, but I was wondering
if someone can come up with an easier way to do this.

Thank you very much,
Ivan Raikov

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] how to get email delivery errors

2000-06-27 Thread Dan Rusch

Our site allows supervisors to email orders back to sales reps. We have
this working very well. The problem is if the supervisor types in an
non-existant email address we aren't getting Mail System Error -
Returned Mail messages like you would from other email apps such as
Netscape Messenger. Does anyone know how to accomplish this.

Thanks,
 DR


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] ZCatalog counting?

2000-06-27 Thread Alexander Limi

Hi,

A presumably simple question:

Is there an easy way to count the number of occurences of a certain meta
type in a Catalog? E.g: I want a dtml snippet that outputs:

There are 123 DTML Documents in the Catalog.

I've browsed the howto's, but didn't find anything like this. Can anybody
offer me some assistance?

Thanks in advance,


Alexander.



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] standard_html_header/footer for Help system in 2.2

2000-06-27 Thread Ron Bickers

The help system in 2.2 is looking great, with a minor annoying "feature".
The left-side navigational window uses my standard_html_header and footer,
which is not at all appropriate for a navigational window (it includes
navigational bars of its own and causes a big horizontal scrolling
situation).

The right-side topic window has its own very basic header and footer. Is
there a way (short of me modifying the help system) to get it to use a more
plain header/footer?  Maybe it should not use mine at all, but use its own
as does the Zope management interface itself.

___

Ron Bickers
Logic Etc, Inc.
[EMAIL PROTECTED]


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] ZOracleDA and Zope 2.2?

2000-06-27 Thread Christian Scholz

Hi!

I am encountering the following problem when using ZOracleDA 2.2.0b1
and Zope 2.2b2/3:

When creating a ZOracle Connection and giving the wrong connection string
then whole Zopes crashs with

OCI_ERROR at oci_8.c:283
ORA-12541: TNS:no listener
OCI_ERROR at oci_8.c:283
ORA-12154: TNS:could not resolve service name

(this is just a test with no Oracle running).

Sometimes it automatically restarts but sometimes not (after the second try).

I cannot remember to have this seen in 2.1, so a new bug?

(When you give the right string everything is ok)


regards,
  Christian



-- 
COM.lounge  http://comlounge.net/
communication  design [EMAIL PROTECTED]

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] ZODB/FSSession TransactionError

2000-06-27 Thread Brian McClain

On Tue, Jun 27, 2000 at 02:40:49PM -0400, Brian McClain wrote:
[...]
 I have plenty of disk space and have tried reinstalling FSSession/Zope, 
 rebooting, etc... 
 
 I am running Zope 2.1.0 and FSSession 0.3.1

What operating system do you use ? Have you checked the partition on 
which Zope resides for filesystem errors ?

-Petru

I'm using linux 2.0.36 (redhat 5.2).  When rebooting, fsck checked the 
partition Zope resides in and gave it a clean bill of health.

-Brian

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Re: Slow File Access With LocalFS

2000-06-27 Thread Jonothan Farr


It sounds to me like the Apache server is just writing the data directly to the
HTTP connection as it is read. I believe that's how HTTP "streaming" works. I
also believe this is possible to do using the Zope HTTPResponse object. Does
anyone have any ideas?

--jfarr

"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998

- Original Message -
From: Rob Pratt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 27, 2000 10:56 AM
Subject: Re: Slow File Access With LocalFS


 Hey, thanks for the quick reply.

  No, it just takes a while to read a very large file and construct the
 ZObject
  (performance patches accepted ;)). It can also take a while to download
 them
 but
  that should be obvious. How is it that you're "streaming" the mp3 files?

 Sorry. Streaming is not exactly the right word I think. What I have set up
 is that Zope delivers a playlist (*.m3u), which is opened by a player on
 the
 local machine (assuming there's one installed), and the player app in turn
 makes a request for the actual mp3 file, which starts playing as soon as
 it's properly buffered in the player app. That avoids having to download
 each mp3 before playing it.

 I had the collection stashed behind an Apache rewrite rule, but when I
 checked out LocalFS, I decided to try to move it into Zope under a LocalFS
 object (which I can use to control access to the files more easily than in
 Apache). Using Apache rewrite, requests for mp3 files just bypassed Zope,
 and "streaming" was immediate. But handled as a LocalFS object, mp3 file
 requests (I guess from your reply) have to wait to create the ZObject
 before
 they start "streaming."

 Is there a way to get LocalFS to serve up the file without creating a
 ZObject?

 Wish I knew more about Python and programming. (I'm workin' on it, but it's
 a steep learning curve for a newbie like me.) I'd jump in and see if I
 could
 come up with a performance patch.

 Anyway, I've just started learning Zope, and I see that it has immense
 possibilities for automating a lot of what I do in my day job (I'm an
 editor
 for an alternative newsweekly in Santa Cruz, Calif., USA). The application
 I
 envision will probably make heavy use of the LocalFS product.

 I was hoping that it would be easy to digitize our extensive demo library
 on touring
 bands so that I wouldn't have to lend CDs to writers who never seem to
 return them ;) I could just get an intern to rip CDs into mp3s and post
 them
 on a password-protected mp3 server, and all the writers could have 24-7
 access.

 That's just one feature. Many, many others that I can think of (not
 involving mp3s ;)) could take hours and hours of work off of my weekly
 workload.



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Kinterbasdb

2000-06-27 Thread Chris Beaumont

Hi David,

Thank you for the thoughtful response..
I agree that having KInterbasdb would not solve our DA problem, but at
least it would let me use the new Interbase Storage option..

A few people have been successful doing this, (compiling KInterbasdb
with IB6beta) perhaps one of them could write up a HowTO?

Thank you.
Chris Beaumont

David Trudgett wrote:
 
 At 2000-06-23 11:40 -0700, you wrote:
 Hello..
 
 I hope this isn't asking too much...
 
 Can someone who has successfully compiled Kinterbasdb for use with Zope
 make non-programmer-friendly information on how to compile it for the
 current glibc and Version of Interbase (6.0 beta) available? I haven't
 been having any luck and my email to the author has bounced..
 
 Even having Kinterbasdb compiled would not be the end of our problems. I
 believe a DA (Database Adapter) for Zope would still need to be written,
 and that would be a reasonably onerous task (even though there's a howto
 that says it's easy -- all things are relative I suppose). Given that
 you're a non-programmer, the task is well-nigh impossible. (I'm a
 programmer myself, but I don't think I have the required experience in
 database API programming/Zope/Python to make it reasonably feasible for me
 to do it (though I would like to, because I would like to access InterBase
 database(s) from within Zope).
 
 I understand that the InterBase people are interested in getting InterBase
 working with Zope, and there is/was even an initiative to bring Zope and
 InterBase close together so that InterBase could serve the function that
 the ZODB currently fulfills. The InterBase people themselves are, of
 course, flat out at present getting version 6 ready for release within the
 next few days (unless they break their stated deadline of the end of June).
 
 A possible work-around until an InterBase DA is available, might be to use
 IBPerl and Perl CGI or mod_Perl under Apache to read the InterBase database
 and output the required results, but wrap those results with Zope stuff
 (using SiteAccess, i believe). I'm only just starting to think about doing
 this myself, so don't ask me for any more detail than that! (Unfortunately,
 that suggestion may be a bit difficult if you don't program in Perl.)
 
 Good luck.
 
 David Trudgett

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] DTML/ZClass question

2000-06-27 Thread Andy McKay

You are correct, you're ZClass is not rendering the dtml and it wont. The
easiest way I found is simply not to try and find another solution. I came
across the same problem a while ago when I was just starting out with Zope.

I have solved the problem now, its written in python and derives from
DTMLDocument and its based on the ZWiki code which accomplishes rendering
quite well.

- Original Message -
From: "James W. Howe" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 27, 2000 11:50 AM
Subject: [Zope] DTML/ZClass question


 I have a ZClass that I created to hold information about a person.  The
 object has two attributes at the moment, name and bio.  Elsewhere I have a
 page layout which makes reference to a "pageContents" value.  I want to
 display my person objects using this layout but the object doesn't have a
 pageContents attribute.  I added a pageContents method to the ZClass which
 references my "bio" property.  The bio information appears, but if the bio
 text contains any dtml, the raw dtml code is displayed (actually it's not
 visible except if you do a "View Source").  I'm assuming that what is
 happening is that somehow my "bio" information isn't being rendered, but
is
 being returned intact as a string which ultimately gets stuck in my
browser
 page.  My question is this, what is the recommended way to create an
 "alias" for a property defined in a ZClass?

 Thanks.

 James W. Howe mailto:[EMAIL PROTECTED]
 Allen Creek Software, Inc. pgpkey: http://ic.net/~jwh/pgpkey.html
 Ann Arbor, MI  48103


 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] ZCatalog counting?

2000-06-27 Thread Rik Hoekstra

A presumably simple question:

Is there an easy way to count the number of occurences of a certain meta
type in a Catalog? E.g: I want a dtml snippet that outputs:

There are 123 DTML Documents in the Catalog.

I've browsed the howto's, but didn't find anything like this. Can anybody
offer me some assistance?



To quote a mail by RD Murray from a gew days ago:

 How do I find the size of the results returned by the catalog?
 dtml-let results=Catalog()
 dtml-var "_.len(results)" -- the results' length --
 /dtml-let

Also at the zdp site:

http://zdp.zope.org/projects/zsnippet/snippets/DTMLContent/CatalogResLength

Rik


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] SV: [Zope] Newbie: String work

2000-06-27 Thread peter be

Hello Andy

the syntax should be 

let string = "fred~~bloggs~aardvark"

_.string.split(string,'~~')[-1]
i.e.
dtml-var "_.string.split(string,'~~')[-1]"

Should work.

In python, it's the same thing. 

- Original Message - 
From: Andy Gates [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 27, 2000 12:39 PM
Subject: [Zope] Newbie: String work


 Simple stuff from the simple people today: string manipulation.
 
 I have a string variable which has various chunks delimited by double 
 tildes ~~. In order to do what I need to do, I need to extract the 
 section of the string after the last double-tilde, so that
 
 "fred~~bloggs" returns "bloggs"
 "fred" returns "fred"
 "fred~~bloggs~aardvark" returns "aardvark"
 
 I can see that rfind is the thing I need to use, but as usual (gah! 
 newbie!) I'm stuck on the syntax.  Help!
 --
 Andy Gates, Learning and Research Technology
 [EMAIL PROTECTED] - ICQ#74362415
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] ZCatalog counting?

2000-06-27 Thread Erik Enge


On Tue, 27 Jun 2000, Alexander Limi wrote:

 Is there an easy way to count the number of occurences of a certain meta
 type in a Catalog? E.g: I want a dtml snippet that outputs:

Couldn't you do:

dtml-call "REQUEST.set('counter', 0)"

dtml-in "objectValues('DTML Document')"
  dtml-call "REQUEST.set('counter', counter+1)"
/dtml-in

This folder (dtml-var title_or_id) has dtml-var counter
number of objects with the meta type DTML Document.




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] ZCatalog counting?

2000-06-27 Thread Andy McKay

But that assumes that they are all in the same folder... a ZCatalog query
where meta-type = 'DTML Document' followed by a simple sequence-length would
get around that. And I think (but dont quote me on this) that a ZCatalog
search is quicker than objectValues.

- Original Message -
From: "Erik Enge" [EMAIL PROTECTED]
To: "Alexander Limi" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, June 27, 2000 1:35 PM
Subject: Re: [Zope] ZCatalog counting?



 On Tue, 27 Jun 2000, Alexander Limi wrote:

  Is there an easy way to count the number of occurences of a certain meta
  type in a Catalog? E.g: I want a dtml snippet that outputs:

 Couldn't you do:

 dtml-call "REQUEST.set('counter', 0)"

 dtml-in "objectValues('DTML Document')"
   dtml-call "REQUEST.set('counter', counter+1)"
 /dtml-in

 This folder (dtml-var title_or_id) has dtml-var counter
 number of objects with the meta type DTML Document.




 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] ZWiki/Structured Text formatting surprise

2000-06-27 Thread Rik Hoekstra




Hi,

Just noticed that (_.None,_, gets rendered as (.None,, in a structrued
text wiki. Not useful :/


Hm, in a structuredtextdtml Wiki (such as the Zope edu Wiki) this works. See
the SandBox there http://www.zope.org/Wikis/zope-edu/SandBox. So I can't
reproduce it now.


I've got around this by doing ('_'.None,_, but that's not really the
right idea.

Does anyone know of the proper way of escaping this?


Won't the !_.None help?

Rik



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] ZClass question?

2000-06-27 Thread Webmaster

I am using DTML methods on all.

 -Original Message-
 From: Erik Enge [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, June 27, 2000 4:37 PM
 To:   Webmaster
 Cc:   [EMAIL PROTECTED]
 Subject:  Re: [Zope] ZClass question?
 
 On Tue, 27 Jun 2000, Webmaster wrote:
 
  First when I try and create a new instance remotely I get a zope error
  "unauthorized" no matter what username and password I type. If I try and
 
 Are you using DTML Methods or Documents?  I've heard other talking
 about creating roles, but I switched from DTML Documents to DTML
 Methods and tde 'unauthorized' message went away.  Don't know why :-(.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] ZCatalog counting?

2000-06-27 Thread Rik Hoekstra




On Tue, 27 Jun 2000, Alexander Limi wrote:

 Is there an easy way to count the number of occurences of a certain meta
 type in a Catalog? E.g: I want a dtml snippet that outputs:

Couldn't you do:

dtml-call "REQUEST.set('counter', 0)"

dtml-in "objectValues('DTML Document')"
  dtml-call "REQUEST.set('counter', counter+1)"
/dtml-in

This folder (dtml-var title_or_id) has dtml-var counter
number of objects with the meta type DTML Document.


um, not to be nitpicking, but if you'd want to know the number of objects
with a certain meta-type in a folder, the following is a bit shorter and
saves you an iteration:

 untested

dtml-call "REQUEST.set('counter', _.len(objectValues(['DTML Document'])"
This folder (dtml-var title_or_id) has dtml-var counter
 number of objects with the meta type DTML Document.

dtml-let counter="_.len(objectValues(['DTML Document'])"
   This folder (dtml-var title_or_id) has dtml-var counter
   number of objects with the meta type DTML Document.
/dtml-let

/untested not entirely sure of the dtml-let syntax, but you get the idea

Rik



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Still Problem with LocalFS

2000-06-27 Thread jensebaer


- Original Message -
From: jensebaer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, June 24, 2000 6:52 PM
Subject: Re: [Zope] Re: Problem with LocalFS


Ok now I placed the dtml files (savefile.dtml upload.dtml) in the LocalFS
Folder but the problem is still the same:
When I use manage_addImage (now from inside LocalFS) the new image is
created in the folder above.
I don´t no how but there must be a way to add an Image to LocalFS by using
another addimage form then the given.
My I have to use another manage function?
Or is there a special sytax to do this?
You wrote that it works from inside LocalFS so may you can give me an
example.

Thank you

Jens


- Original Message -
From: Jonothan Farr [EMAIL PROTECTED]
To: jensebaer [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, June 23, 2000 2:35 AM
Subject: [Zope] Re: Problem with LocalFS


This is a known problem with LocalFS. The only workaround I know of is to
put
your dtml code into a file, give it a .dtml extension, and place it in the
directory you want to upload to. This problem will be addressed in the next
version of LocalFS.

--jfarr

"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998

- Original Message -
From: jensebaer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 22, 2000 5:23 PM
Subject: [Zope] Problem with LocalFS


Hello,

I want to upload files to LocalFS.
I created a LocalFS with the id: images

I don´t want to use the existing addImageForm to create a new Image in the
LocalFS.

I want to use two DTML Methods

uploadform

  form action="savefile" methode="POST" ENCTYPE="multipart/form-data"
  Fileinput type="file" name="file" size="25" value=""br
  input type="submit" value="UPLOAD"


and send the data to:

savefile

dtml-call "images.manage_addImages('newfile',file,'titleof tempfile')"


but this do not create a new image in the LocalFS.
It creates an image in the Folder in which the the LocalFS exists.

I do not understand why 

Jens



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] DTML question

2000-06-27 Thread Luke Tymowski

Hello,

I want to retrieve the last 3 filenames from a subfolder and display them in
a document. If I set the size of the retrieval to 1, I get just 1 name
returned. If I set the size to 3, I get everything in the folder. (if I use
2 I also get everything in the subfolder )

Here is my code (using 2.2b2):

dtml-with Document
  dtml-in "objectValues(['DTML Document'])" size=3 sort=id
  dtml-var id dtml-var titlebr
  /dtml-in
/dtml-with

thanks,

Luke


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Data.fs.lock?

2000-06-27 Thread addyd

The tech that does backups on my new NT server (IIS) tells me that
everything backs up ok except the \var\Data.fs.lock file.
Is that normal or a problem?

Darren Addy
Internet Specialist and
Interim Web Presence Coordinator
Office of Information Technology Services
University of Nebraska at Kearney


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] How to retrieve content of a document?

2000-06-27 Thread Luke Tymowski

Hello,

Yet another question. I've gone through the DTML Reference Guide but
couldn't find the answer.

How do I display the content of a DTML Document through a query?

For example:

dtml-with Document
  dtml-in "objectValues(['DTML Document'])" size=3 sort=id
  dtml-var id dtml-var titlebr
  /dtml-in
/dtml-with

Displays the document's name and title. But how do i display the content of
that document within that query?

I apologise if it's obvious.

thanks,

Luke


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] ZODB performance: reads to writes

2000-06-27 Thread Ty Sarna

In article 000d01bfddfb$4546f070$[EMAIL PROTECTED],
Evan Simpson [EMAIL PROTECTED] wrote:
 - Original Message -
 From: Jimmie Houchin [EMAIL PROTECTED]
 
  Will an app as described above still suffer from problems with high
 writes?
 
 Possibly, but only if there are hidden hotspots.  For example, in your
[...] 
 2. Implement the application-level conflict handling you read about, so that
 Folders and Catalogs can decide that two writes don't conflict after all,
 and merge them into a single update.

Unfortunately, this doesn't deal with cases where the conflicting state
is contained in many objects (see note by PJE in the ZODB Wiki).

Also, there is a whole other area of difficulty for high-write-volume
ZODBs, which is the ammount of IO that needs to be done.  First, by
nature ZODB can't rewrite a single attribute of an object, it has to
rewrite the entire thing.

Indexing is also a bear from an IO perspective.  First, BTrees currently
keep a count at each level, so every change to a btree changes a node at
each level of the BTree.  For a ZCatalog, there are a lot of btrees
(something like 2n+4 for n indexes, I think -- don't quote me on that,
it's been a while), and each one changes (last I looked, every index was
updated even if the value indexed in a particular one hadn't changed. 
This may have been improved since).  Not only is this bad from a hotspot
point of view (always a conflict on the root node of the tree), but you
end up doing a *lot* of IO.  During my experiments that led to
BerkeleyStorage, I was watching the Data.fs grow by 47K per transaction
for adding indexed objects of ~1K in size.  Watching this with
tranalyzer, this turns out to be 1K of object, and 46K of updated btree
pages :).  Note that BerkeleyStorage only prevents the file from growing
that much -- it still has to do all that IO (in fact, it has to do ~2-3
times that much IO, due to the nature of BerkeleyDB.  A relational
storage would have similar issues.  For ammount of IO done, FileStorage
is about as efficient as you can possibly be -- it's just that it trades
that off against space reclamation). 

Also, with any kind of Berkeley or Relational storage, there is a second
hidden IO and storage penalty: you're storing a btree inside a btree. In
other words, the lower-level DB uses btrees to store your objects,
including interior nodes of the higher-level ZODB btree. Every interior
node of the ZODB Btree needs a leaf node (and supporting interior nodes)
in the DB's btrees. so you get taxed twice, on both I/O and storage
space used.

Not to discourage anyone from using ZODB, necessarily.  There are a lot
of things it's fantastic for, and without a doubt ZODB is getting better
at handling higher write ratios. Over time there will be more and
more applications that previously would have required an external SQL or
other kind of database that can be done in ZODB instead.  However, there
will also IMHO always be applications that ZODB just isn't as suitable
for. You have to thing long and hard before committing to one or ther
other. And then there's the worry of what happens if you chose wrong.

We were faced with exactly these issues, and the extremes of them, to
boot.  We have a *large*, *very* high write ratio, lots of indexes type
of application based on ZPublisher/DTML that we'd like to port
to/replace with something Zope based.  Yet we might need to make another
instance of this same type of application used by only a few people with
a small ammount of data -- it would really suck to have to have to have
another instance of the same expensive database system to support a
miniscule ammount of data, because everything was coded only with SQL in
mind). 

This is what led ultimately to ZPatterns -- you can write applications
and not have to decide up front on ZODB or SQL.  And you can change your
mind later (Seen that TV commercial? suddenly your online store is
selling a zillion items per month instead of the 1000 you planned for. 
oops!).  You can even decide on an instance by instance basis.  You
configure with ZODB for a small department or client, and Oracle or
Sybase for a huge one -- and the small guy doesn't have to pay for the
DB license and DBA!). Since then, we've discovered a number of other
benefits to the model.

Hmmm... I didn't intend to write a ZPatterns advertisement when I
started, honest! But this seems to have turned into one nonetheless :^)

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Adding users via external method

2000-06-27 Thread Timothy Grant

Following up on my own message...

OK, so now I have a lovely external method that reads a datafile, returns a
list of tuples that I can then use in a DTML Method to add my users. So far
so good.

I have come upon some situations where I also need to add Roles. I can find
nothing archived nor on the Zope site about programmatically adding Roles.
Can anyone assist me?

Thanks.

On Wed, Jun 21, 2000 at 12:45:27PM -0700, Timothy Grant wrote:
 Hi all,
 
 I'm working on a project where it would be very nice to add all the original
 users via a script.
 
 I'm working with an external method that should--I believe use manage_user()
 to add the users.
 
 My confusion comes from where does the external method go in the hierarchy?
 From my reading it appears that to act on a folder, you need to be operating
 within that folder (e.g., I can add folders and stuff to my current folder
 all day). I haven't yet figured out how to operate on the acl-users folder
 that is the child of my current folder.
 
 As always, thanks for any assistance that you can provide.

-- 
Stand Fast,
tjg.

Timothy Grant [EMAIL PROTECTED]
Chief Technology Officer  www.exceptionalminds.com
Red Hat Certified Engineer  (503) 246-3630
Avalon Technology Group, Inc.   fax (503) 246-3124
Linux...Because crashing isn't normal

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] ZODB/FSSession TransactionError

2000-06-27 Thread Pavlos Christoforou

On Wed, 28 Jun 2000, Dieter Maurer wrote:

 
 That's strange, because Python usually indicates EOF by returning
 an empty string and not by raising EOFError.

cPickle returns EOFError which is confusing since the Python docs state
that only input and raw_input return this exception.

The problem is actually deeper than I previously thought. I am still not
sure whether it is FSSession that is causing it or Zope's transaction
manager. I will spend more time on it tomorrow. In any case if you delete
the offending FSSession file on the filesystem and restart Zope it should
be fine for now.

Pavlos 


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] how to get email delivery errors

2000-06-27 Thread Ben Leslie

On Tue, 27 Jun 2000, Dan Rusch wrote:

 Our site allows supervisors to email orders back to sales reps. We have
 this working very well. The problem is if the supervisor types in an
 non-existant email address we aren't getting Mail System Error -
 Returned Mail messages like you would from other email apps such as
 Netscape Messenger. Does anyone know how to accomplish this.
 
 Thanks,
  DR


AFAIK Returned Mail messages are generated by the SMTP server, not by the
email client application. 

The reason you might not be recieving these _could_ be because the headers 
are being incorrectly genereated. You probably want to check what you set
the "From:" header as, this would usually be the address that any errors
are sent to (unless you state a "Sender:" header in which case that is used
IIRC, you can always check RFC822 ;).

I would suggest checking the smtp server logs to see what is actually happening
here.

Cheers,

Benno

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] ZODB/FSSession TransactionError

2000-06-27 Thread Brian McClain

Well, I got a second installation of Zope running OK in another directory
after correcting some group/permission errors on my part.  It seems I can 
now use FSSession with this second installation with no problems
(fingers crossed "Oh please please please").

In my original Zope installation, I'm still getting the same EOFError when I
try to view a document containing dtml-call FSSession.  I have been unable
to reproduce the original TransactionError in the original Zope.  I have mucked
around with the 1st Zope since receiving this initial TransactionError - mostly
removing var/Data.fs, etc.. and reinstalling FSSession etc... so that I could 
start "fresh". 

If I get the original Zope to behave I'll describe the procedure...
Thanks,
Brian



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Prototyped folders?

2000-06-27 Thread Jeff Hoffman

On Tue, 27 Jun 2000, [iso-8859-1] Hamish Lawson wrote:

 If a folder doesn't itself contain a required object or method, I'd
 like to have another folder looked in instead. The fall-back folder
 won't necessarily (and often can't) be higher in the hierarchy, so
 acquisition doesn't seem to be a solution. 

We do something very similar with our customers, and are in the process of
figuring out the best way to do this kind of thing in Zope. I assume your
aim is to create a 'baseline' site with a number of customized copies. If
you change the baseline, the changes are reflected in its instances,
unless the instance has overloaded the changed aspect.

We have a site (actually 109), built on our proprietary middleware that
do exactly this (check out http://www.pgdc.net).

 Inheritance from a folderish class seems to be one solution, but I fear
 this might lead to an explosion of classes.

Indeed, I believe the same.

 The answer I think I need is to have a protoype mechanism (similar to
 that used in JavaScript and Self). A folder with the requirement to have
 its missing methods looked for elsewhere would be created as an instance
 of (say) PrototypedFolder with a pointer to the folder it wanted to use
 as a prototype. Does such a mechanism exist for Zope?

I achieved something similar to this by using a ZClass mix-in. My mix-in
basically overloaded ObjectManager._checkId to allow me to overload
aspects of a ZClass on an instance-by-instance basis. If the instance did
not overload the method, Zope would fall back to the ZClass's method
definition.

Unfortunately, my attention has been focused elsewhere, lately, and I
haven't had time to flesh this idea out. Getting this to work isn't the
hard part. Getting it to work well, in a way that allows web developers to
(easily) visualize what's going on is, unfortunately, much harder.

I would be interested in pursuing and contributing to an effort to do the
Hard Thinking this will require, done correctly.

 Hamish Lawson
 University of St Andrews, Scotland

--Jeff

---
Jeff K. Hoffman   704.849.0731 x108
Chief Technology Officer  mailto:[EMAIL PROTECTED]
Going Virtual, L.L.C. http://www.goingv.com/


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Access object inside a folder

2000-06-27 Thread Sin Hang Kin

dtml-in "_.getitem('tabledef').objectItems(['DTML Document'])" sort=id
mapping
dtml-var "_['sequence-item']" html_quote
/dtml-in

Error Type: AttributeError
Error Value: __getitem__
Traceback (innermost last):
  File C:\Program Files\Zope2\lib\python\ZPublisher\Publish.py, line 222, in
publish_module
  File C:\Program Files\Zope2\lib\python\ZPublisher\Publish.py, line 187, in
publish
  File C:\Program Files\Zope2\lib\python\Zope\__init__.py, line 221, in
zpublisher_exception_hook
(Object: ElementWithAttributes)
  File C:\Program Files\Zope2\lib\python\ZPublisher\Publish.py, line 171, in
publish
  File C:\Program Files\Zope2\lib\python\ZPublisher\mapply.py, line 160, in
mapply
(Object: addNew)
  File C:\Program Files\Zope2\lib\python\ZPublisher\Publish.py, line 112, in
call_object
(Object: addNew)
  File C:\Program Files\Zope2\lib\python\OFS\DTMLMethod.py, line 168, in
__call__
(Object: addNew)
  File C:\Program Files\Zope2\lib\python\DocumentTemplate\DT_String.py, line
500, in __call__
(Object: addNew)
  File C:\Program Files\Zope2\lib\python\DocumentTemplate\DT_In.py, line
691, in renderwob
(Object: _.getitem('tabledef').objectItems(['DTML Document']))
  File C:\Program Files\Zope2\lib\python\DocumentTemplate\DT_Var.py, line
278, in render
(Object: _['sequence-item'])
  File C:\Program Files\Zope2\lib\python\DocumentTemplate\DT_Util.py, line
333, in eval
(Object: _['sequence-item'])
(Info: _)
AttributeError: (see above)


 You note, that your examples have an essential difference:
 1 uses "mapping", 2 does not.

dtml-with tabledef
dtml-in "objectItems(['DTML Document'])" sort=id
dtml-var "_['sequence-item']"
/dtml-in
/dtml-with

Error Type: AttributeError
Error Value: __call__
Traceback (innermost last):
  File C:\Program Files\Zope2\lib\python\ZPublisher\Publish.py, line 222, in
publish_module
  File C:\Program Files\Zope2\lib\python\ZPublisher\Publish.py, line 187, in
publish
  File C:\Program Files\Zope2\lib\python\Zope\__init__.py, line 221, in
zpublisher_exception_hook
(Object: ElementWithAttributes)
  File C:\Program Files\Zope2\lib\python\ZPublisher\Publish.py, line 171, in
publish
  File C:\Program Files\Zope2\lib\python\ZPublisher\mapply.py, line 160, in
mapply
(Object: addNew)
  File C:\Program Files\Zope2\lib\python\ZPublisher\Publish.py, line 112, in
call_object
(Object: addNew)
  File C:\Program Files\Zope2\lib\python\OFS\DTMLMethod.py, line 168, in
__call__
(Object: addNew)
  File C:\Program Files\Zope2\lib\python\DocumentTemplate\DT_String.py, line
500, in __call__
(Object: addNew)
  File C:\Program Files\Zope2\lib\python\DocumentTemplate\DT_With.py, line
146, in render
(Object: tabledef)
  File C:\Program Files\Zope2\lib\python\DocumentTemplate\DT_In.py, line
691, in renderwob
(Object: objectItems(['DTML Document']))
  File C:\Program Files\Zope2\lib\python\DocumentTemplate\DT_Util.py, line
339, in eval
(Object: _['sequence-item'])
(Info: _)
  File string, line 0, in ?
  File C:\Program Files\Zope2\lib\python\DocumentTemplate\DT_Util.py, line
163, in careful_getitem
  File C:\Program Files\Zope2\lib\python\OFS\DTMLDocument.py, line 164, in
__call__
(Object: f1)
  File C:\Program Files\Zope2\lib\python\DocumentTemplate\DT_String.py, line
500, in __call__
(Object: f1)
  File C:\Program Files\Zope2\lib\python\OFS\DTMLMethod.py, line 164, in
__call__
(Object: addNew)
  File C:\Program Files\Zope2\lib\python\DocumentTemplate\DT_String.py, line
500, in __call__
(Object: addNew)
  File C:\Program Files\Zope2\lib\python\DocumentTemplate\DT_With.py, line
132, in render
(Object: tabledef)
AttributeError: (see above)

If I add mapping:
dtml-with tabledef
dtml-in "objectItems(['DTML Document'])" sort=id mapping
dtml-var "_['sequence-item']"
/dtml-in
/dtml-with

Error Type: AttributeError
Error Value: __getitem__
Traceback (innermost last):
  File C:\Program Files\Zope2\lib\python\ZPublisher\Publish.py, line 222, in
publish_module
  File C:\Program Files\Zope2\lib\python\ZPublisher\Publish.py, line 187, in
publish
  File C:\Program Files\Zope2\lib\python\Zope\__init__.py, line 221, in
zpublisher_exception_hook
(Object: ElementWithAttributes)
  File C:\Program Files\Zope2\lib\python\ZPublisher\Publish.py, line 171, in
publish
  File C:\Program Files\Zope2\lib\python\ZPublisher\mapply.py, line 160, in
mapply
(Object: addNew)
  File C:\Program Files\Zope2\lib\python\ZPublisher\Publish.py, line 112, in
call_object
(Object: addNew)
  File C:\Program Files\Zope2\lib\python\OFS\DTMLMethod.py, line 168, in
__call__
(Object: addNew)
  File C:\Program Files\Zope2\lib\python\DocumentTemplate\DT_String.py, line
500, in __call__
(Object: addNew)
  File C:\Program Files\Zope2\lib\python\DocumentTemplate\DT_With.py, line
146, in render
(Object: tabledef)
  File C:\Program Files\Zope2\lib\python\DocumentTemplate\DT_In.py, line
691, in renderwob
(Object: objectItems(['DTML Document']))
  

Re: [Zope] Adding users via external method

2000-06-27 Thread ethan mindlace fremen

Timothy Grant wrote:

 I have come upon some situations where I also need to add Roles. I can find
 nothing archived nor on the Zope site about programmatically adding Roles.
 Can anyone assist me?

hmm.  I don't know how you're adding users without indicating their
roles.

I do this:

  dtml-call "acl_users.manage_users('Add',REQUEST)"

where REQUEST includes these variables:

name
password
confirm
roles

And roles is a list.

-- 
ethan mindlace fremen
Zopatista Community Liason

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




RE: [Zope] 2.2.0b2 and ZSQL method and Zcatalog

2000-06-27 Thread Bak @ kedai

On Tue, 27 Jun 2000, Brian Lloyd wrote:
hi brian,
 
  -ZSQL method.  got len() of unsized object.
 
 beta 3 should resolve that.
 
all my sql methods now work!  thanks
 
 
 I've attached an updated Lexicon.py - can you try dropping this 
 into your lib/python/SearchIndex directory, restarting your Zope 
 installation and let me know if this fixes the problem?
 
both 2.2b2 and b3 wont spit traceback without your update.  

 Thanks!
 
no, no .. thank you!

 
 Brian Lloyd[EMAIL PROTECTED]
 Software Engineer  540.371.6909  
 Digital Creations  http://www.digicool.com 
 
 
 
 


Content-Type: application/octet-stream; name="Lexicon.py"
Content-Transfer-Encoding: quoted-printable
Content-Description: 


-- 
--
http://www.kedai.com.my/kk
Am I Evil?


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] the tree tag is driving this newbie up the wall

2000-06-27 Thread Walter A. Aprile

Hello,
I am trying to write a tree access to a hyerarchy of folders
containing custom objects, subclassed from the DTML Docuement. The 
inheritance path should be
 DTMLDocument - Article (my custom class) - every single article in the folders.

I would like only Articles and folders to appear in the tree, so
this is what I do:

dtml-tree branches_expr="objectValues(['Folder','Article'])"
dtml-if "meta_type=='Folder'"
dtml-var title_or_id
dtml-else
A HREF="dtml-var tree-item-url"dtml-var title_or_id/A
/dtml-if
/dtml-tree

The tree *looks* all right, and the folders expand and contract ok. But
the URLs in the HREF are mangled. For example, I have a folder called
abracadabra, that contains another folder named curiosidades, that
contains an article whose title is "las origines del ajedrez", and
that has in id of "ajedrez". The link comes out like this:

A HREF="abracadabra/curiosidades/string"las origines del ajedrez/A

I hope this does not play hell with the guys that use HTML-aware mail
clients, but what happens is that instead the URL instead of being
bracadabra/curiosidades/ajedrez gets the last component of the path
substituted with 'string' between angle brackets.

If I modify the dtml-tree tag so that it takes in also DTML Documents,
*those* URLs work. So what is happening ? Shouldn't the id propery
be inherited from my Article class ?

It *almost* works, and it is driving me insane. 

Thanks in advance,
Walter


-- Vita brevis, ars longa, occasio celeris, experimentum periculosum,
judicium difficile. Attention: Un train peut en cacher un autre
-- Eris aprueba este email ! -- http://redescolar.ilce.edu.mx


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )