[Zope-dev] Namespace Questions

2000-07-14 Thread Adam Pawliuk



Hi,

I want to find an efficient way of adding a 
dictionary of values to the Zope namespace, where a different dictionary could 
be set on each request.

I wanted to create a several dictionaries each 
containing properties for a look and feel (i.e. background colors, fonts etc), 
and switch them for each request.

For example I'd like to do something similar to 
what's done below (although the method below doesn't work).

dtml-call 
"REQUEST.set('LookAndFeel',m_getRandomLookAndFeel())"

(assuming the Look and Feel Dictionary has key's 
LOOK_COLOR, and LOOK_FACE)

dtml-with LookAndFeel
 font color="dtml-var 
LOOK_COLOR" face="dtml-var LOOK_FACE"
  I know the with doesn't 
work for the dictionary, but would like to do something similar to this 
example.
 /font
/dtml-with


thanks in advance,

Adam




[Zope-dev] Making Folders callable

2000-07-14 Thread Steve Alexander

Is there any reason that Folders aren't callable?

That is, you can't directly render a folder with dtml-var
nameofafolder. You have to do something like dtml-var
"nameofafolder.index_html(_.None, _)". But, that's not quite the same
because if the folder lacks an index_html, it gets acquired.

Here's an extra method that can be added to lib/python/OFS/Folder.py, or
to ObjectManager.py, to make Folders render nicely.

# XXX hack to make folders render
# retains compatibility with current behaviour
# if the folder doesn't contain index_html
def __call__(self, *args, **kw):
""" mandatory docstring """
index = self._getOb('index_html', default=None)
if index is not None:
args = (self,) + tuple(args[1:])
return apply(index, args, kw)
return ''

Is this a good idea? Should this go into the Collector as an RFE with
patch?

Actually, I'm not sure why it should be tuple(args[1:]) -- I just copied
that out of ZCallable in the latest PTK CVS. I'd guess you'd want to
check the first argument (client) for whether it is None before
replacing it with self.

Perhaps something like this:

  args = (len(args)0 and args[0] or self,) + tuple(args[1:])

Discussion welcomed.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

___
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: ZCallable

2000-07-14 Thread Chris Withers

Yup,

This looks good, as did your earlier post. However, it raises a question
:(

Something like a ZCatalog or a Squishdot Site (which I have a passing
interest in ;-) are both folderish. However, their __call__ method does
something quite different: it returns the results of searching the catalog
(I think this is the ZSearchable Interface, correct me if I'm wrong ;-)

I guess what's bothering me is why __call__ has this dual role and how the
rendering process manages to correctly render index_html even on a
Squishdot object which is actually callable?

Hmm... I guess the implication of this is that a normal folder will never
render itself to avoid confusion over the ZSearch interface and so if I
want this behaviour I'll have to roll-my-own folder which inherits from
ZCallable.

Any ideas/comments?

Chris

PS: Shane: what's the difference between ZCallable and the ZRenderable
base class that Maik Roeder mentioned on [EMAIL PROTECTED] a few days back?

On Fri, 14 Jul 2000, Steve Alexander wrote:

 Chris,
 
 Related to your question earlier, have you seen Shane Hathaways' recent
 checkin into PTK?
 
 "Added the ZCallable product, which is a very simple base class that
 makes it possible to call an class instance directly."
 
 
 
 from ExtensionClass import Base
 
 class ZCallable (Base):
 def __call__(self, *args, **kw):
 '''Calls index_html, if it exists, to render this object.
 '''
 base = getattr(self, 'aq_base', self)
 if hasattr(base, 'index_html'):
 v = self.index_html
 args = (self,) + tuple(args[1:])
 return apply(v, args, kw)
 else:
 raise AttributeError, 'index_html'
 
 def initialize(context):
 context.registerBaseClass(ZCallable)
 
 
 
 --
 Steve Alexander
 Software Engineer
 Cat-Box limited
 http://www.cat-box.net
 


___
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] (no subject)

2000-07-14 Thread danchik

if i call a page with some REQUEST variables (submited by form),
how can I pass the namespace variables to the frames??? 





___
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] passing namespace

2000-07-14 Thread danchik

if I submit a form to some page that has frames, how do I pass the
REQUEST namespace to those frames


___
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] Variable sort in dtml-in

2000-07-14 Thread Adam Karpierz

In my search form, I have a selection box "in_sort_by" whose value can
be "Category", "Field", or "Title".  I am trying to make dtml-in sort by
this value.  I am using:

 dtml-in SQL_search sort="_['in_sort_by']" size=list_size
start=query_start

Hi Aaron again

I have attached appropriate patch for dtml-in tag for Zope 2.2.0b3/b4
(Of course this patch was checked and works ok).

Just for you, the syntax of my patch for dtml-in should be:

dtml-in SQL_search sort="expr:_['in_sort_by']" size=list_size start=query_start

or best and simply (and strict equivalent above):

dtml-in SQL_search sort="expr:in_sort_by" size=list_size start=query_start

I want extend my proposal to others attributes like eg. size:

dtml-in SQL_search sort="expr:in_sort_by"
  size="expr:REQUEST.user_list_size" 
start=query_start

It is possible easy extend other DTML tags through the same way  too,
but I dont know what other zopistas (especcially from DC)  thinks about this.

My syntax proposal is one which not caused serious comtatibility problems.
Eg. natural syntax attr="something" is treated (unfortunately) as attr=something
and therefore would not be adapt and apply for indirect lookup of attribute
without breaking of compatibility.

Very please all for comments.

--
Adam Karpierz
[EMAIL PROTECTED]



begin 666 DT_In.py
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C#0HC( T*(R!:;W!E
M(%!U8FQI8R!,:6-E;G-E("A:4$PI(%9EG-I;VX@,2XP#0HC("TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2T-"B,@#0HC($-O'ER:6=H
M=" H8RD@1EG:71A;"!#F5A=EO;G,N("!!;P@FEG:'1S(')EV5R=F5D
M+@T*(R -"B,@5AIR!L:6-E;G-E(AAR!B965N(-EG1I9FEE9"!AR!/
M5N(%-O=7)C92AT;2DN#0HC( T*(R!2961IW1R:6)U=EO;B!A;F0@=7-E
M(EN('-O=7)C92!A;F0@8FEN87)Y(9OFUS+"!W:71H(]R('=I=AO=70-
M"B,@;6]D:69I8V%T:6]N+"!AF4@5R;6ET=5D('!R;W9I95D('1H870@
M=AE(9O;QO=VEN9R!C;VYD:71I;VYS(%R90T*(R!M970Z#0HC( T*(R Q
M+B!2961IW1R:6)U=EO;G,@:6X@V]UF-E(-O94@;75S="!R971A:6X@
M=AE(%B;W9E(-O'ER:6=H= T*(R @("!N;W1I8V4L('1H:7,@;ES="!O
M9B!C;VYD:71I;VYS+"!A;F0@=AE(9O;QO=VEN9R!D:7-C;%I;65R+@T*
M(R -"B,@,BX@4F5D:7-TFEB=71I;VYS(EN()I;F%R2!F;W)M(UUW0@
MF5PF]D=6-E('1H92!A8F]V92!C;W!YFEG:'0-"B,@(" @;F]T:6-E+"!T
M:ES(QIW0@;V8@8V]N9ET:6]NRP@86YD('1H92!F;VQL;W=I;F@9ES
M8VQA:6UEB!I;@T*(R @("!T:4@9]C=6UE;G1A=EO;B!A;F0O;W(@;W1H
M97(@;6%T97)I86QS('!R;W9I95D('=I=@@=AE#0HC(" @(1IW1R:6)U
M=EO;BX-"B,@#0HC(#,N($1I9VET86P@0W)E871I;VYS(')E75EW1S('1H
M870@871TFEB=71I;VX@8F4@9VEV96X@=\@6F]P90T*(R @("!I;B!A;GD@
M;6%N;F5R('!OW-I8FQE+B!:;W!E(EN8VQU95S($@(E!O=V5R960@8GD@
M6F]P92(-"B,@(" @8G5T=]N('1H870@:7,@:6YS=%L;5D()Y(1E9F%U
M;'0N(%=H:6QE(ET(ES(YO="!A(QI8V5NV4-"B,@(" @=FEO;%T:6]N
M('1O(')E;6]V92!T:ES()U='1O;BP@:70@:7,@F5Q=65S=5D('1H870@
M=AE#0HC(" @(%T=')I8G5T:6]N(')E;6%I;BX@02!S:6=N:69I8V%N="!I
M;G9EW1M96YT(AAR!B965N('!U= T*(R @("!I;G1O(%IO4L(%N9"!T
M:ES(5F9F]R="!W:6QL(-O;G1I;G5E(EF('1H92!:;W!E(-O;6UU;FET
M0T*(R @("!C;VYT:6YU97,@=\@9W)O=RX@5AIR!IR!O;F4@=V%Y('1O
M(%SW5R92!T:%T(=R;W=T:"X-"B,@#0HC(#0N($%L;"!A9'9EG1IVEN
M9R!M871EFEA;',@86YD(1O8W5M96YT871I;VX@;65N=EO;FEN9PT*(R @
M("!F96%T=7)ER!D97)I=F5D(9R;VT@;W(@=7-E(]F('1H:7,@V]F='=A
MF4@;75S="!D:7-P;%Y#0HC(" @('1H92!F;VQL;W=I;F@86-K;F]W;5D
M9V5M96YT.@T*(R -"B,@(" @(" B5AIR!PF]D=6-T(EN8VQU95S('-O
M9G1W87)E(1E=F5L;W!E9"!B2!$:6=I=%L($-R96%T:6]NPT*(R @(" @
M(9OB!UV4@:6X@=AE(%H@3V)J96-T(%!U8FQIVAI;F@16YV:7)O;FUE
M;G0-"B,@(" @(" H:'1T#HO+W=W=RYZ;W!E+F]R9R\I+B(-"B,@#0HC(" @
M($EN('1H92!E=F5N="!T:%T('1H92!PF]D=6-T()E:6YG(%D=F5R=ES
M960@:6YC;'5D97,@86X-"B,@(" @:6YT86-T(%IO4@9ES=')I8G5T:6]N
M("AW:71H(-O'ER:6=H="!A;F0@;EC96YS92!I;F-L=61E9"D-"B,@(" @
M=AE;B!T:ES(-L875S92!IR!W86EV960N#0HC( T*(R U+B!.86UER!A
MW-O8VEA=5D('=I=@@6F]P92!OB!$:6=I=%L($-R96%T:6]NR!M=7-T
M(YO="!B92!UV5D('1O#0HC(" @(5N9]RV4@;W(@')O;6]T92!PF]D
M=6-TR!D97)I=F5D(9R;VT@=AIR!S;V9T=V%R92!W:71H;W5T#0HC(" @
M('!R:6]R('=R:71T96X@5R;6ESVEO;B!FF]M($1I9VET86P@0W)E871I
M;VYS+@T*(R -"B,@-BX@36]D:69I960@F5D:7-TFEB=71I;VYS(]F(%N
M2!F;W)M('=H871S;V5V97(@;75S="!R971A:6X-"B,@(" @=AE(9O;QO
M=VEN9R!A8VMN;W=L961G;65N=#H-"B,@#0HC(" @(" @(E1H:7,@')O9'5C
M="!I;F-L=61ER!S;V9T=V%R92!D979E;]P960@8GD@1EG:71A;"!#F5A
M=EO;G,-"B,@(" @("!F;W(@=7-E(EN('1H92!:($]B:F5C="!0=6)L:7-H
M:6YG($5N=FER;VYM96YT#0HC(" @(" @*AT=' Z+R]W=WNF]P92YOFO
M*2XB#0HC( T*(R @("!);G1A8W0@*')E+2ED:7-TFEB=71I;VYS(]F(%N
M2!O9F9I8VEA;"!:;W!E(')E;5AV4@9\@;F]T#0HC(" @(')E75IF4@
M86X@97AT97)N86P@86-K;F]W;5D9V5M96YT+@T*(R -"B,@-RX@36]D:69I
M8V%T:6]NR!AF4@96YC;W5R86=E9"!B=70@;75S="!B92!P86-K86=E9"!S
M97!AF%T96QY(%S#0HC(" @('!A=-H97,@=\@;V9F:6-I86P@6F]P92!R
M96QE87-ERX@($1IW1R:6)U=EO;G,@=AA="!D;R!N;W0-"B,@(" @8VQE
M87)L2!S97!AF%T92!T:4@%T8VAER!FF]M('1H92!OFEG:6YA;"!W
M;W)K(UUW0@8F4@8VQE87)L0T*(R @("!L86)E;5D(%S('5N;V9F:6-I
M86P@9ES=')I8G5T:6]NRX@($UO9EF:6-A=EO;G,@=VAI8V@@9\@;F]T
M#0HC(" @(-AG)Y('1H92!N86UE(%IO4@;6%Y()E('!A8VMA9V5D(EN
M(%N2!F;W)M+"!AR!L;VYG(%S('1H97D-"B,@(" @8V]N9F]R;2!T;R!A
M;P@;V8@=AE(-L875S97,@86)O=F4N#0HC( T*(R -"B,@1ES8VQA:6UE
M@T*(R 

Re: [Zope] BTreeFolder

2000-07-14 Thread Robert Wohlfahrt


 Been there, done that s. It requires 2.2+. But boy am I looking
 forward to using it as soon as 2.2 is out of beta. VBG.

thank for your answer. As soon as I have a bit more time i will try
2.2+.

Robert
-- 
Robert Wohlfahrt ([EMAIL PROTECTED])
Tel: 0179 / 2980074 Fax: 0351 / 2880145

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




Re: [Zope] Zope Knowledge Base on www.faqts.com?

2000-07-14 Thread Oleg Broytmann

On Fri, 14 Jul 2000, Fiona Czuczman wrote:
 I've been working on a Python knowledge base for the last couple of
 months.
 
 http://python.faqts.com

   It became excellent resource! Cheers to your work!!!

 Recently I've been thinking about incorporating content from this
 mailing list in a folder dedicated to Zope.  And sending out my daily
 summary to this list as well.

   I always though why not to invite you here... And always answered to
myself - don't bother people who are too busy...

 Basically I'm after some feedback, would this be of much interest?  I've
 had a couple of people write and request that I do this - what's the
 general consensus?

   Sure, this would be great.

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 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 check if the ResultSet is null?

2000-07-14 Thread Robert Wohlfahrt

Hi,

 Hi, I still got problems after I changed my code according to your 
 suggestion. Here is the detail describtion of my code:
 In registration form, I have a table which contain a field usr_email 
  (tr
 td width="40%" align="right"Email Addressnbsp; /td
 td width="60%"input type="text" name="usr_email" size="20"/td
   /tr)
   
 This form takes an action in which I have following lines:
 dtml-if search_membership
 pYour email address has been used. /p
 dtml-else
 dtml-call personinfo_insert
 h2Welcome dtml-var name="usr_fname"! You became a new user./h2 
 /dtml-if

Does it work, if you use the dtml-indtml-else/dtml-in construct
as follows:
dtml-in search_membership size=1
pYour email address has been used. /p
dtml-else
dtml-call personinfo_insert
h2Welcome dtml-var name="usr_fname"! You became a new
user./h2 
/dtml-in

If not, are you sure you inserted usr_email into the "Arguments"-field
of your sql-Method?

Robert
-- 
Robert Wohlfahrt ([EMAIL PROTECTED])
Tel: 0179 / 2980074 Fax: 0351 / 2880145

___
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] Variable sort in dtml-in

2000-07-14 Thread Aaron Williamson

 I have attached appropriate patch for dtml-in tag for Zope 2.2.0b3/b4
 (Of course this patch was checked and works ok).

Thanks again for the patch.  It is a much needed option (and rather a glaring omission 
from
the original code).  So far it is working flawlessly for me.

 I want extend my proposal to others attributes like eg. size:

 dtml-in SQL_search sort="expr:in_sort_by"
   size="expr:REQUEST.user_list_size" 
start=query_start

Is this necessary?  I actually use a variable for size (size=list_size) in the same 
dtml-in,
and that part seems to work just fine.  Maybe mine is a special case, but I don't 
think so.

 It is possible easy extend other DTML tags through the same way  too,
 but I dont know what other zopistas (especcially from DC)  thinks about this.

I for one am for it.  The lack of multiple and variable sort keys in version 2.14 were 
a major
hindrance to me.  I am sure that many tags could benefit from similar improvements.

Thanks again,

Aaron


___
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] HTML Editors that recognize DTML

2000-07-14 Thread Brad Moulton

Hello All,

as  a newbie I was wondering if those zope developers who use Linux 
have come across any HTML editors that support DTML tags
I note that the Windows developers prefer Homesite.

I'd just like to know what the Linux community have tested and found
suitable
 I am currently using Webmaker but it doesn't support DTML tags or
syntax checking

I have also been asked to mention Dreamweaver I noticed that 
Dreamweaver  has a Coldfusion CFML plug-in
Is anyone interested in developing a similar plugin for DTML
I am only a novice python programmer but would be willing to help if anyone
feels it is worthwhile

Just some ideas as I am a python/Zope newbie but like what I have seen so
far.
i can only offer limited help at this stage but would be willing to help
wherever possible if a guru needs a disciple.

thanks to all those who have and are contributing to Zope. I cannot keep up
with all the Zope from the mailing list but am sure it will be very useful as I
progress along the path   



___
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] testing for local roles

2000-07-14 Thread Aaron Williamson

Brian Lloyd wrote:

 dtml-if "AUTHENTICATED_USER.has_role(('Manager','siteManager'),
 this())"
   ...
 /dtml-if

Well, while we're on the subject of AUTHENTICATED_USER.has_role, I've
just come upon an error that just popped up all of a sudden in an SQL
query that was working fine before.  The problematic line is:

dtml-if "AUTHENTICATED_USER.has_role('Manager',this())"

and the error I get when trying to test it is:

Error, exceptions.NameError: AUTHENTICATED_USER
SQL used:
Could not render the query template!

The last line of the traceback:

  File /usr/local/Zope22b4/lib/python/DocumentTemplate/DT_Util.py, line
337, in eval
(Object: AUTHENTICATED_USER.has_role('Manager',this()))
(Info: this)
  File string, line 0, in ?

Another query in the same folder uses the exact same if statement, and
works fine.  I am running 2.2b4.  Can anyone suggest a solution?

Thanks,

Aaron




___
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: Zope a webserver? Serving PHP and Perl

2000-07-14 Thread Martijn Pieters

On Thu, Jul 13, 2000 at 05:44:23PM -0500, Lucas Young (c) wrote:
 Have just installed Zope under Win2K and it works fine - I see a lot of
 people mention using Apache to server Zope, but isnt Zope a webserver
 itself? I can browse to http://server:8080/ and view Zope pages, so why
 would I need Apache?
 
 Also, How do I set Zope up so it handles PHP tags? 

Your second question answers your first.

Zope's ZServer does indeed serve HTTP, but it only serves Zope objects.
Apache, on the other hand, allows you to serve much more, including PHP. You
can use Apache to integrate the two, there's a How-To on Zope.org that
explains how to do this, IIRC.

Basically, reasons for using Apache are:

- Using SSL (but there is an addon product for ZServer that covers this as
  well)

- Integration with other content, like static files and, in your case PHP.

- Virtual servers, competing for ip addresses or ports.

- Serving virtual servers out of Zope.

This is not a complete list, but these are the most important reasons.

On the other hand, using Apache introduces another level of complexity to your
setup, introducing a speed bump, a potential source of misconfiguration
problems, and another link in the chain that could break.

-- 
Martijn Pieters
| Software Engineermailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
| ZopeStudio: http://www.zope.org/Products/ZopeStudio
-

___
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] Translator 0.5 broken ?

2000-07-14 Thread Holger Lehmann

Hi all,

I was trying to get Translator to work on my Zope System but all I get is an
error about the system not being able to find the modules Shared.XMLio ...
I do not have it and I am not able to find it, so where dos it come from ?

- Holger

PS: I tried to contact the author but got no reply so far.

-- 
---
catWorkX GmbH Hamburg
Dipl.-Ing. Holger Lehmann
Stresemannstr. 364
22761 Hamburg
Tel: +49 40 890 646-0
Fax: +49 40 890 646-66
mailto:[EMAIL PROTECTED]
http://www.catworkx.de
http://www.catbridge.de

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




[Zope] Re: Zope Knowledge Base on www.faqts.com?

2000-07-14 Thread Paul Browning


 Message: 30
 Date: Fri, 14 Jul 2000 12:20:31 +1000
 From: Fiona Czuczman [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 Organization: Site Gnome
 To: [EMAIL PROTECTED]
 Subject: [Zope] Zope Knowledge Base on www.faqts.com?
 
 Hi,
 
 I've been working on a Python knowledge base for the last couple of
 months.
 
 http://python.faqts.com
 

Fiona:

This is a recent discovery for me - I quickly became a fan too. Thanks
for your efforts.

[snip]

 
 Basically I'm after some feedback, would this be of much interest?  I've
 had a couple of people write and request that I do this - what's the
 general consensus?

The only concern I would have is about fragmentation of effort (
and location of information). How can the community merge the best of
http://zdp.zope.org and http://www.faqts.com ?

Paul

--
 The Library, Tyndall Avenue, Univ. of Bristol, Bristol, BS8 1TJ, UK
 E-mail: [EMAIL PROTECTED]  URL: http://www.bris.ac.uk/


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




Re: [Zope] Zope Knowledge Base on www.faqts.com?

2000-07-14 Thread Maik Roeder

Hi Fiona !

Fiona Czuczman wrote:
 
 Hi,
 
 I've been working on a Python knowledge base for the last couple of
 months.
 
 http://python.faqts.com
 
 Each day I go through postings to the newsgroup and enter those that I
 believe would be useful FAQs into the site, then I send out a summary to
 the group letting them know what's been entered.
 
 Recently I've been thinking about incorporating content from this
 mailing list in a folder dedicated to Zope.  And sending out my daily
 summary to this list as well.
 
 Basically I'm after some feedback, would this be of much interest?  I've
 had a couple of people write and request that I do this - what's the
 general consensus?

Please consider adding your knowledge to the ZDP:

We have a FAQ: 
http://zdp.zope.org/projects/zfaq/

And also have a look at the community knowledge portals:
http://zdp.zope.org/portals/

Best regards,

Maik Röder

-- 
"The computing future is based  on "cyberbodies" - self-contained, 
neatly-ordered,  beautifully-laid-out  collections of information, 
like immaculate giant gardens." The second coming - A manifesto. David
Gelernter http://www.edge.org/3rd_culture/gelernter/gelernter_p1.html

___
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] ZPygres connection problem

2000-07-14 Thread Oleg Broytmann

Hello!

   I did an experiment (after having problems connecting Zope to Postgres)
- I stopped ZServer and restared Zope in PCGI-only mode.

   I opened connection successfully!

   I stopped PCGI and restarted ZServer. I again got BadRequest (cannot
connect to server).

   Anyone have an idea why Zope+ZServer cannot connect, while Zope-PCGI
can?

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 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] upgrade to 2.2 zsql authentication problem

2000-07-14 Thread Brian Lloyd

 I create a zsql method in 2.2b4, using the test tab the zsql 
 method works 
 ok. The problem is when I use a dtml method or document 
 (executable objects) 
 to call the zsql method with a IN statment, a not authorized 
 browser box 
 appears. I'm aware of the ownership changes but on my port 
 I'm having this 
 problems only with zsql methods so I wonder if this is only 
 related with 
 this product before diving into the ownership issues.

Julio - 

I can't reproduce this here (using the Gadfly db connection
and DTML that looks like:

dtml-in getdata
dtml-var item_id, dtml-var item_name, dtml-var item_desc
br
/dtml-in

Can you tell me:

  o What db connection you are using

  o What the dtml of your in statement looks like

  o the permissions on the DTML method, the DB connection
and the SQLMethod you are calling

  o and the ownership settings of each of the above?

Thanks!


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.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] Weird problem with Z MySQL Connection

2000-07-14 Thread Jonathan

Hi all,

Keep getting an 'invalid connection string' error when trying to 
make a database connection from Zope. Weird thing is that I first 
moved a working build to another machine, which resulted in it not 
working anymore. Did a clean install of Zope 2.1.6 (Source), MySQL 
3.22.32 and all necessary Zope products (ZMySQLDA 1.2.0) using the 
same packages used in the working install. Still no dice. Same setup 
:(

Well, I've solved the problem by installing Zope from RPMs and having 
it connect to MySQL via TCP/IP instead of the default unix socket. So 
don't connect to 'localhost', connect to your machine's hostname.

File /usr/share/zope/lib/python/Products/ZMySQLDA/db.py, line 155, in __init__
BadRequest: (see above)

Why is Zope looking for files in '/usr/share' all of a sudden? It 
didn't in the first install. I haved searched the mailinglist 
archives already, tried stuff suggested there with similar problems. 
Still no dice :(

But this still isn't solved. Where can I specify the path it 
shouldn't be looking for the ZMySQLDA stuff if it ain't in 
'/usr/share/zope'?

Traceback (innermost last):
  File 
/2ndhome/devel/proj/euhf/zope/lib/python/ZPublisher/Publish.py, line 
214, in publish_module
  File 
/2ndhome/devel/proj/euhf/zope/lib/python/ZPublisher/Publish.py, line 
179, in publish
  File /2ndhome/devel/proj/euhf/zope/lib/python/Zope/__init__.py, 
line 202, in zpublisher_exception_hook
(Object: ElementWithAttributes)
  File 
/2ndhome/devel/proj/euhf/zope/lib/python/ZPublisher/Publish.py, line 
165, in publish
  File 
/2ndhome/devel/proj/euhf/zope/lib/python/ZPublisher/mapply.py, line 
160, in mapply
(Object: addConnection)
  File 
/2ndhome/devel/proj/euhf/zope/lib/python/ZPublisher/Publish.py, line 
102, in call_object
(Object: addConnection)
  File 
/2ndhome/devel/proj/euhf/zope/lib/python/Products/ZMySQLDA/DA.py, 
line 124, in addConnection
(Object: ElementWithAttributes)
  File 
/2ndhome/devel/proj/euhf/zope/lib/python/Shared/DC/ZRDB/Connection.py, 
line 129, in __init__
(Object: RoleManager)
  File 
/2ndhome/devel/proj/euhf/zope/lib/python/Shared/DC/ZRDB/Connection.py, 
line 158, in edit
(Object: RoleManager)
  File 
/2ndhome/devel/proj/euhf/zope/lib/python/Shared/DC/ZRDB/Connection.py, 
line 227, in connect
(Object: RoleManager)
  File /usr/share/zope/lib/python/Products/ZMySQLDA/db.py, line 155, 
in __init__
BadRequest: (see above)

___
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] testing for local roles

2000-07-14 Thread Brian Lloyd

 Well, while we're on the subject of AUTHENTICATED_USER.has_role, I've
 just come upon an error that just popped up all of a sudden in an SQL
 query that was working fine before.  The problematic line is:
 
 dtml-if "AUTHENTICATED_USER.has_role('Manager',this())"
 
 and the error I get when trying to test it is:
 
 Error, exceptions.NameError: AUTHENTICATED_USER

 snip
 
 Another query in the same folder uses the exact same if statement, and
 works fine.  I am running 2.2b4.  Can anyone suggest a solution?

Aaron - 

Are you passing AUTHENTICATED_USER as an argument to the 
query that is working (and not doing so on this one?) 
Remember that SQL methods don't automagically get the 
same namespace that DTML does - the only things it can 
use are attributes that are named in the arguments list
(this is to prevent names that are coincidentally the 
same in a REQUEST form or something from being inserted 
into queries).

One common way of doing what you want is to add REQUEST 
to the arguments list of the SQLMethod and use:

dtml-with REQUEST
dtml-if "AUTHENTICATED_USER.has_role('Manager',this())"
select * from data
/dtml-if
/dtml-with


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.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] namespace??

2000-07-14 Thread Marcus Mendes


How can I get the content of TITULO_CIDADE
out of my tags dtml-in>
/dtml-in> ??
My code is :
dtml-in "_['sequence-item'].objectValues(['TSimpleItem'])"
sort=title>
 dtml-if "_['sequence-item'].id == CIDADE">
 dtml-call "REQUEST.set('TITULO_CIDADE',_['sequence-item'].title)">
 /dtml-if>
/dtml-in>
Thanks.
Marcus Mendes




[Zope] GUF KeyError problem

2000-07-14 Thread Mabe, Brad

I am attempting to get GUF (using sql methods for authentication) working on
an HPUX box and am running into a bit of a snag.  Running ZOPE in debug mode
yields the following:

ERROR(200) GUF http://sidr:8080/test/acl_users/userRoles raised an exception
((class exceptions.KeyError at 40051d58 exceptions.KeyError instance at
40576958, traceback object at 40574628))

INFO(0) GUF Successful authentication for user test
(http://sidr:8080/test/acl_users)

ERROR(200) GUF http://sidr:8080/test/acl_users/userRoles raised an exception
((class exceptions.KeyError at 40051d58 exceptions.KeyError instance at
40575700, traceback object at 403c9900))

INFO(0) GUF Failed authorization for user test
(http://sidr:8080/test/acl_users)

As usual I'm at a loss to what the problem is.  I have been successful in
getting GUF  sql methods  working on an NT box running zope, but never ran
into this problem.  Any help will be greatly appreciated.

-=Brad=-


___
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: Zope a webserver? Serving PHP and Perl

2000-07-14 Thread andres

   - Original Message - 
   From: Lucas Young (c) 
 
   Also, How do I set Zope up so it handles PHP tags? 
 

Take a look at a HOW-TO I wrote for one way to serve PHP from within Zope:

www.zope.org/Members/Mamey/PHP

--
Andres Corrada-Emmanuel   Email: [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] namespace??

2000-07-14 Thread andres

On Fri, Jul 14, 2000 at 11:31:34AM +0100, Marcus Mendes wrote:
 How can I get  the content of   TITULO_CIDADE  out of my tags dtml-in
 /dtml-in ??
 
 My code is :
 
  dtml-in "_['sequence-item'].objectValues(['TSimpleItem'])" sort=title
 
  dtml-if "_['sequence-item'].id == CIDADE"
  dtml-call
 "REQUEST.set('TITULO_CIDADE',_['sequence-item'].title)"
   /dtml-if
  /dtml-in
 

I, for one, don't quite understand your question Marcus. Could you be more
specific?

--
Andres Corrada-Emmanuel   Email: [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] Version Changes

2000-07-14 Thread Shane Hathaway

Tim Cook wrote:
 
 When Saving changes from a version are the notes entered in the
 text box logged anywhere?  I can't seem to find them or any
 information about them.  It would be handy to use them for a
 regular CHANGES file.

They appear in the Undo log.

Shane

___
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] zope.org going down now

2000-07-14 Thread ethan mindlace fremen

zope.org is going down now for the upgrade.

Thanks for your patience.
-- 
ethan mindlace fremen
Zopatista Community Liason
Abnegate I!

___
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] simple instructions for site search

2000-07-14 Thread sean

On 14 Jul 2000, at 8:37, Chris Withers wrote:

 [EMAIL PROTECTED] wrote:
  Does this explain why I see Squishdot and ZChat messages in the
  catalog, 
Actually, I have cleared and recreated the index, and ZChat 
message show up in the catalog but I cannot find them in 
searches.  Squishdot does not show up in either, even though I 
have selected the squishdot object and folder.
 
 That's odd, what catalog(s) do they show up in?
full_site shows up under itself  (full_site)
 
  but when I search for something in squishdot or Zchat I get
  no matches?  I am still running squishdot 3.x  I do have the catalog
  included in my searched items.
 
 So you have the Squishdot object (Folder type thing) included in another
 catalog?
 
 Hmmm, this would all seem to imply that what Jens said about catalogs
 not searching other catalogs that are included in their search items
 isn't true...
 
 cheers,
 
 Chris
 
--Sean


___
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] namespace problem?

2000-07-14 Thread Marcus Mendes

How can I get  the content of   TITULO_CIDADE  out of my tags dtml-in
/dtml-in ??

My code is :

 dtml-in "_['sequence-item'].objectValues(['TSimpleItem'])" sort=title

 dtml-if "_['sequence-item'].id == CIDADE"
 dtml-call
"REQUEST.set('TITULO_CIDADE',_['sequence-item'].title)"
  /dtml-if
 /dtml-in

Thanks.

Marcus Mendes


___
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] zope.org updated

2000-07-14 Thread ethan mindlace fremen

zope.org is now running the release version of zope (2.2), which should
be availiable for download shortly.

Enjoy,
-- 
ethan mindlace fremen
Zopatista Community Liason
Abnegate I!

___
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] suggestions for what to run in front of ZEO'ed zopes for failover?

2000-07-14 Thread Roman Milner


I'm wondering if anyone can suggest something good to run in front of
2 zopes talking to a zeo server - for failover and load balancing.  I
have been using a tool called 'balance' which works really well - but
for failover it only works if the socket to one of the zope servers
doesn't connect.

We occasionally have a situation where the socket will still answer
but the zope server hanges and never returns an answer.  So, I'm
looking for something with configurable timeouts on responses.  Does
any one know of anything like that?

Thanks,
^Roman



___
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] Creating graphs with Zope (under NT)

2000-07-14 Thread Richard Folwell

How are the Zope website statistics graphs created?

I need to create simple graphs (pie charts and line graphs) from data held in an ODBC 
database,
using Zope under NT (unfortunately).  I looked at gnuplot, and found ways to produce 
really
impressive complex sophisticated graphs, but nothing to produce simple pie charts.  
Did I not look
hard enough?  Is there a better way?

The charts do not have to be live - the information changes at known times weekly, so 
I could run
external processes to create image files that are served using LocalFS, if necessary.

Thanks,

Richard


___
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] Zope 2.2 final released!

2000-07-14 Thread Brian Lloyd

Hi all,


  Zope 2.2.0 final has been released - you can download it 
  from Zope.org:

  http://www.zope.org/Products/Zope/2.2.0/


  Many thanks go to all of those who have worked with the 
  alpha and beta releases and helped work through the more 
  than 110 (!) issues that have been closed since Zope 2.1.6 
  came out.

  The Zope 2.2 release includes:

- The new security policy implementation and object ownership 
  that addresses the server-side trojan issue:

  http://www.zope.org/Members/jim/ZopeSecurity/ServerSideTrojan

- The new online help system which provides context-sensitive 
  help for all Zope management screens and includes Zope API 
  documentation

- A built-in Zope tutorial to get new users started with Zope

- Basic internal support for mountable object databases

- A new "history" tab for selected objects that provides access
  to previous revisions through the web

- Better performance on many systems as a result of setting a 
  more appropriate value for the "check interval" of the Python 
  runtime

- Many, many bugfixes!


  For more information on what is new in Zope 2.2, see the 
  CHANGES.txt and HISTORY.txt files for the release:

- http://www.zope.org/Products/Zope/2.2.0/CHANGES.txt

- http://www.zope.org/Products/Zope/2.2.0/HISTORY.txt


  Note that there are important changes to the security model in 
  Zope 2.2 that both site maintainers and Zope product developers 
  need to be aware of. Site maintainers should read the document 
  "Upgrading to Zope 2.2.0" for important information on upgrading 
  their Zope sites:

- http://www.zope.org/Products/Zope/2.2.0/upgrading_to_220

  Product authors should read the "Product author's guide to 
  Zope 2.2+ security" to learn about the changes in 2.2 that 
  may affect their products:

- http://www.zope.org/Documentation/How-To/ProductAuthorUpdateGuide 


Enjoy!


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.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] Creating graphs with Zope (under NT)

2000-07-14 Thread Harald Ragger

Richard,

take a look at "http://www.zope.org/Members/teyc/ZGDChart".
I think this could help you.

regards

Harald

- Original Message -
From: "Richard Folwell" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 14, 2000 8:20 PM
Subject: [Zope] Creating graphs with Zope (under NT)


 How are the Zope website statistics graphs created?

 I need to create simple graphs (pie charts and line graphs) from data held
in an ODBC database,
 using Zope under NT (unfortunately).  I looked at gnuplot, and found ways
to produce really
 impressive complex sophisticated graphs, but nothing to produce simple pie
charts.  Did I not look
 hard enough?  Is there a better way?

 The charts do not have to be live - the information changes at known times
weekly, so I could run
 external processes to create image files that are served using LocalFS, if
necessary.

 Thanks,

 Richard


 ___
 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] Linux user group

2000-07-14 Thread ethan mindlace fremen

CURTIS David wrote:
 
 Greetings,
 
 I am a member of the a Linux users group and I have been asked to do a demo on ZOPE 
because I am using it and many members are curious. I consider myself a ZOPE newbie, 
because use I use ZOPE  to access some really  simple databases.  I have NOT done any 
special python programming (but not for lack of trying) but would like some input on 
what I should say about ZOPE.  1) Is there a ZOPE demo for that runs on a CDROM?

I think you're looking for the "Zope on CDROM howto":

http://www.zope.org/Members/jens/news/zope_on_cdrom

 2) What is the best way to present ZOPE?

Hm.  In a bed of lettuce with an olive on top?
(sorry)

the advantages I noticed when first using zope:

Reduction of redundancy through aquisition (increases maintainability,
etc)
Easy dynamically generated pages (with or without RDB access)
Through the web management.

-- 
ethan mindlace fremen
Zopatista Community Liason
Abnegate I!

___
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] Accessing the Application (or Control_Panel)

2000-07-14 Thread Jeff K. Hoffman

Hello,

I am working on a Python Product (subclass of ObjectManager) that creates
some instances of a few ZClasses inside itself when constructed.
Currently, I do this as follows:

  CONTROL_PANEL = None

  def manage_addMyClass(self, id, title='', REQUEST=None):
  global CONTROL_PANEL
  if CONTROL_PANEL is None:
  CONTROL_PANEL = self.Control_Panel

  self._setObject(id, MyClass(id, title))

  ...

  class MyClass(...):
  def __init__(self, id, title=''):
  self.id = id
  self.title = title

  ob = CONTROL_PANEL.Products.MyProduct.MyClass('myId')
  ob.id = 'myId'
  self._setObject('myId', ob)

which works fine, until I need to use CONTROL_PANEL from somewhere else
before manage_addMyClass is called (currently, I am trying to upgrade
existing instances in __setstate__). Inside __setstate__,
self.Control_Panel throws an exception, for understandable reasons.

So, I get the feeling I am going about this incorrectly. I grep'd the
source last night, looking for a getApplicationInstance() method, or
something similar, but found nothing. AFAICT, there is no easy way to get
ahold of the one true Application object without having a reference to an
object in the ZODB and calling getPhysicalRoot().

Did I miss something? Is there a better way to do what I am trying to do?

--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] zope crawls - the day after

2000-07-14 Thread Tino Wildenhain



"Bak @ kedai" wrote:
 
 hi all
 
 zope is faster now.  i think i know why, just wanted some confirmation from the
 zopistas.
 
 setup:
 apache in front of zope on a rh 6.1 linux
 
 what happened:
 -got a lot of simultaneous connect in one time.  whe the number of connect
 exceeds 200, zope started slowing down.   and i mean really slow.
 -tried putting squid in front, still not much improvement.
 -set up cache headers again.  i did this earlier on, but was not successful.
 
 now:
 -got less then 100 simultaneous connect.  zope runs beautifully.
 
 what i think that solved this:
 -setting the cache headers.  at first, i put the headers in
 standard_html_header, before any html documents.  later, i put it after
 headtitle tags.  and i think i can see the cache headers on.
 
 HTTP/1.1 200 OK
 Date: Tue, 11 Jul 2000 09:15:33 GMT
 Server: Apache/1.3.12 (Unix)  (Red Hat/Linux) mod_fastcgi/2.2.4 (mod_pcgi2/1.0.1; 
PCGI/2.0a5) PHP/3.0.12
 Cache-Control: must-revalidate,max-age=120
 Expires: Tue, 11 Jul 2000 09:17:06 GMT
 X-Powered-By: Zope (www.zope.org), Python (www.python.org)
 Content-Length: 14508
 Last-Modified: Mon, 10 Jul 2000 16:24:22 GMT
 Content-Type: text/html
 
 so, i guess, it does matter where you put the cache headers.  is there a limit
 on how many simultaneous connect zope can handle?  apache ( i know it's
 different) can handle much higher traffic with not much complaints.

Uhm. Headers are headers, not content. As example, image files have
headers too but no
HTML inside. So you should set headers with RESPONSE.setHeader()

hth
Tino Wildenhain

___
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] suggestions for what to run in front of ZEO'ed zopes for failover?

2000-07-14 Thread Bill Anderson

Roman Milner wrote:
 
 I'm wondering if anyone can suggest something good to run in front of
 2 zopes talking to a zeo server - for failover and load balancing.  I
 have been using a tool called 'balance' which works really well - but
 for failover it only works if the socket to one of the zope servers
 doesn't connect.
 
 We occasionally have a situation where the socket will still answer
 but the zope server hanges and never returns an answer.  So, I'm
 looking for something with configurable timeouts on responses.  Does
 any one know of anything like that?


You didn't specify the platform, so I'll suggest a nice, cost-effective
one:
Linux with IPVS (IP Virtual Server). www.linux-ha.com has more
information.


--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
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] uncatalog of absent id?

2000-07-14 Thread R. David Murray

On Thu, 13 Jul 2000, Nitesh Dhanjani wrote:
 Im fairly new to the Zope world. Im trying to delete a PTK folder, and get
 this error:
 
   Zope Error
 Zope has encountered an error while publishing this resource. 
 
 Error Type: ValueError
 Error Value: Uncatalog of absent id '/icds/Members/bob/index_html'

This means you are trying to delete a CatalogAware object that was
not entered into the catalog.  (Some have argued that this is a
but, some a feature).  To get around it, you can probably just
call the URL

/icds/Members/bob/index_html/index_object

and then do the delete.

--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] Class Refactoring Question

2000-07-14 Thread R. David Murray

On Thu, 13 Jul 2000, James W. Howe wrote:
 I've developed a couple of simply Python classes which I'm using as base 
 classes for some ZClasses that I've developed.  I now realize that both of 
 these Python classes could benefit from obtaining behavior from another 
 class.  Will I complete hose myself if I change the class definition of my 
 Python base classes?  In other words, will existing ZClass instances be 
 completely screwed up if I do this?

I believe that this will work fine.  There has even been discussion
of doing this (having a python base class to reference the classes
you want your ZClass to have as bases) as a good technique for dealing
with the fact that you can't change the bases of a ZClass after it
is created using the management interface.

--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 )




[Zope] Delete property woes in ZClasses

2000-07-14 Thread Paul Abrams

I noticed that when you delete a property in a ZClass, it
doesn't actually delete the property in **instances** of
that ZClass! This leaves properties lying around where they
can be inadvertently acquired, causing problems that are
difficult to trace.

Has anyone gotten bitten by this, or know of a solution?

Cheers,
-Paul

__
Do You Yahoo!?
Get Yahoo! Mail – Free email you can access from anywhere!
http://mail.yahoo.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] (no subject)

2000-07-14 Thread Karl Anderson

"Leichtman, David J" [EMAIL PROTECTED] writes:

 I've previously been a Perl programmer. I did a lot of stuff where I would
 have multiple links with different options.
 Ex.
 
 a href="/path/script.pl/1234"1234/abr
 a href="/path/script.pl/2345"2345/abr
 
 Then, in script.pl, I would pick up the extra info on the other side from
 $PATH_INFO.
 
 The problem in Zope is that there is no "end" to the address. Serving from
 Apache, it knows that the .pl extension is the end of the path. If there's a
 '/' and more after it, it will push it to PATH_INFO. So how do you do this
 in Zope? Because it's object names instead of paths in the request, how do
 you send optional, additional info through the request as above?

You've answered your own question.  There is no end in the middle of
the path.  The publisher picks off each part of the URL from the top
down, and at each step, it asks that object if it can provide the next
one.  Look at traverse() in lib/python/ZPublisher/BaseRequest.py, or
step through the publishing process - see
http://www.zope.org/Members/michel/HowTos/TheDebuggerIsYourFriend.

At each step, the publisher checks to see if the parent has the child
as an attribute, and if so, continues with the object at that
attribute as the parent (so long as other conditions are met, like
permissions).

You can see this in python products:

class Foo:
 "a python product"
 ...
 index_html = HTMLFile("someDTMLFile", globals())
 index2_html = "HEADBODY..."
 index3_html = aFunction(mood, phaseOfMoon)

Since getattr(path.to.foo, "index_html") reaches that html file,
ZPublisher.Zope("/path/to/foo/index_html") publishes that file.
index_html could be a (badly named) method instead, which has other
attributes.  It could decide what to publish or how to allow
the publisher to traverse the path programmatically.

You don't need extra rules that look for foo.pl in the URL (what a
kluge - enforce a perl script to sit there until URLs are no more!).
For your example, script.pl could have two subobjects or other
attributes, 1234 and 2345, and the default index_html.  Or script.pl
could be a ZClass with those three as DTML methods or other
subobjects.

__bobo_traverse__ is another attribute that the object may have to
drive the publishing process, but I haven't needed to understand why
it's useful yet :)

-- 
Karl Anderson  [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] uncatalog of absent id?

2000-07-14 Thread Bill Anderson

"R. David Murray" wrote:
 
 On Thu, 13 Jul 2000, Nitesh Dhanjani wrote:
  Im fairly new to the Zope world. Im trying to delete a PTK folder, and get
  this error:
 
Zope Error
  Zope has encountered an error while publishing this resource.
 
  Error Type: ValueError
  Error Value: Uncatalog of absent id '/icds/Members/bob/index_html'
 
 This means you are trying to delete a CatalogAware object that was
 not entered into the catalog.  (Some have argued that this is a
 but, some a feature).  To get around it, you can probably just
 call the URL
 
 /icds/Members/bob/index_html/index_object
 
 and then do the delete.


If that fails:
http://www.zope.org/Members/Bill/Documentation/CatalogBadness

You could also delete the Catalog, delete the Item, and Undo the Catalog
Deletion. This has worked well for me in the past.

YMMV

Bill

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
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] 2.2.0 and Membership ... NoGo

2000-07-14 Thread Bill Anderson

Dunno what changed, but in 2.2.0b4 I could use Membership w/the latest
ZPatterns just fine. In 2.2.0 when I try to add one, I get: "keyword
redefined" errors.


--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
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] I have a question on Zope 2.2

2000-07-14 Thread Jonathan Desp

Hi everybody,

I'm using Zope 2.2 on my local machine, where I constructed my data.fs, then
after I uploaded this data.fs on my hurrah.com server which use an older
version of Zope(2.1.6), then I was not able to add any DTML Document or DTML
Method, and all the DTML images was broken, as well as at my web site all
the pages was "not found" even if I was able to edit those file in the Zope
management intereface.

Anyone here know how to fix that ? If I cannot upgrade my zope on the
hurrah.com server, how I can make the data.fs compatible with the older
version.. ?

Very truly yours,


Jonathan Desp
Atomasoft
Matter will become Software
http://www.atomasoft.com


``It is not the strongest of the species that survives nor the most
intelligent. It is those most adaptive to change.''


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




RE: [Zope] zope crawls - the day after

2000-07-14 Thread bak @ kedai

Uhm. Headers are headers, not content. As example, image files have
headers too but no
HTML inside. So you should set headers with RESPONSE.setHeader()

i did set RESPONSE.setHeader(blah blah).  my question was where should i put
this statement.  but now, i found out that it doesn't matter where i set it,
it will be in the header.  however, ie still doesn't respect the
cache-control request.  it till shows old news, which is bad, which brings
me back to square one.:(

i'm on my wits end now.  help?


hth
Tino Wildenhain

___
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] Announcing dev.zope.org

2000-07-14 Thread Brian Lloyd

Hello all,

For some time now, it has been a goal of ours to open up 
the Zope development process. Some of you may have heard 
me promise this at the Zope track back in January. Well, 
it took a little longer than I had hoped it would, but 
I'm happy to announce an important step in making that 
a reality: http://dev.zope.org.

dev.zope.org is the place for discovering, initiating, 
and contributing to work on the core Zope platform and 
related Zope technologies. You can think of it as the 
rough equivalent of what Mozilla.org is to Mozilla.

Why has it taken so long? Because there is much more to 
"opening the development process" than simply doling out 
CVS access. Evolving a relatively large and complex 
piece of software like Zope is a non-trivial task, and 
doing it in a highly distributed environment is harder 
still. The dev.zope.org site will provide the background 
materials and tools to ensure that work on Zope is 
consistent in organization and execution. It will also 
help those new to Zope development to come up to speed 
and get involved quickly.

There is still plenty to do be done on the site, but it 
is done enough to start using it so I want to start 
learning by doing. If you have questions or comments on 
the dev site, please send them to me at [EMAIL PROTECTED] 
and CC the zope-dev list (which is where I expect traffic 
related to dev.zope.org should go in the near term).


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.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 )