Re: [Zope] Deleting data using ZSQL

2000-09-29 Thread Kees de Brabander


- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 29, 2000 5:17 AM
Subject: [Zope] Deleting data using ZSQL


> Hi,
> 
> I am writing a dtml method that deletes data from a database, and I found
> myself unable to do this.  It seems that ZSQL is used to insert, update
> and query a database. but can not use
> "delete from table where var="
> 

delete from table where var= 

in your Z SQL method will do the trick, at least it does for me

cb



___
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] Deleting data using ZSQL

2000-09-29 Thread Chris Withers

[EMAIL PROTECTED] wrote:
> "delete from table where var="
> 
> I am surprised at this behaviour.  Am I doing somehting worng? or this is
> how it works?  Is there any information on how to do this somewhere???

This should work :-)

What error messaegs are you getting?
What DB and DA are you using?
What version of Zope?

...any other info you can think of might be useful...

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] dtml-with equivalent in external methods?

2000-09-29 Thread Phil Harris

Hi all,

I know I've seen the answer to this somewhere, but I'm buggered if I can
find it.

Anyone know offhand how to do an equivalent to dtml-with in an external
method?

tia

Phil
[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] Property problem - still the same...

2000-09-29 Thread Lars Heber

Hello again,

I recently set a question about nested properties.

Unfortunately, we didn't come to a proper solution.

I was told to use ZClasses, and I read a lot of documentation about it.
But I found out that this isn't the thing I was searching for.

So, now I'll try it again, very concrete this time:

In my root folder, I have a property enterpriseName (string) =
"myEnterprise".

Furthermore I have an arbitrary DTML document, and I want to include my
global property enterpriseName in the title property of this document so
that the title of the document is "myEnterprise" at the end.

The sense of that is that when I change the value of enterpriseName
automatically all titles are updated.

It is not possible to include this enterpriseName into
standard_html_header or similar, because there will be many documents,
and only some of them need the enterpriseName in their titles, others
want to add an own text to the enterpriseName resulting in e. g. "This
is the Homepage of XYZ, who is working at myEnterprise".

I generally just want to insert one property into another...

Please, please help me, I'm despairing in the meantime...

Lars


___
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] Property problem - still the same...

2000-09-29 Thread Peter Sabaini


hi

afaik its not possible to nest properties.

what about dtml method mytitle in the root folder consisting of

   - 

or something like this? this will acquire title from the current
document and enterprisename from the rootfolder provided theres not
another enterprisename in the acquisition path.

hth peter.

On Fri, 29 Sep 2000, Lars Heber wrote:

:Hello again,
:
:I recently set a question about nested properties.
:
:Unfortunately, we didn't come to a proper solution.
:
:I was told to use ZClasses, and I read a lot of documentation about it.
:But I found out that this isn't the thing I was searching for.
:
:So, now I'll try it again, very concrete this time:
:
:In my root folder, I have a property enterpriseName (string) =
:"myEnterprise".
:
:Furthermore I have an arbitrary DTML document, and I want to include my
:global property enterpriseName in the title property of this document so
:that the title of the document is "myEnterprise" at the end.
:
:The sense of that is that when I change the value of enterpriseName
:automatically all titles are updated.
:
:It is not possible to include this enterpriseName into
:standard_html_header or similar, because there will be many documents,
:and only some of them need the enterpriseName in their titles, others
:want to add an own text to the enterpriseName resulting in e. g. "This
:is the Homepage of XYZ, who is working at myEnterprise".
:
:I generally just want to insert one property into another...
:
:Please, please help me, I'm despairing in the meantime...
:
:Lars
:
:
:___
: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 )
:

-- 

_
peter sabaini, mailto: [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] zope needs webdav global access *ON/OFF* feature

2000-09-29 Thread Júlio Dinis Silva

Hi all,

I think zope MUST have a way to disable webdav access.
Running a webdav client on some zope sites I found in almost all
of them things like test_html index_html_old and some other
forgiven methods that programmers leave on their applications.
Depending on what test programmers were doing in this methods
one could find a way to do some DOS on does sites, just to begin.

I mean, even if the user dont have permissions to edit/save methods,
just the fact that he is browsing my structure and viewing my methods is bad 
for security.

I looked at source and the webdav implementation is class specific
implemented, i.e, only objects of classes that import webdav stuff and
implement it are Published by zope to a webdav client.

I tryed to find a *central* switch to disable it on ZServer or ZPublisher, 
but no luck. I also tryed to find something like
domain restriction which could be another way to disable webdav.
The solution of disable Access Contents Information to anonymous isnt
pratical on a complex site already in production.

I'll try to find a way to disable/restrict the webdav access.

Any suggestion?

Best Regards,
Júlio Dinis Silva


_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.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] Property problem - still the same...

2000-09-29 Thread Lars Heber



Peter Sabaini schrieb:

> hi
>
> afaik its not possible to nest properties.
>
> what about dtml method mytitle in the root folder consisting of
>
>- 
>
> or something like this? this will acquire title from the current
> document and enterprisename from the rootfolder provided theres not
> another enterprisename in the acquisition path.
>
> hth peter.
>

Thanks for your help,

but calling this mytitle method had to take place in standard_html_header
which however is the same for all the documents and thus not dynamically able
to decide whether and where the enterpriseName shall be displayed.

But now, I've got an idea.

I'll try to pass (or not) parameters to standard_html_header and in s_h_h
build the title.

Anyway, any further ideas would be greatly appreciated!

Lars

>
> On Fri, 29 Sep 2000, Lars Heber wrote:
>
> :In my root folder, I have a property enterpriseName (string) =
> :"myEnterprise".
> :
> :Furthermore I have an arbitrary DTML document, and I want to include my
> :global property enterpriseName in the title property of this document so
> :that the title of the document is "myEnterprise" at the end.
> :
> :The sense of that is that when I change the value of enterpriseName
> :automatically all titles are updated.
> :
> :It is not possible to include this enterpriseName into
> :standard_html_header or similar, because there will be many documents,
> :and only some of them need the enterpriseName in their titles, others
> :want to add an own text to the enterpriseName resulting in e. g. "This
> :is the Homepage of XYZ, who is working at myEnterprise".
> :
> :I generally just want to insert one property into another...
> :
> :Please, please help me, I'm despairing in the meantime...
> :
> :Lars


___
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] Uploading images my way

2000-09-29 Thread Danny William Adair

Hi all!

How can I upload/change an image in my zodb using custom forms. A call to
"manage_upload" seems to always take me to a feedback form saying "Your
changes have been saved.". How can I upload using customized forms _only_?

tia Danny


___
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] WebDAV's not really the problem...

2000-09-29 Thread Chris Withers

JXlio Dinis Silva wrote:
> I think zope MUST have a way to disable webdav access.
> Running a webdav client on some zope sites I found in almost all
> of them things like test_html index_html_old and some other
> forgiven methods that programmers leave on their applications.
> Depending on what test programmers were doing in this methods
> one could find a way to do some DOS on does sites, just to begin.

Yes, your fears are valid, but WebDAV really isn't the problem. Zope, at
a deeper level, is what is causing your problem.
You can find out the above information using any web browser, try this:

http://www.cbsnewyork.com/objectIds

I see they haven't deleted the QuickStart. Interesting... As you point
out, once you know the names of methods and the like (see
http://www.cbsnewyork.com/objectValues to find out what type objects
are, funny... objectItems, which would be slightly more useful, isn't
actually URL traversable...), you can do DOS attacks... more
interestingly, if you find a method that is anonymously accessible but
with some cool proxy roles (maybe because it needs to be like that), you
can see if you can cause bad things to happen (like deleting data) by
passing in interesting parameters (remember, Zope handily pops the
traceback in the response, even in production mode, so you can tell what
parameter you left out ;-)

Anyway, enough of the problem... possible solutions:

1. Hack the Zope code so the traceback isn't appended to your HTML in
production mode

2. Give anything you don't want to be traversable a prefix like i_ and
then use Apache to screen these out, along with */manage*.

3. Setup a decent firewall to prevent XML-RPC, FTP and WebDAV access to
your Zope server, except by people you trust.

It's a hard problem to solve, made harder by the fact that Zope supports
loads of protocols and is totally manageable through the web. These are
Zope's strengths, but they do raise itneresting problems :-S

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 )




Re: [Zope] Suggestion: Zope.org, products and testing...

2000-09-29 Thread J. Atwood

At 12:29 PM +0900 9/29/2000, Alexander Schonfeld wrote:
>?On the zope.org site, how about adding a property for products: "tested
>versions of Zope".
>
>That way we could know, without doing all the testing ourselves, whether
>or not a product was useable.

I second that. It should also be by release version and be able to 
handle multiple entries. (2.1.6, 2.1.4, 2.2.1, 2.2.2).

J

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




[Zope] "private" Yihaw folders and yihaw_latest method.

2000-09-29 Thread Didier Georgieff

Hello,

i have a security/viewing concern.

I have some Yihaw folders who are not public. I removed the "view" permission 
on the folder, and trying to get in call the authentication windows. Fine.

On my main page, i have the whatsnew, latest and toplevel methods with the 
skip_unauthorized option within the toplevel dtml-in.

If i only have the "view" permission off, the yihaw folder and subfolders are still 
listed on the toplevel method.
If i remove also the "access content" on the yihaw folder , no more listing on 
toplevel. Fine.

But, when i do that, the "latest" method raise the authentication window, and 
even a manager role fails, it's an autorisation problem on the Catalog.

Any idea for solving that ?
Thanks in advance.


* TRACEBACK *
Unauthorized
You are not authorized to access approved. 
[... SKIP ...]

  File /zope/2-1-6-
clean/lib/python/DocumentTemplate/DT_In.py, line 611, in 
renderwb
(Object: 
Catalog(bobobase_modification_time=ZopeTime()-14,
  bobobase_modification_time_usage='range:min',
  sort_on='bobobase_modification_time',
  sort_order='reverse'))
  File /zope/2-1-6-
clean/lib/python/DocumentTemplate/DT_With.py, line 148, 
in render
(Object: Catalog.getobject(data_record_id_))
  File /zope/2-1-6-
clean/lib/python/DocumentTemplate/DT_Util.py, line 329, 
in eval
(Object: _.has_key('approved') and approved or not 
_.has_key('approved'))
(Info: approved)
Unauthorized: (see above)


--
Didier Georgieff
DDAF du Bas-Rhin - Cellule SIG 
2, rue des Mineurs 67070 Strasbourg Cedex
tél : 03.88.25.20.33 - fax : 03.88.25.20.01
email : [EMAIL PROTECTED]
SIT du Bas-Rhin : http://www.bas-rhin.sit.gouv.fr
GéoWeb http://sertit10.u-strasbg.fr

___
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: "private" Yihaw folders and yihaw_latest method.

2000-09-29 Thread Didier Georgieff

Soren,
Works like a charm. Thanks.
Never used dtml-try before, but it looks like a great feature. I'll look 
deeper
Didier.

Le 29 Sep 00, à 15:08, Søren Roug a écrit :

> Yes, put aaround the problem. Look in
> yihaw_whatsnew for an example.
> 
> || -Original Message-
> || From: Didier Georgieff [mailto:[EMAIL PROTECTED]]
> || Subject: "private" Yihaw folders and yihaw_latest method.

> || If i remove also the "access content" on the yihaw folder , 
> || no more listing on toplevel. Fine.
> || 
> || But, when i do that, the "latest" method raise the 
> || authentication window, and 
> || even a manager role fails, it's an autorisation problem on 
> || the Catalog.


___
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] logout from basic authentication ... almost

2000-09-29 Thread Didier Georgieff

Hello,

On the archive i got the way to logout from the basic authentication.

i have DTML method called "logout"
with only :


   Logout requested. OK


Calling the logout method calls the authenticated window. And i 
can give a new id/pass. So login as a new user works fine.

But if i only want to became Anonymous again, when i click on the 
CANCEL button, i have theLogout requested. OK 
message at the end of the regular traceback with the Unauthorized 
error..

I tried to modify my standard_error_message to catch it but with no 
luck (i still catch other errors within my standard_error_message 
for generate a clean page).

Anyone succeeded in generating a clean "you've been logout" page 
with this method ?

Didier.

___
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] Deleting data using ZSQL

2000-09-29 Thread Steve Drees



> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> [EMAIL PROTECTED]
> Sent: Thursday, September 28, 2000 10:17 PM
> To: [EMAIL PROTECTED]
> Subject: [Zope] Deleting data using ZSQL
> 
> 
> Hi,
> 
> I am writing a dtml method that deletes data from a database, and I found
> myself unable to do this.  It seems that ZSQL is used to insert, update
> and query a database. but can not use
> "delete from table where var="


delete from this_table where var=  
is what I use (Changing type accordingly of course).

> 

___
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 sites DOS

2000-09-29 Thread Júlio Dinis Silva

Hi all,

all you that have sites running zope, its better  to optimize your
applications deleting methods you do not use anymore and
check for you External/Python Methods anonymous permissions.

I've just tested some DOS on sites running zope and ppl take care
with your methods permissions because finding them by webdav or
www.yoursite.com/objectIds its just a step to do bad things to your sites.

Take care ;-)

Best Regards,
Júlio Dinis Silva
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.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] is www.zope.org down??

2000-09-29 Thread Gilles Lavaux




 


Re: [Zope] Deleting data using ZSQL

2000-09-29 Thread Phil Harris

Steve,

Your user for the dataase does have permission to delete does it?

Phil
- Original Message -
From: "Steve Drees" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, September 29, 2000 3:00 PM
Subject: RE: [Zope] Deleting data using ZSQL


>
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> > [EMAIL PROTECTED]
> > Sent: Thursday, September 28, 2000 10:17 PM
> > To: [EMAIL PROTECTED]
> > Subject: [Zope] Deleting data using ZSQL
> >
> >
> > Hi,
> >
> > I am writing a dtml method that deletes data from a database, and I
found
> > myself unable to do this.  It seems that ZSQL is used to insert, update
> > and query a database. but can not use
> > "delete from table where var="
>
>
> delete from this_table where var=
> is what I use (Changing type accordingly of course).
>
> >
>
> ___
> 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] manage tabs within my standard_html_header

2000-09-29 Thread Didier Georgieff

Hello,

I want to use some standard manage tabs within my site design.

1 - If i call url/manage_main it brings the tabs *without* my header 
and footer.

2 - if i put a method manage_mylook with 


 


it works fine for *this* tab, but fails if i call the other tabs from this 
screen.

3 - i was thinking about having all manage_xxx methods (calling 
the proper manage_xxx) in my root, but infinite loop.

Is there a way to have *all* the allowed tabs working within my 
header/footer framework ? or do i have to rewrite the management 
screen calling the right functions each time ;-<< ?

Thanks in advance.
Didier.

___
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] Deleting data using ZSQL

2000-09-29 Thread jpenny

On Thu, Sep 28, 2000 at 11:17:03PM -0400, [EMAIL PROTECTED] wrote:
> Hi,
> 
> I am writing a dtml method that deletes data from a database, and I found
> myself unable to do this.  It seems that ZSQL is used to insert, update
> and query a database. but can not use
> "delete from table where var="
> 
 Two things, both previusly said, but both worth expanding on:

1)  What you are doing is not type-safe and not data-safe.  
If var is a string, for example,
that contains "this; delete from table;" You would probably not like
the result.  (Most SQLs would delete everything in the table!).

At least, you have to do
"delete from table where var=''"`  (if var is string).

This is still not data-safe.   A string like 
"this'; delete from table; update table where var=NAME set var='"
is just as nasty as the previous one, although it is a bit harder
for a drooling idiot to think of.

delete from table where var= is perfectly
data-safe.  Dtml-sqlvar does two things for you:  It embeds the item
in the type of quotes appropriate for the TYPE= construct, AND it 
quotes (escapes) any characters passed to it.  This makes sure that
any strings are strings, and cannot contain hidden live commands.

(It would make the second example expand to something like

delete from table where 
var='this\'; delete from table; update table where var=NAME set var=\''

And this is a perfectly legal SQL statement that probably does no
deletion, but does no harm either!

2)  You may be seeing a DB-admin problem, rather than a ZSQL problem,
make sure your Zope DB-user account has delete permission.

Jim Penny

___
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] Arbitrary SQL?

2000-09-29 Thread Erno Kuusela

Hello,

i'm obviously missing something obvious, but how does one
execute arbitrary sql statements from an external method?

   -- erno


 PGP signature


[Zope] Zope 2.2 getUserById error

2000-09-29 Thread Stuart Foster

We are using a generic user folder to authenticate against a SQL table that
stores username and password. This worked fine until we updated to 2.2. Now
we get an error about getUserByID in Owned.py.

Does anyone know what night be causing this?


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] remind me something: ZODB1 -> ZODB2 ??

2000-09-29 Thread Gilles Lavaux




Hello
 
How to comvert a ZOPE 1 exported file into a 
ZOPE 2 ??
I have done it several time, but a long time 
ago. And the information is very difficult to find, at least for 
me.
 
 
Gilles


Re: [Zope] Uploading images my way

2000-09-29 Thread Peter Bengtsson

> How can I upload/change an image in my zodb using custom forms. A call to
> "manage_upload" seems to always take me to a feedback form saying "Your
> changes have been saved.". How can I upload using customized forms _only_?
> 



For the myID in the form you type in the ID of the object. Always remember to 
"_.getitem" this, since it's an object.

together with 

 method=post enctype="multipart/form-data">





NOTE.
If you want to do the 

> tia Danny



___
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] Class variables

2000-09-29 Thread seb

Hi all

I keep finding references everywhere to class variables (e.g. that
belong to a class rather than an instance) in ZClasses.  I even found
some discussions about it in the Zope archive.  But although the
consensus seems to be that you can do it, no-one seems to know how.

Does anyone know how / where you can define them?

Seb.

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




Re: [Zope] How to change Unauthorized error message?

2000-09-29 Thread Chris Withers

Andy McKay wrote:
> Sure I suppose. How of course to implement this is another issue, as errors
> get thrown up to /lib/python/ZPublisher/HTTPResponse.py and it would be get
> to trap them before then.

Well, that's what Tres Seaver thought:

http://classic.zope.org:8080/Collector/1049/view

(he makes some good points about string exceptions too...)

However, Jim Fulton though it would be possible:

http://classic.zope.org:8080/Collector/1298/view

Sadly, no progress seems to have been made :-(

> > I don't like the way Zope does this for _all_ standard_html_error's,
> > especially as it tacks the error on the end of the HTML in production
> > mode, thus generating technically incorrect HTML (I think? ;-)
> 
> Absolutely, not just that its incorrect HTML, but also that it can expose
> implementation issues such as oh that site GUF, I know a hole there...

...nice...

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 )




Re: [Zope] sorting problem

2000-09-29 Thread Michael Bernstein

Tim Cook wrote:
> 
> Michael Bernstein wrote:
> >
> > Here's my problem: I want to sort a list of objects on a property that
> > not all items have. So I'm doing this:
> >
> > 
> >
> > The problem is that those items that have a blank someProperty are
> > listed first, when I want them at the bottom of the list. I don't want
> > to reverse the entire sort order, I just want blank values treated as
> > being larger than any other value.
> 
> Insert a chr(255) as the first character by default. It'll need
> to be trimmed off if the property becomes populated.

Sounds good, how do I do that?

Michael Bernstein.

___
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] Arbitrary SQL?

2000-09-29 Thread jpenny

On Fri, Sep 29, 2000 at 06:19:35PM +0300, Erno Kuusela wrote:
> Hello,
> 
> i'm obviously missing something obvious, but how does one
> execute arbitrary sql statements from an external method?

Look at 
http://www.zope.org/Members/jpenny/Accessing_a_ZSQL_Method_from_an_External_Method

Now think about a SQL method with parameter body and template like:


You can now do anything by supplying body as an argument.


Note.  This is  really BAD idea.  By doing this, you will construct
a web accessible method which permits anyone with access rights to 
the external method to do anything at all your database.  Not good.

Even though it is irritating from a programmer's point of view, 
it is much better to define a series of restricted ZSQL methods
that do as little as possible.  This permits far more damage control.



> 
>-- erno
> 



___
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] LocalForum_wAdm import error

2000-09-29 Thread Mario Olimpio de Menezes


Hi,

I'm trying to import LocalForum_wAdm and I'm getting the
following error:

Zope Error

   Zope has encountered an error while publishing this
resource. 

   Error Type: ImportError
   Error Value: No module named ZnolkSQLWizard.Wizard


I have LocalFS installed (0.9.5). What else I'm missing?
Thanks,
BTW, I'm looking for some product to serve files for an
intranet. It should be used more or less in the following way:

1. anonymous user can browse the tree and select files for download 

2. registered users can upload, delete, rename and copy files, as well
as download.

Does somebody know some product that do this or can serve as
basis for its development?
Thanks again


Mario O.de Menezes"Many are the plans in a man's heart, but
IPEN-CNEN/SP is the Lord's purpose that prevails"
http://curiango.ipen.br/~mario Prov. 19.21
   http://www.revistalinux.com.br


___
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] [Q] Generating a dynamic navigation bar...

2000-09-29 Thread Sudhakar Chandra

Background:
I have a folder with various DTML Documents and sub-folders in it.  Sort
of like:

/foo/index_html
/foo/buy_html
/foo/really_buy_html
/foo/really_really_buy_html
/foo/bar/

I am in the process of writing a DTML method to be used from each of these
DTML documents which will generate a dynamic tabbed navigation bar for the
other DTML Documents AND sub-folders in this folder.  I am envisioning a
short table across the width of the page with cells containing links to the
other DTML documents and sub-folders.

This is what I have so far:







">









Questions:

1. The problem with this DTML method is that all the DTML Documents and
Folders are represented as a link in the nav bar.  I want to build
intelligence into this DTML method to make the tab / cell for the current
document just textual (as opposed to a link).  If I am calling this method
from foo_html, I do not the "tab" for foo_html to be a link.  How do I do
this?  I'm guessing some kind of #if.

2. Currently, the TD cells of the table vary in length based on the
contents of the cell.  I want all the TDs to be of equal length.  I want to
first count the number of DTML Documents and Folders and make each TD to be
width 100/n % (where n is the number of Documents and Folders).  Any ideas
on how I can do math inside DTML methods?

Thanks.

Thaths
-- 
Lisa:  It's full, Dad, that means you have to take out the trash.
Bart:  Yup, that's the rule.  "He who tops it off, drops it off."
Homer: Nuh-uh.  "It isn't filled until it's spilled."
Sudhakar C13nhttp://www.aunet.org/thaths/Lead Indentured Slave

___
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] ZMySQLDA instal Import Error problem

2000-09-29 Thread Richard Moon

Installing MySQLDA-0.1.2 and running

python build.py

I get the error

Import Error: ./_mysqlmodule.so: undefined symbol: uncompress

Any clues ? I've just installed the latest (3.23.25) MySQL rpms on Linux 
6.1, including the client and development libraries, this seems to have put 
stuff in usr/lib and usr/lib/mysql so I made sure that these paths were in 
/etc/ld.so.conf and re-ran /sbin/ldconfig.

Here's the full output - thanks in advance.


rm -f *.o *~
rm -f *.a tags TAGS config.c Makefile.pre python sedscript
rm -f *.so *.sl so_locations
VERSION=`python -c "import sys; print sys.version[:3]"`; \
installdir=`python -c "import sys; print sys.prefix"`; \
exec_installdir=`python -c "import sys; print sys.exec_prefix"`; \
make -f ./Makefile.pre.in VPATH=. srcdir=. \
 VERSION=$VERSION \
 installdir=$installdir \
 exec_installdir=$exec_installdir \
 Makefile
make[1]: Entering directory `/opt/Zope-2.2.1/lib/python/Products/MySQLdb-0.1.2'
sed -n \
  -e '1s/.*/1i\\/p' \
  -e '2s%.*%# Generated automatically from Makefile.pre.in by sedscript.%p' \
  -e '/^VERSION=/s/^VERSION=[]*\(.*\)/s%@VERSION[@]%\1%/p' \
  -e '/^CC=/s/^CC=[  ]*\(.*\)/s%@CC[@]%\1%/p' \
  -e '/^CCC=/s/^CCC=[]*\(.*\)/s%#@SET_CCC[@]%CCC=\1%/p' \
  -e '/^LINKCC=/s/^LINKCC=[  ]*\(.*\)/s%@LINKCC[@]%\1%/p' \
  -e '/^OPT=/s/^OPT=[]*\(.*\)/s%@OPT[@]%\1%/p' \
  -e '/^LDFLAGS=/s/^LDFLAGS=[]*\(.*\)/s%@LDFLAGS[@]%\1%/p' \
  -e '/^LDLAST=/s/^LDLAST=[  ]*\(.*\)/s%@LDLAST[@]%\1%/p' \
  -e '/^DEFS=/s/^DEFS=[  ]*\(.*\)/s%@DEFS[@]%\1%/p' \
  -e '/^LIBS=/s/^LIBS=[  ]*\(.*\)/s%@LIBS[@]%\1%/p' \
  -e '/^LIBM=/s/^LIBM=[  ]*\(.*\)/s%@LIBM[@]%\1%/p' \
  -e '/^LIBC=/s/^LIBC=[  ]*\(.*\)/s%@LIBC[@]%\1%/p' \
  -e '/^RANLIB=/s/^RANLIB=[  ]*\(.*\)/s%@RANLIB[@]%\1%/p' \
  -e '/^MACHDEP=/s/^MACHDEP=[]*\(.*\)/s%@MACHDEP[@]%\1%/p' \
  -e '/^SO=/s/^SO=[  ]*\(.*\)/s%@SO[@]%\1%/p' \
  -e '/^LDSHARED=/s/^LDSHARED=[  ]*\(.*\)/s%@LDSHARED[@]%\1%/p' \
  -e '/^CCSHARED=/s/^CCSHARED=[  ]*\(.*\)/s%@CCSHARED[@]%\1%/p' \
  -e '/^SGI_ABI=/s/^SGI_ABI=[]*\(.*\)/s%@SGI_ABI[@]%\1%/p' \
  -e 
'/^LINKFORSHARED=/s/^LINKFORSHARED=[]*\(.*\)/s%@LINKFORSHARED[@]%\1%
/p' \
  -e '/^prefix=/s/^prefix=\(.*\)/s%^prefix=.*%prefix=\1%/p' \
  -e 
'/^exec_prefix=/s/^exec_prefix=\(.*\)/s%^exec_prefix=.*%exec_prefix=\1%/p' \

  /usr/lib/python1.5/config/Makefile >sedscript
echo "/^#@SET_CCC@/d" >>sedscript
echo "/^installdir=/s%=.*%= /usr%" >>sedscript
echo "/^exec_installdir=/s%=.*%=/usr%" >>sedscript
echo "/^srcdir=/s%=.*%= .%" >>sedscript
echo "/^VPATH=/s%=.*%=  .%" >>sedscript
echo "/^LINKPATH=/s%=.*%=   %" >>sedscript
echo "/^BASELIB=/s%=.*%=%" >>sedscript
echo "/^BASESETUP=/s%=.*%=  %" >>sedscript
sed -f sedscript ./Makefile.pre.in >Makefile.pre
/usr/lib/python1.5/config/makesetup \
  -m Makefile.pre -c /usr/lib/python1.5/config/config.c.in Setup 
-n  /usr
/lib/python1.5/config/Setup.thread /usr/lib/python1.5/config/Setup.local 
/usr/li
b/python1.5/config/Setup
make -f Makefile do-it-again
make[2]: Entering directory `/opt/Zope-2.2.1/lib/python/Products/MySQLdb-0.1.2'
/usr/lib/python1.5/config/makesetup \
  -m Makefile.pre -c /usr/lib/python1.5/config/config.c.in Setup 
-n  /usr
/lib/python1.5/config/Setup.thread /usr/lib/python1.5/config/Setup.local 
/usr/li
b/python1.5/config/Setup
make[2]: Leaving directory `/opt/Zope-2.2.1/lib/python/Products/MySQLdb-0.1.2'
make[1]: Leaving directory `/opt/Zope-2.2.1/lib/python/Products/MySQLdb-0.1.2'
gcc -fPIC  -I/usr/include/mysql -g -O2 -I/usr/include/python1.5 
-I/usr/include/p
ython1.5 -DHAVE_CONFIG_H -c ./_mysqlmodule.c
./_mysqlmodule.c: In function `_mysql_ConnectionObject_num_fields':
./_mysqlmodule.c:909: warning: passing arg 1 of `mysql_num_fields' from 
incompat
ible pointer type
gcc -shared  _mysqlmodule.o  -L/usr/lib/mysql -lmysqlclient -o _mysqlmodule.so
Traceback (innermost last):
   File "build.py", line 14, in ?
 import MySQLdb
   File "MySQLdb.py", line 19, in ?
 from _mysql import *
ImportError: ./_mysqlmodule.so: undefined symbol: uncompress

Thanks

Richard

Richard Moon
[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] WebDAV's not really the problem...

2000-09-29 Thread Jason Cunliffe

> Yes, your fears are valid, but WebDAV really isn't the problem. Zope, at
> a deeper level, is what is causing your problem.
> You can find out the above information using any web browser, try this:
>
> http://www.cbsnewyork.com/objectIds
>
> I see they haven't deleted the QuickStart. Interesting... As you point
> out, once you know the names of methods and the like (see
> http://www.cbsnewyork.com/objectValues to find out what type objects
[--8<--snip]
> It's a hard problem to solve, made harder by the fact that Zope supports
> loads of protocols and is totally manageable through the web. These are
> Zope's strengths, but they do raise interesting problems :-S

This reveals a fascinating double-edged sword.
It also makes for a very good way to explore what Zope really is and does.

It would be cool if someone could set up a small Zopesite pro-actively, to
demonsrte and explain this stuff better.

Also me think that the security issues coul be addressed by having
securebot DTMLmtehod which could go through the site, sniffing out stuff fed
it by a template page and assigning come other role or settign preoperties
to allow stronger filtering of requests on a folder scale. Maybe this is
impossible due the reverse- peverse catch-22 nature of 'acquisition'.

But surely one could use acqusition to insitute an even higher level method
which would check any requests say which do not come from that local or
specified IP/domain ?

any thoughts?

- Jason


___
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 2.2 getUserById error

2000-09-29 Thread Andy McKay

getUserByID seems to have been added in Zope 2.2, I added in a method

def getUserById(self, id, default=''):
"""Return the user corresponding to the given id.
"""
try: return self.getUser(id)
except: raise 'LoginRequired', loginScreen

into GUF and it works fine, but Im not sure if this is 100% secure!

- Original Message -
From: "Stuart Foster" <[EMAIL PROTECTED]>
To: "Zope List" <[EMAIL PROTECTED]>
Sent: Friday, September 29, 2000 7:49 AM
Subject: [Zope] Zope 2.2 getUserById error


> We are using a generic user folder to authenticate against a SQL table
that
> stores username and password. This worked fine until we updated to 2.2.
Now
> we get an error about getUserByID in Owned.py.
>
> Does anyone know what night be causing this?
>
>
> 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] Two inquiries

2000-09-29 Thread Rudd-O

Hey there people,

First, the customary thanks for such a great product.  
Second - I have two problems.  First one is that I got 
zope compiled for linux then installed Login Manager 
then installed ZPatterns, but when trying to compile 
DynPersist.c it can't find ExtensionClass.h.  It 
honestly isn't in my system tho I have python and 
python-devel installed.

Second, I was gonna use LoginManager for this project:  
I'm building an automated proxy, mail router, security 
manager, based on users, so that the administrator can 
restrict its users access to chat, web proxy, 
filesharing via samba, etcetera.  BUT I can't seem to 
find the right object to select and associate 
properties for my users (user X can use computer Y) 
neither can I find a product that will contribute those 
users to /etc/passwd and /etc/smbpasswd.  Any ideas?

Thanks in advance.  Please reply either in private mail 
or with CC to mine.

Manuel

--
   Universidad Federico Santa Maria - Campus Guayaquil

___
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] python methods

2000-09-29 Thread Rudd-O

Oh, another thingy:

An object called Python method is supposed to appear on 
the Add list? or am I supposed to emulate it with some 
kind of external method and files?  If that's the case, 
well, sad kludge.  Please let me know.

--
   Universidad Federico Santa Maria - Campus Guayaquil

___
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] sequence-item is a String? (was: Calling objects with arguments in asequence)sequence)

2000-09-29 Thread Dieter Maurer

seb writes:
 > If you do:
 > 
 > 
 >  
 >  
 >  
 > 
"sequence-item" is not a string.

However, 
calls "name" (if callable) like any name argument to a
"dtml" tag.

Use ".


Dieter

___
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] LocalForum_wAdm import error

2000-09-29 Thread Dieter Maurer

Mario Olimpio de Menezes writes:
 >  I'm trying to import LocalForum_wAdm and I'm getting the
 > following error:
 > 
 > Zope Error
 > 
 >Zope has encountered an error while publishing this
 > resource. 
 > 
 >Error Type: ImportError
 >Error Value: No module named ZnolkSQLWizard.Wizard
The error message is quite suggestive.

Apparently, your package "ZnolkSQLWizard" does not contain
a "Wizard" module. Maybe, you have to upgrade (or install) the
"ZnolkSQLWizard" product.



Dieter

___
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] Calling objects with arguments in a sequence

2000-09-29 Thread Dieter Maurer

Tres Seaver writes:
 > You were very close -- the trick here is that 'objectValues' returns
 > real objects, not IDs.  Try this (untested)::
 > 
 >   
 > 
 > 
 >
 >   
This, probably, will not work, as *ALL* name arguments (as e.g.
in )
call the object, if it is callable.

You can use "_.getitem('sequence_item')" to get an object itself
and not the result of calling the object.


Dieter

___
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] Getting properties of objects

2000-09-29 Thread Dieter Maurer

Daniel Rusch writes:
 > I am trying to build a property seach engine that will search an entire
 > Zope site for a names property 
Have a look at "ZopeFind" and the property API.

"ZopeFind" is the magic behind Zope's "find" support.
It can search a complete subtree and return the list
of objects satisfying several criteria.

The property API allows you to test for a property.
I think, you can ask for the list of properties, too.


Dieter

___
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-with equivalent in external methods?

2000-09-29 Thread Dieter Maurer

Phil Harris writes:
 > Anyone know offhand how to do an equivalent to dtml-with in an external
 > method?
Do you have a namespace (i.e. a DocumentTemplate.DT_Util.TemplateDict)?

If so, you use its push method.

If the thing, you would like to "with" is an object
(rather than a mapping), you would wrap it into
a "DocumentTemplate.DT_Util.InstanceDict" before it is
being pushed.



Dieter

___
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] iterating through ids and getting their properties

2000-09-29 Thread Dieter Maurer

Aaron Payne writes:
 > I have a list of ids which correspond to instances in a folder.  I want to 
 > iterate through the list and display their properties.
 > I get an attribute error when rendering the page.
 > 
 > 
 >  _['sequence-item']))">
 > 
 > Error Type: AttributeError
 > Error Value:

Your "pendlist" contains an element that is *NOT* an id in
"transactionInstances". It is the empty string (or consists only
of spaces). That is why your "Error Value" does not show
anything.


Dieter

___
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] Reading/Parsing HTML Files from another server

2000-09-29 Thread Dieter Maurer

seb writes:
 > You could write a simple external method that uses httplib, e.g.
"urllib.urlopen", probably, would even be easier.



Dieter

___
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] copy users

2000-09-29 Thread Dieter Maurer

Cornelis J. de Brabander writes:
 > I have a folder containing subfolders for different departments
 > I would like to have all user objects in one folder.
You probably would need an external method, as sensitive information
(such as passwords) is shielded from DTML access.

Have a look at "AccessControl.User" to find out what methods
user folders and users have to get at the information
and to create a new user automatically in a user folder.


Dieter

___
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] SQL errors

2000-09-29 Thread Dieter Maurer

Andy McKay writes:
 > Using ZODBC Database Adapter to connect to an MSSQL and I can call the sql
 > method in dtml eg:
 > 
 > 
 >   
 > 
 > Error!
 > 
 > 
 > But does anyone know a way of trapping the specific error eg: database down,
 > key violation etc...? Or do I have to hack ZODBC to return different errors?
You know the "error_value" variable defined inside the "dtml-except"?

Maybe, it can give you additional information about the kind
of error.
If it is the wrong one, reraise the exception.


Dieter

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




Re: [Zope] python methods

2000-09-29 Thread Phil Harris

Python methods are not yet part of the standard distribution, you can
however get the product install tarball from Zope.org

- Original Message -
From: "Manuel Amador (Rudd-O) Gerente de desarrollo Alpha Omega Creative
Solutions http: //www.alomega.com/" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 29, 2000 10:56 PM
Subject: [Zope] python methods


> Oh, another thingy:
>
> An object called Python method is supposed to appear on
> the Add list? or am I supposed to emulate it with some
> kind of external method and files?  If that's the case,
> well, sad kludge.  Please let me know.
>
> --
>Universidad Federico Santa Maria - Campus Guayaquil
>
> ___
> 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] dtml-with equivalent in external methods?

2000-09-29 Thread Phil Harris

Dieter,

Thanks for replying but I was being a bit confused, by science so to speak.

It was a lot simpler than I thought.

Thanks anyway.


Phil
- Original Message -
From: "Dieter Maurer" <[EMAIL PROTECTED]>
To: "Phil Harris" <[EMAIL PROTECTED]>
Cc: "Zope@Zope. Org" <[EMAIL PROTECTED]>
Sent: Friday, September 29, 2000 10:59 PM
Subject: Re: [Zope] dtml-with equivalent in external methods?


> Phil Harris writes:
>  > Anyone know offhand how to do an equivalent to dtml-with in an external
>  > method?
> Do you have a namespace (i.e. a DocumentTemplate.DT_Util.TemplateDict)?
>
> If so, you use its push method.
>
> If the thing, you would like to "with" is an object
> (rather than a mapping), you would wrap it into
> a "DocumentTemplate.DT_Util.InstanceDict" before it is
> being pushed.
>
>
>
> Dieter
>
> ___
> 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] PIL and Win32 (Imaging.dll)

2000-09-29 Thread Peter Bengtsson

I've followed all README's and searched the mailing archive.
Been to pythonware.com, downloaded Imaging1.1, installed the Photo product, but still 
can't get it working.

I think I now need the Imaging.dll file, which is not provided on pythonware.com.

Does anyone have whatever it takes to get Photo working in Zope.

This is the Photo traceback I get.

Traceback (innermost last):
  File "C:\Program\ZopeSite\lib\python\OFS\Application.py", line 397, in 
import_products
product=__import__(pname, global_dict, global_dict, silly)
  File "C:\Program\ZopeSite\lib\python\Products\Photo\__init__.py", line 42, in ?
import Photo
  File "C:\Program\ZopeSite\lib\python\Products\Photo\Photo.py", line 87, in ?
from PIL.Imageimport BICUBIC, BILINEAR, NEAREST
  File "C:\Program\Python\Lib\PIL\__init__.py", line 5, in ?
import Image, ImageFile, ImageEnhance, ImageDraw,  _imaging, GifImagePlugin, 
JpegImagePlugin, PngImagePlugin, BmpImagePlugin
ImportError: No module named _imaging


So, it looks like Image, ImageFile, ... up until _imaging is imported successfully.
Other PIL hints? 



___
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] PIL and Win32 (Imaging.dll)

2000-09-29 Thread Damien Morton

Theres no pre-compiled binary of PIL1.1

I stuck to version 1.0, for which _imaging.dll is supplied.
I created a directory at zope/lib/python/PIL and put everything in there
I also found i needed tcl80.dll and tk80.dll in there, as well as
_tkinter.pyd

runs fine now



> -Original Message-
> From: Peter Bengtsson [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 29, 2000 8:42 PM
> To: [EMAIL PROTECTED]
> Subject: [Zope] PIL and Win32 (Imaging.dll)
> 
> 
> I've followed all README's and searched the mailing archive.
> Been to pythonware.com, downloaded Imaging1.1, installed the 
> Photo product, but still can't get it working.
> 
> I think I now need the Imaging.dll file, which is not 
> provided on pythonware.com.
> 
> Does anyone have whatever it takes to get Photo working in Zope.
> 
> This is the Photo traceback I get.
> 
> Traceback (innermost last):
>   File "C:\Program\ZopeSite\lib\python\OFS\Application.py", 
> line 397, in import_products
> product=__import__(pname, global_dict, global_dict, silly)
>   File 
> "C:\Program\ZopeSite\lib\python\Products\Photo\__init__.py", 
> line 42, in ?
> import Photo
>   File 
> "C:\Program\ZopeSite\lib\python\Products\Photo\Photo.py", 
> line 87, in ?
> from PIL.Imageimport BICUBIC, BILINEAR, NEAREST
>   File "C:\Program\Python\Lib\PIL\__init__.py", line 5, in ?
> import Image, ImageFile, ImageEnhance, ImageDraw,  
> _imaging, GifImagePlugin, JpegImagePlugin, PngImagePlugin, 
> BmpImagePlugin
> ImportError: No module named _imaging
> 
> 
> So, it looks like Image, ImageFile, ... up until _imaging is 
> imported successfully.
> Other PIL hints? 
> 
> 
> 
> ___
> 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 )