RE: [Zope] How to display only x records with

2001-01-15 Thread Ron Bickers

Exactly how is it not working?

Without knowing that, I'll guess that you might be seeing the effects of the
default orphan setting of 3, which prevents there from being a "left over"
batch of less than 3.  So if you only have 4 objects, setting size=2 will
still cause all 4 to be returned.  To force it to return your size, set
orphan=0.


...

___

Ron Bickers
Logic Etc, Inc.
[EMAIL PROTECTED]


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Timothy Wilson
> Sent: Monday, January 15, 2001 11:56 PM
> To: Zope listserv
> Subject: [Zope] How to display only x records with 
>
>
> Hey everyone,
>
> I've got a method to display some text which uses
> 
> to iterate through a bunch of "Spam and Eggs" ZClass instances. I thought
> that I could use size="2" in the  to display only the first two
> instances, but it's not working. I want to display only the first two and
> use a link at the bottom to direct people to see the rest on a separate
> page. Any ideas?


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




[Zope] How to display only x records with

2001-01-15 Thread Timothy Wilson

Hey everyone,

I've got a method to display some text which uses 

to iterate through a bunch of "Spam and Eggs" ZClass instances. I thought
that I could use size="2" in the  to display only the first two
instances, but it's not working. I want to display only the first two and
use a link at the bottom to direct people to see the rest on a separate
page. Any ideas?

-Tim

--
Tim Wilson  | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
W. St. Paul, MN |  | http://slashdot.org/
[EMAIL PROTECTED] || http://linux.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] Embedding DTML

2001-01-15 Thread richard

[EMAIL PROTECTED] wrote:
> 
> Zope 2.3 CVS
> 
> I have a Python product that calls HTMLFile objects from within other
> HTMLFile objects. Suppose the first file is:
> 
> 
> 
> and the second file, page_html, is:
> 
> 
> &dtml-URL1;
> 
> I get a KeyError on URL1. If this file is:
> 
> 
> 
> 
> then it works fine. Any clues?

   Of course, the obvious problem was that I was calling the page_html
incorrectly. I remember years ago when I was using DTML under Bobo that I
ran into this exact same problem, and Jim Fulton pointed out the error of
my ways. Of course, it's all still black magic, and Jim's elsewhere, so I
hadda delve into the DocumentTemplate source to find the solution myself.
Four head-hurting hours later, the solution is:



   And all is made better.


  Richard

-- 
Richard Jones
[EMAIL PROTECTED]
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)

___
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] request for advice: using ZCatalog

2001-01-15 Thread [EMAIL PROTECTED]

On Tuesday 16 January 2001 12:31, Chris McDonough wrote:
> 2.3 final should be out by the end of the month.  The details are at
> http://dev.zope.org/Resources/zope_230_plan.html
>
> Upgrading from 2.2.X to 2.3 should require minimal effort.
>
ya know, this really shows why digicool really fits you guys.  you guys 
really are cool.

thanks 
-- 

http://www.kedai.com.my/kk 
http://www.kedai.com.my/eZine 

Get the tables!


___
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- &

2001-01-15 Thread Angietel



 
Is  
equal to 


Re: [Zope] request for advice: using ZCatalog

2001-01-15 Thread Chris McDonough

2.3 final should be out by the end of the month.  The details are at
http://dev.zope.org/Resources/zope_230_plan.html

Upgrading from 2.2.X to 2.3 should require minimal effort.

- Original Message -
From: "Bak@kedai" <[EMAIL PROTECTED]>
To: "Chris McDonough" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, January 15, 2001 10:09 PM
Subject: Re: [Zope] request for advice: using ZCatalog


> On Tuesday 16 January 2001 11:05, Chris McDonough wrote:
> > If I were you, I'd wait for 2.3 final.  There are some significant
changes
> > that need to make it into 2.3 yet as far as ZCatalog goes, including
some
> > textindex bugfixes and merging of textindexes on update.  2.2.5 has some
> > Catalog bugfixes, but more bugs have been discovered and squashed since
> > then.
> >
> ok
> this puts me in a tight spot. any 2.3 ETA?  i don't know how long i can
hold
> this.  will 2.3 be backward compatible to 2.2.x?  if that's the case, it
> should take care of the upgrade path.  and i can try and live with 2.2.5
and
> its bugs until 2.3 arrives.
>
> hoping that upgrading 2.2.x to 2.3.x to be as easy as upgrading from 2.1.x
to
> 2.2.x.
>
> thanks
> --
>
> http://www.kedai.com.my/kk
> http://www.kedai.com.my/eZine
>
> Strange how laughter looks like crying with no sound, and raindrops taste
> like tears .. without the pain
>
>
> ___
> 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] sendmail implementation problem

2001-01-15 Thread Lee

Hi,

This is more of an implementation problem that anything else, which is
probably starightforward enough for those with more experience that
myself. The simplified version is as follows:

Form A collects usernames and send these to Form B.

Form B takes the input parameters from the REQUEST object and places
them in 'hidden' form inputs with name="username" and provides some
input textfields prompting for 'subject', 'message', etc. These are
submitted to Form C

Form C displays all the parameters in the REQUEST object and gives a
view of what the email will look like, e.g.

+---=
| To: [EMAIL PROTECTED]   |
| From: [EMAIL PROTECTED], [EMAIL PROTECTED]   |
| Subject: Zope |   
|   |
| My message here   |
|   |   
+---=

Everything (bar the recipients) can be specifided using , etc. as required but as the usernames in the hidden field are
passed into a method, which does not know their names; I have to get
them from the REQUEST object again. I have produced the following code
to collect all the usernames (used to creat recipients email address);

 

: 



So displaying the email is easy but how can I send this to my sendmail
method?

1 - Simply collect all the usernames, variables in hidden fields and
send them onto sendmail?
2 - or is there a way to CALL my sendmail method for each individual
recipient (email address) from this method simply by hitting a SUBMIT
button?

Which is the easiest/most efficient way to go about this? Ideally, I
want the email dislayed (like it's formatted above) and then just simply
hit a submit button to send it to multiple recipients. I'd rather not
have something like 'lee.reilly@ntlworld, [EMAIL PROTECTED]' in the 'To:'
field - just multiple, individual emails.

It's late - but I hope that makes sense(?). Thanks very much for any
guidance you can give me!

- Best regards,

Lee

--
Lee Reilly
mailto:[EMAIL PROTECTED]

ø¤º°`°º¤øø¤º°`°º¤øø¤º°`°º¤øø¤º°`°º¤ø

HAVE SKILLS; WILL TRAVEL.

I'm currently looking for an internship in the USA
in the field of web development. Ideally, I'm looking
for a placement for 3 to 18 months. Can you help?

More details, my resume, etc. @
http://homepages.strath.ac.uk/~aeu97172/




___
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] request for advice: using ZCatalog

2001-01-15 Thread [EMAIL PROTECTED]

On Tuesday 16 January 2001 11:05, Chris McDonough wrote:
> If I were you, I'd wait for 2.3 final.  There are some significant changes
> that need to make it into 2.3 yet as far as ZCatalog goes, including some
> textindex bugfixes and merging of textindexes on update.  2.2.5 has some
> Catalog bugfixes, but more bugs have been discovered and squashed since
> then.
>
ok
this puts me in a tight spot. any 2.3 ETA?  i don't know how long i can hold 
this.  will 2.3 be backward compatible to 2.2.x?  if that's the case, it 
should take care of the upgrade path.  and i can try and live with 2.2.5 and 
its bugs until 2.3 arrives.  

hoping that upgrading 2.2.x to 2.3.x to be as easy as upgrading from 2.1.x to 
2.2.x.

thanks 
-- 

http://www.kedai.com.my/kk 
http://www.kedai.com.my/eZine 

Strange how laughter looks like crying with no sound, and raindrops taste 
like tears .. without the pain


___
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] request for advice: using ZCatalog

2001-01-15 Thread Chris McDonough

If I were you, I'd wait for 2.3 final.  There are some significant changes
that need to make it into 2.3 yet as far as ZCatalog goes, including some
textindex bugfixes and merging of textindexes on update.  2.2.5 has some
Catalog bugfixes, but more bugs have been discovered and squashed since
then.

- Original Message -
From: "Bak@kedai" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 15, 2001 9:06 PM
Subject: [Zope] request for advice: using ZCatalog


> hello all
> i'm about to jump into uncharted waters (well, for me at least)
> i have a news site, and would like to use ZCatalog to present, index, etc
> news.  all's well and good.
> i have a functioning ZClass, that is catalog aware, and searchable.
>
> what i'd like to know is
> -the stability of ZCatalog as of 2.2.5.
> -what's in store in 2.3
> -upgradability from 2.2.5 to 2.3
> -heartstopping bugs that i may have not encountered yet
> -performance speed/response.
>
> with my limited tests[1], i got ok response time, compared to what i have
now
> where i iterate through objectItems/Values.  but when i cache with
> CachePool[2], response is better.  correct me if i'm wrong.
>
> i'd like to not go thru what i'm going thru now.
>
> but will this hold water?  especially since i expect more requests.
>
> thanks
> ---8<
> [1]
> /usr/sbin/ab -n 300 -c 200 myurl
> This is ApacheBench, Version 1.3c <$Revision: 1.38 $> apache-1.3
> Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
> Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/
>
> Server Software:Apache/1.3.9
> Server Hostname:203.106.2.200
> Server Port:80
>
> Document Path:
> myurl
> Document Length:9644 bytes
>
> Concurrency Level:  200
> Time taken for tests:   33.586 seconds
> Complete requests:  300
> Failed requests:0
> Total transferred:  3030864 bytes
> HTML transferred:   2916288 bytes
> Requests per second:8.93
> Transfer rate:  90.24 kb/s received
>
> Connnection Times (ms)
>   min   avg   max
> Connect:145   162
> Processing:   736 14748 25346
> Total:737 14793 25508
>
> [2]
> /usr/sbin/ab -n 300 -c 200 myotherurl
> This is ApacheBench, Version 1.3c <$Revision: 1.38 $> apache-1.3
> Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
> Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/
>
> Server Software:Apache/1.3.9
> Server Hostname:203.106.2.200
> Server Port:80
>
> Document Path:
> myotherurl
> Document Length:9524 bytes
>
> Concurrency Level:  200
> Time taken for tests:   7.646 seconds
> Complete requests:  300
> Failed requests:0
> Total transferred:  2949432 bytes
> HTML transferred:   2862705 bytes
> Requests per second:39.24
> Transfer rate:  385.75 kb/s received
>
> Connnection Times (ms)
>   min   avg   max
> Connect:14483
> Processing:   320  3291  4800
> Total:321  3335  4883
>
> --
>
> http://www.kedai.com.my/kk
> http://www.kedai.com.my/eZine
>
> Strange how laughter looks like crying with no sound, and raindrops taste
> like tears .. without the pain
>
>
> ___
> 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] Calling other frames (OT)

2001-01-15 Thread Dennis Nichols

At 1/16/01 08:58 AM, Curtis Maloney wrote:
>As for this frame problem... seems like you're voiding the best (IMHO) use of
>frames, which is to prevent reloading of portions of the page.  Otherwise I
>just render all the objects into elements of an 'uber-table'...

I agree with Curtis about frames providing the wonderful ability to reload 
part of the page without reloading and redrawing the whole mess. But... the 
frame most likely to be reloaded is the one with the content (as opposed to 
the navigation, advertisement, and other decorative frames) and if you 
don't reload the frameset then you can't bookmark that particular content. 
What to do about that?




--
Dennis Nichols
[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] request for advice: using ZCatalog

2001-01-15 Thread [EMAIL PROTECTED]

hello all
i'm about to jump into uncharted waters (well, for me at least)
i have a news site, and would like to use ZCatalog to present, index, etc 
news.  all's well and good.  
i have a functioning ZClass, that is catalog aware, and searchable.

what i'd like to know is 
-the stability of ZCatalog as of 2.2.5.  
-what's in store in 2.3
-upgradability from 2.2.5 to 2.3
-heartstopping bugs that i may have not encountered yet
-performance speed/response.

with my limited tests[1], i got ok response time, compared to what i have now 
where i iterate through objectItems/Values.  but when i cache with 
CachePool[2], response is better.  correct me if i'm wrong.

i'd like to not go thru what i'm going thru now.

but will this hold water?  especially since i expect more requests.

thanks
---8<
[1]
/usr/sbin/ab -n 300 -c 200 myurl
This is ApacheBench, Version 1.3c <$Revision: 1.38 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/

Server Software:Apache/1.3.9
Server Hostname:203.106.2.200
Server Port:80

Document Path:  
myurl
Document Length:9644 bytes

Concurrency Level:  200
Time taken for tests:   33.586 seconds
Complete requests:  300
Failed requests:0
Total transferred:  3030864 bytes
HTML transferred:   2916288 bytes
Requests per second:8.93
Transfer rate:  90.24 kb/s received

Connnection Times (ms)
  min   avg   max
Connect:145   162
Processing:   736 14748 25346
Total:737 14793 25508

[2]
/usr/sbin/ab -n 300 -c 200 myotherurl
This is ApacheBench, Version 1.3c <$Revision: 1.38 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/

Server Software:Apache/1.3.9
Server Hostname:203.106.2.200
Server Port:80

Document Path:  
myotherurl
Document Length:9524 bytes

Concurrency Level:  200
Time taken for tests:   7.646 seconds
Complete requests:  300
Failed requests:0
Total transferred:  2949432 bytes
HTML transferred:   2862705 bytes
Requests per second:39.24
Transfer rate:  385.75 kb/s received

Connnection Times (ms)
  min   avg   max
Connect:14483
Processing:   320  3291  4800
Total:321  3335  4883

-- 

http://www.kedai.com.my/kk 
http://www.kedai.com.my/eZine 

Strange how laughter looks like crying with no sound, and raindrops taste 
like tears .. without the pain


___
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: Displaying another objects properties

2001-01-15 Thread Andy McKay

Document 2 has property: name=foo, type=string, value=bar
Document 1 dtml:


  


or



Assuming Document1 and 2 are in the same folder.

--
  Andy McKay.


- Original Message -
From: "Michael Garrison Stuber" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 15, 2001 5:26 PM
Subject: [Zope] Newbie: Displaying another objects properties


> I've looked all over (the Zope book, the zope site, the Zope Newbie site,
> the Zope group archives) and I'm still confused.  I'm trying to do
something
> like this:
>
> DTMLDocument1:
> Contents{
>
> 
>
> 
> 
> 
>
> }
>
> DTMLDocument2:
> Contents{
>
> Blah blah blah
>
> }
> Document2Property{
>
> Spoken by the blahster
>
> }
>
> Basically, from a DTML document I'd like to display (or otherwise
reference)
> the properties of another DTML document.  I've tried _, REQUEST, getattr,
> and direct references to DTMLDocument2 all to no avail.  Surely there is a
> way to do this.  (I hope).  Help!  Thanks
>
> --
> Michael T. Garrison Stuber
>
>
> --
> Michael T. Garrison Stuber
>
>
>
> ___
> 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] Re-posted - How to delete users in Membership product with Persistent User Source

2001-01-15 Thread Dirksen

The delUserForm calls 'deleteInstances' to do the job, yet 'deleteInstances' is not
provided with the product, instead 'manage_deleteUsers' is. When I change
'deleteInstances' to 'manage_deleteUsers' in the code of delUserForm, things work out.

Bill, it's probably a bug :)

cheers
Dirksen

--- Bill Anderson <[EMAIL PROTECTED]> wrote:
> Kamon Ayeva wrote:
> 
> > Hi,
> > 
> > Has anyone been able to use the delUserForm to delete
> > users added within a PersistentUserSource in the
> > PortalMembershipSystem object ?
> 
> Yes, quite frequently.
> 
> 
> > I am not sure if this piece of code in delUserForm
> > preceding the HTML form snippet does the right job:
> > 
> > 
> > 
> >  > "idList.append(getItem(_['sequence-item']))">
> > 
> > 
> > 
> > ...
> > 
> > I can view the users but when I click on the form
> > button to delete some users, I get
> > 
> > I get 
> > 
> > Error Type: NotFound
> > Error Value: None
> >
> 
> What platform?
> What Zope version?
> What version of each related/required product?
> Is SiteAcces Installed?
> If So, what version?
> 
> 
> 
> ___
> 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 )
> 


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.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 )




[Zope] Newbie: Displaying another objects properties

2001-01-15 Thread Michael Garrison Stuber

I've looked all over (the Zope book, the zope site, the Zope Newbie site,
the Zope group archives) and I'm still confused.  I'm trying to do something
like this:

DTMLDocument1:
Contents{







}

DTMLDocument2:
Contents{

Blah blah blah

}
Document2Property{

Spoken by the blahster

}

Basically, from a DTML document I'd like to display (or otherwise reference)
the properties of another DTML document.  I've tried _, REQUEST, getattr,
and direct references to DTMLDocument2 all to no avail.  Surely there is a
way to do this.  (I hope).  Help!  Thanks

--
Michael T. Garrison Stuber


--
Michael T. Garrison Stuber



___
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] Can't access Control_Panel from folder with SiteRoot

2001-01-15 Thread Itai Tavor

Hi,

I use Apache's ProxyPass to access a site in a Zope folder. The 
VirtualHost directive contains:


 ServerName MySite
 ProxyPass / http://10.0.1.20:8080/MySite/
 ProxyPassReverse / http://10.0.1.20:8080/MySite/
 ProxyPass /misc_ http://10.0.1.20:8080/misc_
 ProxyPass /p_ http://10.0.1.20:8080/p_


The MySite folder contains a SiteRoot with base = 'http://10.0.1.21' 
and path = '/'.

I have a method that accesses properties stored in a Common Instance 
property sheet of a ZClass:

   

This works using http://10.0.1.20:8080/MySite/myMethod, but fails 
with NameError: Control_Panel when called using 
http://10.0.1.21/myMethod.

In fact, even a very simple  fails in the same way.

Why is this happening? How can I get around it?

Itai
-- 
Itai Tavor"Je sautille, donc je suis."
C3Works[EMAIL PROTECTED]  - Kermit the Frog

"If you haven't got your health, you haven't got anything"


___
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] Searching method using DTML

2001-01-15 Thread Angietel




 
  
 

 
     
 
     
 
   
 

 
The ZOPE error is like :-
 
Expression (Python) Syntax 
error: invalid syntax
, for tag , on line 20 of a


[Zope] Photo & Jpeg Support Problems

2001-01-15 Thread J. Atwood

I have been playing around with Drew's photo product and it works 
great with GIFs but when I try to upload a JPEG into it I get the 
following

Error Type: IOError
Error Value: decoder jpeg not available

Traceback (innermost last):
   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in 
publish_module
   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in publish
   File /usr/local/zope/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 171, in publish
   File /usr/local/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply
 (Object: manage_addPhoto)
   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 112, in 
call_object
 (Object: manage_addPhoto)
   File /usr/local/zope/lib/python/Products/Photo/Photo.py, line 132, 
in manage_addPhoto
 (Object: Traversable)
   File /usr/local/zope/lib/python/OFS/Image.py, line 276, in manage_upload
 (Object: BZ_li_13.jpg)
   File /usr/local/zope/lib/python/Products/Photo/Photo.py, line 290, 
in update_data
 (Object: BZ_li_13.jpg)
   File /usr/local/zope/lib/python/Products/Photo/Photo.py, line 319, 
in _generateDisplays
 (Object: BZ_li_13.jpg)
   File /usr/local/zope/lib/python/Products/Photo/Photo.py, line 329, 
in _generateDisplay
 (Object: BZ_li_13.jpg)
   File /usr/local/zope/lib/python/Products/Photo/Photo.py, line 370, in resize
 (Object: BZ_li_13.jpg)
   File /usr/local/zope/lib/python1.5/PIL/Image.py, line 634, in resize
   File /usr/local/zope/lib/python1.5/PIL/ImageFile.py, line 133, in load
   File /usr/local/zope/lib/python1.5/PIL/Image.py, line 237, in _getdecoder
IOError: (see above)

I have tried and tried again to recompile jpeg, include the path.. 
whatever! I am using Zope 2.2.4 , on RH 6.2

Thanks,
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] Embedding DTML

2001-01-15 Thread richard

Zope 2.3 CVS

I have a Python product that calls HTMLFile objects from within other
HTMLFile objects. Suppose the first file is:



and the second file, page_html, is:


&dtml-URL1;

I get a KeyError on URL1. If this file is:




then it works fine. Any clues?


 Richard

-- 
Richard Jones
[EMAIL PROTECTED]
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)

___
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] Adding content type to internet explorer

2001-01-15 Thread Hung Jung Lu

Hi,

Can someone tell me how to add content types (and the associated program) to 
internet explorer on Windows platform? Is it in the registry?

thanks,

Hung Jung

_
Get your FREE download of MSN Explorer at http://explorer.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] Strange structured-text behaviour in Python Product.

2001-01-15 Thread Max M

I have a Python product where I have a variable called self.description but
when I try to show it with  the
text doesn't get formatted.  Is there any good reason for that?

It shows the text just fine, just not as structured-text.

Regards

Max M

Max M. W. Rasmussen,Denmark.   New Media Director
private: [EMAIL PROTECTED] work: [EMAIL PROTECTED]
-
Specialization is for insects.  -  Robert A. Heinlein


___
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] ZClasses meet PythonScripts, sample request

2001-01-15 Thread Jim Washington

Timothy Wilson wrote:
> 
> On Mon, 15 Jan 2001, Jim Washington wrote:
> 
> > Where is the editFormAction Python Script? It should be in your ZClass's
> > /methods.  If you are instead acquiring it from a Folder somewhere, you
> > will need to use 'context' instead of 'container' inside the Python
> > Script.
> 
> I'm not getting any errors now that I've changed the editFormAction to refer
> to 'context'. My guy feeling is that these methods should be methods of the
> ZClass so I'll probably change that, but for now no errors.
> 
> Unfortunately, however, the instance isn't getting updated either. After
> hitting submit I get the red "Your changes have been saved" and the edit
> form is visible, but the same old values are there. When I view the instance
> after updating I also see the same of values. Apparently either REQUEST
> doesn't contain the data it's supposed to or the instance isn't being
> properly modified with REQUEST's contents. Any thoughts?

I would put the Python Script in the ZClass's /methods and see what
happens.

-- Jim

___
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 other frames (OT)

2001-01-15 Thread Curtis Maloney

On Monday 15 January 2001 22:51, Oliver Bleutgen wrote:
> > I think probably Javascript is the 'cleanest' solution in this case,
> > but depending on the complexity of your UI another non-JS approach is
> > to make every link target the topmost frome (e.g., target="_top") and
> > redraw all frames in the frameset on each 'click'. This way you know
> > that all frames reflect the latest situation, but it can be annoying
> > to see the whole browser redraw every time you do anything. However,
> > if your browser doesn't *do* Javascript (so long as it does do
> > frames hmm.. how likely is that?) then it would at least work
>
> There' s always the possibility that people disable javascript -
> and checking for instance http://www.guninski.com/browsers.html
> I would say they have reason to do so.
>

Agreed.  I run NS4.76 with JavaScript disabled... it's the only way I've 
found to stop it pissing away my memory.

> My take is that one should at least provide a non-javascript alternative
> to browse the site. This also helps with search-engines
>
IMHO, JavaScript should be used to provide faster access to the same 
interface, but never to add functionality that is not otherwise available.  A 
great example is http://www.asus.com.tw  ...  they have a side-bar menu 
which, with JS, will give you sub-menus when you hover over the links, etc.  
However, if you just click on the link, you are taken to a sub page which has 
the very same sub-menu, and this happens regardless of JS.

> cheers,
> oliver
>
>

As for this frame problem... seems like you're voiding the best (IMHO) use of 
frames, which is to prevent reloading of portions of the page.  Otherwise I 
just render all the objects into elements of an 'uber-table'...

Have a better one,
Curtis Maloney

___
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] online-user-list

2001-01-15 Thread urs.beyeler

i'm building up a community-site in educational use and would like to 
show all the online-users (like on ICQ) ... I'm using GUF for 
user-authentication. any ideas? thnxs.

.urs

___
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] ZClasses meet PythonScripts, sample request

2001-01-15 Thread Timothy Wilson

On Mon, 15 Jan 2001, Jim Washington wrote:

> What is the name of the propertysheet in your ZClass that these values
> are on?  Is it 'job_info'?

Yes.

> Where is the editFormAction Python Script? It should be in your ZClass's
> /methods.  If you are instead acquiring it from a Folder somewhere, you
> will need to use 'context' instead of 'container' inside the Python
> Script.

I had them originally in the ZClass's /methods, but moved them out.

That brings up another good question that I haven't really seen
addressed. Hopefully others are still reading this thread. :-)

When is it proper to make your methods part of the ZClass itself and when
should I put them out in a folder somewhere to be acquired? I've seen it
done both ways in various products, but the difference between the two
approaches has never been completely clear to me.

Can anyone suggest a "rule-of-thumb" here?

-Tim

--
Tim Wilson  | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
W. St. Paul, MN |  | http://slashdot.org/
[EMAIL PROTECTED] || http://linux.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] ZClasses meet PythonScripts, sample request

2001-01-15 Thread Jim Washington

Hi, Tim

What is the name of the propertysheet in your ZClass that these values
are on?  Is it 'job_info'?

Where is the editFormAction Python Script? It should be in your ZClass's
/methods.  If you are instead acquiring it from a Folder somewhere, you
will need to use 'context' instead of 'container' inside the Python
Script.

-- Jim Washington


Timothy Wilson wrote:
> 
> On Mon, 15 Jan 2001, Jim Washington wrote:
> 
> > I have it.
> > The Python Script I sent you:
> >
> > container.propertysheets['job_info'].manage_changeProperties(REQUEST)
> >
> > needs to be rewritten:
> >
> > container.propertysheets.job_info.manage_changeProperties(REQUEST)
> 
> Hey Jim,
> 
> I'm getting closer. Now I get the following error and traceback:
> 
>  Error Type: AttributeError
> Error Value: job_info
> 
> Traceback (innermost last):
>   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 222, in
> publish_module
>   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 187, in
> publish
>   File /var/lib/zope/2.3.0a2/lib/python/Zope/__init__.py, line 221, in
> zpublisher_exception_hook
> (Object: Traversable)
>   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 171, in
> publish
>   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/mapply.py, line 160, in
> mapply
> (Object: editJobForm)
>   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 112, in
> call_object
> (Object: editJobForm)
>   File /var/lib/zope/2.3.0a2/lib/python/OFS/DTMLMethod.py, line 189, in
> __call__
> (Object: editJobForm)
>   File /var/lib/zope/2.3.0a2/lib/python/DocumentTemplate/DT_String.py, line
> 538, in __call__
> (Object: editJobForm)
>   File /var/lib/zope/2.3.0a2/lib/python/DocumentTemplate/DT_Util.py, line
> 336, in eval
> (Object: editFormAction(REQUEST))
> (Info: REQUEST)
>   File , line 0, in ?
>   File /var/lib/zope/2.3.0a2/lib/python/Shared/DC/Scripts/Bindings.py, line
> 325, in __call__
> (Object: editFormAction)
>   File /var/lib/zope/2.3.0a2/lib/python/Shared/DC/Scripts/Bindings.py, line
> 354, in _bindAndExec
> (Object: editFormAction)
>   File
> /var/lib/zope/2.3.0a2/lib/python/Products/PythonScripts/PythonScript.py,
> line 321, in _exec
> (Object: editFormAction)
> (Info: ({'script': ,
> 'context': , 'container':  instance at 87225f0>, 'traverse_subpath': []},
> (

form

valign="top" >align="left"> valign="top" >align="left"> valign="top" >align="left"> > -- again snipping the rest of REQUEST -- > > File Python Script, line 2, in editFormAction > File /var/lib/zope/2.3.0a2/lib/python/Products/PythonScripts/Guarded.py, > line 272, in __getattr__ > File /var/lib/zope/2.3.0a2/lib/python/Products/PythonScripts/Guarded.py, > line 143, in __careful_getattr__ > (Object: Traversable) > AttributeError: (see above) > > Any ideas? ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )

RE: [Zope] How do I authenticate through pcgi and win2000 ????


I just wondered if there is an "AUTHENTICATED_USER.authenticate(userName,
password)" that I could call from a form. And then bypass all that IIS mumbo
jumbo completely.

Guess I will have to dig the sources.

Regards Max M

Max M. W. Rasmussen,Denmark.   New Media Director
private: [EMAIL PROTECTED] work: [EMAIL PROTECTED]
-
Specialization is for insects.  -  Robert A. Heinlein

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Dieter Maurer

 > I have installed zope on port 8080 on a win 2K machine.
 >
 > It runs nicely, but due to firewalls and other reasons it has to run on
port
 > 80. So I have added zope.pcgi etc. to the IIS. And it runs nicely.
 >
 > But when I try to use a manage page I cannot log in without being a
member
 > of the win2K domain, and that is not feasible in this case. I have tried
all
 > setting, I think.

You either access Zope for management purposes on 8080
or you learn how to convince IIS to forward authentication
information. Maybe "doc/WEBSERVER.txt" says something about this
issue.


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 )




Re: [Zope] Re-posted - How to delete users in Membership product with Persistent User Source


Kamon Ayeva wrote:

> Hi,
> 
> Has anyone been able to use the delUserForm to delete
> users added within a PersistentUserSource in the
> PortalMembershipSystem object ?

Yes, quite frequently.


> I am not sure if this piece of code in delUserForm
> preceding the HTML form snippet does the right job:
> 
> 
> 
>  "idList.append(getItem(_['sequence-item']))">
> 
> 
> 
> ...
> 
> I can view the users but when I click on the form
> button to delete some users, I get
> 
> I get 
> 
> Error Type: NotFound
> Error Value: None
>

What platform?
What Zope version?
What version of each related/required product?
Is SiteAcces Installed?
If So, what version?



___
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 do I authenticate through pcgi and win2000 ????


=?iso-8859-1?Q?Max_M=F8ller_Rasmussen?= writes:
 > I have installed zope on port 8080 on a win 2K machine.
 > 
 > It runs nicely, but due to firewalls and other reasons it has to run on port
 > 80. So I have added zope.pcgi etc. to the IIS. And it runs nicely.
 > 
 > But when I try to use a manage page I cannot log in without being a member
 > of the win2K domain, and that is not feasible in this case. I have tried all
 > setting, I think.
 > 
 > Is there any way to do it?
 > 
 > Should I make my own authentication page so users can log on through a form?
 > If so how is this done?
You either access Zope for management purposes on 8080
or you learn how to convince IIS to forward authentication
information. Maybe "doc/WEBSERVER.txt" says something about this
issue.


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] renaming python input params in DTML


Lee writes:
 > ...
 > I have a Python method expecting 'text' as a parameter ...
 > ...
 > The Python method, testSQL, returns 'result'.
 > ...
 > 
 > 
 > 
 > 
Inside 'expr="..."' you use "_['x']" instead of .

As this is a Python expression that needs to be evaluated,
it cannot be in a string. You can use the "%" operator
which takes a format string and an object or tuple as
parameters and formats object/tuple according to the string.

If your Python method contains a "return result",
then there is not magically a "result" variable (and there is
not need for it, too).

Are you sure, you want the nested "dtml-in". Looks very strange.

Thus, you can 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] How to get python error output? (PIL)


[EMAIL PROTECTED] writes:
 > ... print in external method ...
"print" does not print to the log file but to standard output.

Under Unix (and I think under Windows, too) you can redirect
standard output to a file.

The alternative is to use Zope's Log module (called zLOG).
Its output goes to the log file.


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] ZClasses meet PythonScripts, sample request


On Mon, 15 Jan 2001, Jim Washington wrote:

> One point about your form:
> 
> You have id as a form variable.  You will be disappointed by its
> behavior.

Thanks Jim.

Care to elaborate on the problems with using id as a form variable.

-Tim

--
Tim Wilson  | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
W. St. Paul, MN |  | http://slashdot.org/
[EMAIL PROTECTED] || http://linux.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] Folder upload ?


Hi,

Could anyone tell me, if it is possible to upload a whole folder with all
its including objekts like pictures and things into ZOPE? If yes, tell me
how, please.

And another question: a created my own zclass ( a newsitem). One instance of
this newsitem has the same function like a folder. I can upload for example
a file in it with the tag:


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] ZMySQLDA returns truncated/corrupted data?


On Mon, 15 Jan 2001 [EMAIL PROTECTED] wrote:

> I am running Zope from the CVS (from January 14th), MySQL 3.22.23 and
> ZMySQLDA v2.0.1.

Are you really running MySQL 3.22.23? This is a rather old version.
 
> The install appears to be successfull, the Products appear in the Control
> Panel, I can add, and open a database connection.
> 
> However, when I issue the following query:
> 
> SHOW TABLES;
> 
> I receive the following set:
> 
> Tables in la_eksempel
> 
> a
> 
> (la_eksempel the name of the database, naturally)
> 
> There is no table named 'a', however there is a table named "artikkel". If
> I try to browse the database, I get a tree with 5 first-level nodes, all
> named with the first letter of a table in my database.

That's very odd, because it works for me.

> If I try "SELECT * FROM ARTIKKEL;", I get 
> 
> Error Type: TypeError
> Error Value: len() of unsized object

I don't know if this is the problem, but ZMySQLDA-2.0.1 requires
MySQLdb-0.3.0 (aka MySQL-python). These should both work with
MySQL-3.22.23, though I would recommend an upgrade to at least 3.22.32 (or
3.23.30).

-- 
andy dustman  |  programmer  |  comstar.net is part of the Globix network
telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d
"Therefore, sweet knights, if you may doubt your strength or courage, 
come no further, for death awaits you all, with nasty, big, pointy teeth!"


___
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] REQUEST object - obtaining variables from


Hi there,

Thanks for your help. I'm currently using the following code, which works perfectly;


  
  
  


Randy's response provided the following code, which didn't work nor did any variation
on it. Surprising as it 'appears' to be doing almost the same thing as above(?).



   



Cheers,

Lee

[EMAIL PROTECTED] wrote:

> On Sat, Jan 13, 2001 at 06:11:08PM +, Lee wrote:
> You have indeed overlooked something.  There are tons of things in REQUEST
> unrelated to your form.
>
> To simply display the entire request, put
> 
> in display/index_html
>
> To access the value of name1 in display/index_html,
> you can use many forms:
>
> 
>
> #may get something else if name1 is NOT in REQUEST
>
> 
>   
> 
>
> 
>   
> 

--
Lee Reilly
mailto:[EMAIL PROTECTED]

ø¤º°`°º¤øø¤º°`°º¤øø¤º°`°º¤øø¤º°`°º¤ø

HAVE SKILLS; WILL TRAVEL.

I'm currently looking for an internship in the USA
in the field of web development. Ideally, I'm looking
for a placement for 3 to 18 months. Can you help?

More details, my resume, etc. @
http://homepages.strath.ac.uk/~aeu97172/






___
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] ZClasses meet PythonScripts, sample request


Hi, Tim

I have it.
The Python Script I sent you:

container.propertysheets['job_info'].manage_changeProperties(REQUEST)

needs to be rewritten:

container.propertysheets.job_info.manage_changeProperties(REQUEST)

Perhaps someone could explain why the first does not work.

One point about your form:

You have id as a form variable.  You will be disappointed by its
behavior.

Regards,

-- Jim Washington

Timothy Wilson wrote:
> 
> Jim (or anyone else who's feeling charitable this morning),
> 
> Thanks for all your help. I really appreciate it. I wonder if you'd have
> time to look one more time at the two methods I've got that aren't
> working. I've included the actual code for my job posting product. Perhaps
> someone will find it instructive. I have a feeling that the remaining
> problem is not directly related to the processing of the form by the
> PythonScript. I also included the traceback at the end of this message.
> 
> Here are the two methods. I have a table that displays the currently
> available jobs and displays two little icons which call the edit or delete
> methods on the corresponding instance of the 'Job Posting' class. The edit
> icon links to the 'editJobForm' method which in turn calls the
> 'editFormAction' method that actually processing the change.
> 
> --
> editJobForm
> -
> 
> 
> 
> Edit a Job Board Entry
> This form allows you to make changes to current postings on the online
> job board. You don't needed to fill in every
> field on the form. Click on the "Submit Edits" button at the bottom of the
> screen to save your changes to the database.
> 
> 
> 
> Your changes have been saved
> 
> 
> 
> 
> 
> Notes
>  notes>
> 
> Job ID
> 
> 
> Organization
> 
> 
> Position
> 
> 
> Description
>  name="description:text" rows="10" cols="60" wrap="virtual"> description>
> 
> Pay Offered
> 
> 
> Line of Authority
> 
> 
> Function
>  name="function:text" rows="4" cols="60" wrap="virtual"> function>
> 
> Qualifications
>  name="qualifications:text" rows="8" cols="60" wrap="virtual"> qualifications>
> 
> 
> 
> To create a bullet list of "duties," type each one in the box below and
> press the "ENTER" key
> between each item in the list.
> 
> 
> Duties
> 
>  duties>
> 
> 
> 
>  name="duties:list" rows="10" cols="60" wrap="virtual">
> 
> 
> Offer Expires
> ">
> 
> 
> Enter the date that the job was officially posted.
> 
> Posted Date
> ">
> 
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -
> editFormAction (with REQUEST as a parameter)
> -
> 
> container.propertysheets['job_info'].manage_changeProperties(REQUEST)
> 
> The error I get is:
> 
>  Error Type: TypeError
> Error Value: sequence index must be integer
> 
> Traceback:
> 
> Traceback (innermost last):
>   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 222, in
> publish_module
>   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 187, in
> publish
>   File /var/lib/zope/2.3.0a2/lib/python/Zope/__init__.py, line 221, in
> zpublisher_exception_hook
> (Object: Traversable)
>   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 171, in
> publish
>   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/mapply.py, line 160, in
> mapply
> (Object: editJobForm)
>   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 112, in
> call_object
> (Object: editJobForm)
>   File /var/lib/zope/2.3.0a2/lib/python/OFS/DTMLMethod.py, line 189, in
> __call__
> (Object: editJobForm)
>   File /var/lib/zope/2.3.0a2/lib/python/DocumentTemplate/DT_String.py, line
> 538, in __call__
> (Object: editJobForm)
>   File /var/lib/zope/2.3.0a2/lib/python/DocumentTemplate/DT_Util.py, line
> 336, in eval
> (Object: editFormAction(REQUEST))
> (Info: REQUEST)
>   File , line 0, in ?
>   File /var/lib/zope/2.3.0a2/lib/python/Shared/DC/Scripts/Bindings.py, line
> 325, in __call__
> (Object: editFormAction)
>   File /var/lib/zope/2.3.0a2/lib/python/Shared/DC/Scripts/Bindings.py, line
> 354, in _bindAndExec
> (Object: editFormAction)
>   File
> /var/lib/zope/2.3.0a2/lib/python/Products/PythonScripts/PythonScript.py,
> line 321, in _exec
> (Object: editFormAction)
> (Info: ({'script': ,
> 'context': , 'container':  instance at 885a3e0>, 'traverse_subpath': []},
> (

form

posted'01/15/2001'
duties['asdfasdf\015\012']
position'asdfadsfasd'
valign="top" >align="left"> valign="top" >align="left"> > -- I've deleted what looks like the entire contents of REQUEST -- > > File Python Script, line 2, in editFormAction > File /var/lib/zope/2.3.0a2/lib/python/Products/PythonScripts/Guarded.py, > line 276, in __getitem__ > File /var/lib/zope/2.3.0a2/lib/python/OFS/PropertySheets.py, line 647, in > __getitem__ > (Object: Traversable) > TypeError: (see above)

[Zope] Re: mysql connection string


On Mon, 15 Jan 2001, Olaf Zanger wrote:

> first:
> right now my setup uses a connection string "db root" which doesn't seam
> to give a lot of savety :-). 
> at my provider i have a login, but sure no root access to the db. 
> * how does the connection string look for user name "peter-hauser" and
> password "test3-.2"?
> * has the user to be set up in "linux" ?
> * how is the setup made in "mysql"?
> i tried with "grant all privileges on *.* to "peter-hauser"@localhost;"
> and "set password for "peter-hauser"=password('test3-.2');"
> but wasn't successful.
> * has zope to be run by user "peter-hauser"?
> 
> second?
> to set up a 3-tier application i should know how to connect mysql
> through MySQL-python 0.3.0 and ZMySQLDA 2.0.1 to my db-server.
> 
> * i can browse from the zope server to the db-server "pit" and otherway
> round with the names "pit" and "pitechon", so "hosts" file should be
> correct. 
> 
> * how has the connection string to look like?
> i tried "db@pit 'peter-hauser'" but it didn't work?
> * has mysql to be started with an special flag to open a port?
> * does it work with the ip-number?

I thought what it printed when you created the connection would be
sufficient:

The connection string used for Z MySQL Database Connection is of the form: 

   database[@host[:port]] [user [password [unix_socket]]]

or typically: 

   database user password

to use a MySQL server on localhost via the standard UNIX socket. Only
specify host if the server is on a remote system. You can use a
non-standard port, if necessary. If the UNIX socket is in a non-standard
location, you can specify the full path to it after the password.

...so you want something like: db@pit peter-hauser test3-.2
If pit is the local host: db peter-hauser test3-.2
...will be faster and use the standard UNIX socket.

You do not necessarily need a UNIX user by that name. Your GRANT statement
looks basically correct, but check the MySQL documentation.

-- 
Andy Dustman PGP: 0xC72F3F1D
@   .net http://dustman.net/andy


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




[Zope] How to get python error output? (PIL)


Hi Zopians out there,

thanks for helping me with my last question - here is a new one ;-)

We do image-processing of traffic-video-sequences and I'd like to serve 
thumbnails use the following code (originally from some HOW-TO) as external 
method:

import os, os.path, Image

def get_image(self, imagename, thumb, REQUEST, RESPONSE):
"""
Read and return an external file with appropriate response set.

Returns the contents of the file or image.  Also, sets the
Content-Type HTTP header to the objects content type.
"""
thumbname = os.path.join('/tmp', 'thumbs', imagename)
imagename = os.path.join('/tmp', 'images', imagename)
print 'i:', imagename
print 't:', thumbname
if not os.path.exists(imagename):
return ""
if thumb == '1':
print 'inner'
if not os.path.exists(thumbname):
print 'inner2'
#img = Image.open(imagename) <-- if I remove the comment, the 
'inner2' is still printed, but the 'after open' in the next line is not printed 
in the logfile anymore
print 'after open',img, type(img),'di'
img.thumbnail((100,50))
print img.size
img.save(thumbname)
print 'later'
imagename = thumbname
fptr=open(imagename, "rb")
data=fptr.read()
size=len(data)
fptr.close()

RESPONSE.setHeader("Content-Type", "image/png")
RESPONSE.setHeader("Content-Length", size)

return data

My questions are:
- Does anybody have a clue, why the 'after open' and the next two prints are 
not printed in the log file (I thing /var/log/zope) when I uncomment the line 
above?
- If it is some error within python and/or the PIL, how do I get the error 
output out of zope (I couldn't find this in the docu yet). The strange thing 
is, the request is served, but the lines

print 'after open',img, type(img),'di'
img.thumbnail((100,50))
print img.size
img.save(thumbname)
print 'later'

seem to be simply ignored when uncommenting the "img = Image.open(..." line. 
BTW, I can execute the PIL-commands in the normal python-shell without any 
problems.

Thanks for any hint.

Tilo Schwarz

-
DaimlerChrysler AG, Research & Technology
Image Understanding FT3/AB
Dr. Tilo Schwarz
Email: [EMAIL PROTECTED]
Tel:+49-731-505-2376
Fax:+49-731-505-4105
P.O.Box 2360, 89013 Ulm, Germany

___
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] ZClasses meet PythonScripts, sample request


Jim (or anyone else who's feeling charitable this morning),

Thanks for all your help. I really appreciate it. I wonder if you'd have
time to look one more time at the two methods I've got that aren't
working. I've included the actual code for my job posting product. Perhaps
someone will find it instructive. I have a feeling that the remaining
problem is not directly related to the processing of the form by the
PythonScript. I also included the traceback at the end of this message.

Here are the two methods. I have a table that displays the currently
available jobs and displays two little icons which call the edit or delete
methods on the corresponding instance of the 'Job Posting' class. The edit
icon links to the 'editJobForm' method which in turn calls the
'editFormAction' method that actually processing the change.

--
editJobForm
-



Edit a Job Board Entry
This form allows you to make changes to current postings on the online
job board. You don't needed to fill in every 
field on the form. Click on the "Submit Edits" button at the bottom of the
screen to save your changes to the database.



Your changes have been saved





Notes


Job ID


Organization


Position


Description


Pay Offered


Line of Authority


Function


Qualifications




To create a bullet list of "duties," type each one in the box below and
press the "ENTER" key 
between each item in the list.


Duties








Offer Expires
">


Enter the date that the job was officially posted.

Posted Date
">


 












-
editFormAction (with REQUEST as a parameter)
-

container.propertysheets['job_info'].manage_changeProperties(REQUEST)


The error I get is:

 Error Type: TypeError
Error Value: sequence index must be integer

Traceback:

Traceback (innermost last):
  File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
  File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 187, in
publish
  File /var/lib/zope/2.3.0a2/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: Traversable)
  File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 171, in
publish
  File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: editJobForm)
  File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 112, in
call_object
(Object: editJobForm)
  File /var/lib/zope/2.3.0a2/lib/python/OFS/DTMLMethod.py, line 189, in
__call__
(Object: editJobForm)
  File /var/lib/zope/2.3.0a2/lib/python/DocumentTemplate/DT_String.py, line
538, in __call__
(Object: editJobForm)
  File /var/lib/zope/2.3.0a2/lib/python/DocumentTemplate/DT_Util.py, line
336, in eval
(Object: editFormAction(REQUEST))
(Info: REQUEST)
  File , line 0, in ?
  File /var/lib/zope/2.3.0a2/lib/python/Shared/DC/Scripts/Bindings.py, line
325, in __call__
(Object: editFormAction)
  File /var/lib/zope/2.3.0a2/lib/python/Shared/DC/Scripts/Bindings.py, line
354, in _bindAndExec
(Object: editFormAction)
  File
/var/lib/zope/2.3.0a2/lib/python/Products/PythonScripts/PythonScript.py,
line 321, in _exec
(Object: editFormAction)
(Info: ({'script': ,
'context': , 'container': , 'traverse_subpath': []},
(

form

posted'01/14/2001'
duties['asdfasdf\015\012']

Re: [Zope] mysql connection string


On Mon, 15 Jan 2001, Olaf Zanger wrote:
> right now my setup uses a connection string "db root" which doesn't seam
> to give a lot of savety :-).
> at my provider i have a login, but sure no root access to the db.
> * how does the connection string look for user name "peter-hauser" and
> password "test3-.2"?

   [EMAIL PROTECTED] peter-hauser test3-.2 <--\
|
> * has the user to be set up in "linux" ?  |
|
   No, only in mysql.   |
|
> * how is the setup made in "mysql"?   |
|
   GRANT select,insert,update,delete,create,alter,drop,index|
ON db.* TO [EMAIL PROTECTED] INDENTIFIED BY 'test3-.2';|
|
> * has zope to be run by user "peter-hauser"?  |
|
   No, you pass peter-hauser in the connection string >-/

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [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] Design Q: Product vs. External Methods


From: Oleg Broytmann [mailto:[EMAIL PROTECTED]]

>   I can assure it is. I run zope.net.ru in debug mode, and did debugging
>of an External Method that draw the left column. After I modified the
>source file Zope reread it, sure.

I have never had problems with that either. It autorefreshes nicely.

regards Max M

___
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] mysql connection string


hi there,

two times trouble

first:
right now my setup uses a connection string "db root" which doesn't seam
to give a lot of savety :-). 
at my provider i have a login, but sure no root access to the db. 
* how does the connection string look for user name "peter-hauser" and
password "test3-.2"?
* has the user to be set up in "linux" ?
* how is the setup made in "mysql"?
i tried with "grant all privileges on *.* to "peter-hauser"@localhost;"
and "set password for "peter-hauser"=password('test3-.2');"
but wasn't successful.
* has zope to be run by user "peter-hauser"?

second?
to set up a 3-tier application i should know how to connect mysql
through MySQL-python 0.3.0 and ZMySQLDA 2.0.1 to my db-server.

* i can browse from the zope server to the db-server "pit" and otherway
round with the names "pit" and "pitechon", so "hosts" file should be
correct. 

* how has the connection string to look like?
i tried "db@pit 'peter-hauser'" but it didn't work?
* has mysql to be started with an special flag to open a port?
* does it work with the ip-number?

thanks for help 
olaf


-- 
soli-con Engineering Zanger
Dipl.-Ing. (FH) Olaf Marc Zanger
Lorrainestrasse 23
3013 Bern / Switzerland
Fon: +41-31-332 9782
Mob: +41-76-572 9782
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
http://www.soli-con.com

begin:vcard 
n:Zanger;Olaf Marc
tel;cell:+41-76-572 9782
tel;work:+41-31-332 9782
x-mozilla-html:FALSE
url:www.soli-con.com
org:soli-con Engineering Zanger
adr:;;Lorrainestrasse 23;Bern;BE;3013;Switzerland
version:2.1
email;internet:[EMAIL PROTECTED]
title:Dipl.-Ing.
note;quoted-printable:IT-Consulting=0D=0AEmbedded Systems=0D=0AEnergy Systems=0D=0AOpen Source Solutions=0D=0A
x-mozilla-cpt:;-32176
fn:Olaf Zanger
end:vcard



Re: [Zope] Calling other frames (OT)


On Mon, Jan 15, 2001 at 12:51:01PM +0100, Oliver Bleutgen wrote:
> > I think probably Javascript is the 'cleanest' solution in this case,
> > but depending on the complexity of your UI another non-JS approach is
> > to make every link target the topmost frome (e.g., target="_top") and
> > redraw all frames in the frameset on each 'click'. This way you know
> > that all frames reflect the latest situation, but it can be annoying
> > to see the whole browser redraw every time you do anything. However,
> > if your browser doesn't *do* Javascript (so long as it does do
> > frames hmm.. how likely is that?) then it would at least work
> 
> There' s always the possibility that people disable javascript - 
> and checking for instance http://www.guninski.com/browsers.html
> I would say they have reason to do so.
> 
> My take is that one should at least provide a non-javascript alternative 
> to browse the site. This also helps with search-engines

The site I pointed to uses JavaScript to highlight your current position
in the site, by swapping images. The cross-frame js code is used to keep
the highlighting in sync with the content frame, even when using
hyperlinks that take you to a idfferent section of the site, or when you
are using your browsers history function.

When a visitor with JavaScript switched off visits the site, navigation
still works. Only the highlighting will cease to support visitors in
keeping tab on where in the site they are.

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

___
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] Design Q: Product vs. External Methods


Oleg Broytmann wrote:
> 
> On Mon, 15 Jan 2001, Chris Withers wrote:
> > > if you run zope in debug mode (./start -D) you won't have to hit 'edit" -
> > > all external methods are re-read every time you access them.
> > >
> > That hasn't been my experience, but maybe I'm mistaken :-S
> 
>I can assure it is. I run zope.net.ru in debug mode, and did debugging
> of an External Method that draw the left column. After I modified the
> source file Zope reread it, sure.

Fair enough then :-)

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] Design Q: Product vs. External Methods


On Mon, 15 Jan 2001, Chris Withers wrote:
> > if you run zope in debug mode (./start -D) you won't have to hit 'edit" -
> > all external methods are re-read every time you access them.
> >
> That hasn't been my experience, but maybe I'm mistaken :-S

   I can assure it is. I run zope.net.ru in debug mode, and did debugging
of an External Method that draw the left column. After I modified the
source file Zope reread it, sure.

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [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 )




[Zope] Re: MySQLDA and MySQL-python - patch needed?



Brian,

I finally got it working. Here's what I did:

I uninstalled all of ZMySQLDA and MySQL-python (formerly MySQLdb - this
name change didn't help any although in the big picture it probably needed
to be done) deleting any trace of it. I then followed all the directions
starting from here:

http://www.zope.org/Members/adustman/MySQLdb - This is the MySQL-python
module.

I used the version of ZMySQLDA that Andy Dustman points to here (there's
more than one floating about and I may have latched onto a
MySQL-python-incompatible one at some point):

http://www.zope.org/Members/adustman/ZMySQLDA - installing this is just of
matter of untarring in the correct Zope directory.

To install MySQL-python I followed the directions that Andy lays out in his
README.txt.  It required that I had to install the rpms mysql-devel and
python-devel which I tracked down at http://rpmfind.net for my flavor of
Linux (RedHat) and MySQL (3.22.32). Once these were installed I was able to
build it exactly as Andy stipulates.

Being a Linux/Zope newbie this seemed daunting but it was more painless
that I originally anticipated.

With these installed I was then getting the error "_mysql module not found"
(or something like that). The python of Zope was not finding the modules I
just built from my main system python. I changed my Zope start-up script
appending the PYTHONPATH variable to include the path where the module
installed to. I added these lines:

PYTHONPATH=$PYTHONPATH:/usr/lib/python1.5/site-packages
export PYTHONPATH

BINGO everything then worked.

Hope that helps.

My hunch is that there is some version incompatibilities going on between
MySQL-python and ZMySQLDA that prevent MySQL query results from returning
to Zope.

BTW, thanks to everyone that responded to my emails for help. Even though
none of them was the exact answer I needed they all supplied some missing
critical piece of the puzzle. Opensource is a cool thing, but none of it
would amount to much without lists like this to help folks out.  Keep it
coming.

-PSJ

>Hello All,
>
>I have the exact same problem.  I am running slack 7.1 and I have
>installed all of the goodies (i.e. zope, python, mysql, etc.) from
>the source code.  After finally figuring out that my /etc/ld.so.conf
>was not seeing the mysqlclient libraries i was able to compile
>MySQLdb-python modules and ZMySQLDA says that it is installed
>properly.  But I have the same issues with the SELECT queries
>returning no data (There was no data matching this test_sql query. )
>That is straight from Zope.  When I INSERT data to my columns in the
>table it works fine though.  I have verified this from the console.
>Please advise if there are any suggestions.  Thanks.
>
>Brian L Gautreau


___
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] OpenBSD 2.8 woes


Whereas I couldn't reproduce the error in a prior thread this time I 
can. On my OBSD 2.8 machine running python 1.52 -with-thread CPU load 
goes up to 99% when I try to access the management screens. There was 
a discussion on the OBSD ports list to create a 1.52 port. Did you 
check whether there is and whether that's solving the problem?

Ragnar

>Hello,
>
>
>>  > Could anybody enlighten me??? I don't know Python (yet), so the
>>  > tracebacks are not too informative for me ...
>>
>>  Are you using Python 2.0?  It's not yet compatible with Zope, though
>>  efforts are being made. Just enter "python" to find out.
>
>
>No, I'm not. At first I tried to take the version that comes
>shipped as a package with OpenBSD 2.8, which is 1.6 with tk and
>threads compiled in (at least that's what the package name
>suggests).
>When that didn't work, I pkg_deleted the package and then
>downloaded the 1.52 as noted in the Zope specs, compiled and
>installed it - it seemed to run, but Zope cr***ed out with a
>python.core after trying to access the management screen. The
>machine itself definitely is okay, techwise. The python
>compilation and installation didn't show any errors. The OpenBSD
>installation is totally virgin otherwise.
>
>I don't really know what else I could do. Right now it looks
>pretty much as if I'm going to switch to FreeBSD, my second
>favourite :-|
>Has anyone got Zope 2.2.5 running under OpenBSD 2.8??? If so, I'd
>be really curious what steps you followed to get it to work.-
>
>Cheers, Jan
>--
>Radio HUNDERT,6 Medien GmbH Berlin
>- EDV -
>[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 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] OpenBSD 2.8 woes


Seems you already found out what's wrong. Why didn't you post 
anything on the OBSD misc list so that they can fix it?

Ragnar


>Hello Jan:
>
>>I don't really know what else I could do. Right now it looks
>>pretty much as if I'm going to switch to FreeBSD, my second
>>favourite :-| Has anyone got Zope 2.2.5 running under OpenBSD 
>>2.8??? If so, I'd
>>be really curious what steps you followed to get it to work.-
>
>You will have to use FreeBSD or use OpenBSD 2.7.
>
>2.8 will not work because there is a bug in the threading library 
>included with OpenBSD 2.8. Zope triggers it when you call the 
>management screen.
>
>However, in the Zope code for the management screens there are 
>"thread-safe" calls used which are not, as far as I know, used 
>elsewhere in Zope. Maybe there is a bug in that code?
>
>But for now I believe the bug to be in OpenBSD 2.8. I have not found 
>anything to suggest that it has been fixed or looked at. None of the 
>patches released so far for 2.8 mention it.
>
>I went through this in early December.
>
>Luke
>
>
>___
>Zope maillist  -  [EMAIL PROTECTED]
>http://lists.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists - http://lists.zope.org/mailman/listinfo/zope-announce
>http://lists.zope.org/mailman/listinfo/zope-dev )


___
Zope 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] Design Q: Product vs. External Methods


Jens Vagelpohl wrote:
> 
> if you run zope in debug mode (./start -D) you won't have to hit 'edit" -
> all external methods are re-read every time you access them.
> 
> jens

That hasn't been my experience, but maybe I'm mistaken :-S

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] Design Q: Product vs. External Methods


if you run zope in debug mode (./start -D) you won't have to hit 'edit" -
all external methods are re-read every time you access them.

jens



on 1/15/01 6:04, [EMAIL PROTECTED] at
[EMAIL PROTECTED] wrote:

> I also would like to know, if it is possible to update a bunch of external
> method zope objects simultaneously, or do I have to click 'edit' on every
> single external method object after editing the corresponding python method? 


___
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] ZClasses meet PythonScripts, sample request


Hi, Tim

You do not need to mess with the Python Script bindings.  It looks like
you are trying to get URL:

www.isd197.k12.mn.us/hr/jobs/postings/1234/editJobAction(REQUEST)

Which of course does not exist.  I would change your 

assuming the DTML Method that has the form is called editJobAction. 
Don't worry about passing REQUEST there; Zope takes care of that.

-- Jim Washington

Timothy Wilson wrote:
> 
> This seems to almost work. :-)
> 
> On Sun, 14 Jan 2001, Jim Washington wrote:
> 
> > !
> >
> > !
> > !  
> > !  Your changes have been saved
> > !
> >
> > !
> >  
> >
> >  Title
> >   
> >  
> >
> >  Artist
> >
> >  
> >
> >  
> > ! 
> >  
> >  
> >  
> > !
> 
> That's quite clever. I wouldn't have thought of doing it that way.
> 
> After translating the CD example to my own ZClass, I get the following error
> after hitting "Submit Edits" on the edit form:
> 
> Zope Error
> Zope has encountered an error while publishing this resource.
>   
> Resource not found
> Sorry, the requested Zope resource does not exist.Check the URL and try
> again.
> 
> 
> and the traceback:
> 
> Traceback (innermost last):
>   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 222, in
> publish_module
>   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 187, in
> publish
>   File /var/lib/zope/2.3.0a2/lib/python/Zope/__init__.py, line 221, in
> zpublisher_exception_hook
> (Object: Traversable)
>   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/Publish.py, line 162, in
> publish
>   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/BaseRequest.py, line 369,
> in traverse
>   File /var/lib/zope/2.3.0a2/lib/python/ZPublisher/HTTPResponse.py, line
> 528, in notFoundError
> NotFound: (see above)
> 
> It looks like REQUEST isn't getting passed correctly. I've got REQUEST
> listed as a parameter for my PythonScript. I don't need to mess with
> bindings do 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] Design Q: Product vs. External Methods


[EMAIL PROTECTED] wrote:
> 
> Assume, I have a bunch of python modules / scripts, which I want to make
> accessible via zope. Is it better to use the external methods to bring the
> python modules into zope or should I make a Product out of my python modules.

Well, do the python modules contain methods or classes?
If classes, turn them into a Zope products.
IF methods, then use them as external methods.

> I also would like to know, if it is possible to update a bunch of external
> method zope objects simultaneously, or do I have to click 'edit' on every
> single external method object after editing the corresponding python method?
> This would be a bit tedious with 30 or more external methods...

Yeah, that is a pain, despite assurances that you shouldn't need to do
that :-S
probably the quickest way would just be to restart the Zope server...

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] Re-posted - How to delete users in Membership product with Persistent User Source



Hi,

Has anyone been able to use the delUserForm to delete
users added within a PersistentUserSource in the
PortalMembershipSystem object ?

I am not sure if this piece of code in delUserForm
preceding the HTML form snippet does the right job:







...

I can view the users but when I click on the form
button to delete some users, I get

I get 

Error Type: NotFound
Error Value: None

In the view I get, the user url points to
.../acl_users/userid (for example /acl_users/david)
and cannot be used to check the user object.

Thanks for any usefull answer.

Regards,
Kamon





__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.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] Calling other frames (OT)



> I think probably Javascript is the 'cleanest' solution in this case,
> but depending on the complexity of your UI another non-JS approach is
> to make every link target the topmost frome (e.g., target="_top") and
> redraw all frames in the frameset on each 'click'. This way you know
> that all frames reflect the latest situation, but it can be annoying
> to see the whole browser redraw every time you do anything. However,
> if your browser doesn't *do* Javascript (so long as it does do
> frames hmm.. how likely is that?) then it would at least work

There' s always the possibility that people disable javascript - 
and checking for instance http://www.guninski.com/browsers.html
I would say they have reason to do so.

My take is that one should at least provide a non-javascript alternative 
to browse the site. This also helps with search-engines

cheers,
oliver



___
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 returns truncated/corrupted data?



I am running Zope from the CVS (from January 14th), MySQL 3.22.23 and
ZMySQLDA v2.0.1.

The install appears to be successfull, the Products appear in the Control
Panel, I can add, and open a database connection.

However, when I issue the following query:

SHOW TABLES;

I receive the following set:

Tables in la_eksempel

a

(la_eksempel the name of the database, naturally)

There is no table named 'a', however there is a table named "artikkel". If
I try to browse the database, I get a tree with 5 first-level nodes, all
named with the first letter of a table in my database.

If I try "SELECT * FROM ARTIKKEL;", I get 

Error Type: TypeError
Error Value: len() of unsized object

With the following traceback:


Traceback (innermost last):
  File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/Publish.py, line
222, in publish_module
  File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/Publish.py, line
187, in publish
  File /home/ahj/polar/zope/Zope2/lib/python/Zope/__init__.py, line 221,
in zpublisher_exception_hook
(Object: RoleManager)
  File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/Publish.py, line
171, in publish
  File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/mapply.py, line
160, in mapply
(Object: manage_test)
  File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/Publish.py, line
112, in call_object
(Object: manage_test)
  File /home/ahj/polar/zope/Zope2/lib/python/Shared/DC/ZRDB/Connection.py,
line 204, in manage_test
(Object: RoleManager)
  File
/home/ahj/polar/zope/Zope2/lib/python/DocumentTemplate/DT_String.py, line
538, in __call__
(Object: )
  File /home/ahj/polar/zope/Zope2/lib/python/DocumentTemplate/DT_In.py,
line 605, in renderwb
(Object: db)
  File /home/ahj/polar/zope/Zope2/lib/python/Shared/DC/ZRDB/Results.py,
line 174, in __getitem__
TypeError: (see above)



Has anybody else experienced this?



___
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] OpenBSD 2.8 woes


Hello Jan:

> I don't really know what else I could do. Right now it looks
> pretty much as if I'm going to switch to FreeBSD, my second
> favourite :-| 
> Has anyone got Zope 2.2.5 running under OpenBSD 2.8??? If so, I'd
> be really curious what steps you followed to get it to work.-

You will have to use FreeBSD or use OpenBSD 2.7.

2.8 will not work because there is a bug in the threading library 
included with OpenBSD 2.8. Zope triggers it when you call the management 
screen.

However, in the Zope code for the management screens there are 
"thread-safe" calls used which are not, as far as I know, used elsewhere 
in Zope. Maybe there is a bug in that code?

But for now I believe the bug to be in OpenBSD 2.8. I have not found 
anything to suggest that it has been fixed or looked at. None of the 
patches released so far for 2.8 mention it.

I went through this in early December.

Luke


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




[Zope] Design Q: Product vs. External Methods


Hi Zope-Experts,

one question concerning design using zope:

Assume, I have a bunch of python modules / scripts, which I want to make 
accessible via zope. Is it better to use the external methods to bring the 
python modules into zope or should I make a Product out of my python modules.

I also would like to know, if it is possible to update a bunch of external 
method zope objects simultaneously, or do I have to click 'edit' on every 
single external method object after editing the corresponding python method? 
This would be a bit tedious with 30 or more external methods...

Thanks a lot for any hints!

Tilo

___
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: ZMySQLDA and aggregate functions on Win


Thank you Dave for your answer. But what do you mean by you don't expect a SELECT 
returning a number to work?
The error you got clearly is a mysql syntax error: If I have a table 'shop' and make a 
SELECT on 'show' I really wouldn't expect that to work ;-)
But I don't get any mysql error, I get a python error.

Let me repeat my problem and try to be a little bit more precise (I use your example):

SELECT COUNT(*) FROM show GROUP BY article;

works from the mysql command line, works from within Zope on linux, but breaks from 
within zope on windows. SELECT COUNT(*) FROM show; works from within Zope on windows, 
too.

So the problem is to have a SELECT with COUNT() and GROUP BY-clause from within Zope 
on Windows. Since it works on the mysql command line, it is definitely not an SQL 
error.

I use Zope 2.2.4, mysql 3.23gamma, ZMySQLDA 1.1.3 and the libmySQL.dll linked from the 
HowTo explaining the installation of ZMySQLDA on Win32.

The error I get is of type 'KeyError' with value 'unhandeld' and occurs on line 191 of 
ZMySQLDA's db.py. This and the next lines read as follows:

for d in desc:
item={'name': d[0],
  'type': defs[d[2]],
  'width': d[3],
   }
func(item)

where 'desc' is the fieldlist of the result set returnded by the query and 'defs' is 
some kind of type-mapping defined at the top of db.py, that I don't really understand:

defs={
"short": "i", "long": "i", "char": "s", "double": "n", "decimal": "n",
"float": "n", "tiny blob": "t", "medium blob": "t", "long blob": "t",
"blob": "t", "date": "d", "time": "s", "datetime": "d",
"timestamp": "d", "varchar": "t", "string": "t",
}

The following little ugly hack makes my query work:

for d in desc:
try:
item={'name': d[0],
  'type': defs[d[2]],
  'width': d[3],
   }
func(item)
except KeyError:
item={'name': d[0],
  'type': 'i',
  'width': d[3],
   }
func(item)

So it seems to me that COUNT returns some field-type unknown to 'defs'. (What still 
confuses me is, that this only happens in combination with a GROUP BY-clause.)

I wonder what's the value of d[2] for the COUNT()-column, but since I am quite new to 
python and Zope I still don't know how to debug.

I also wonder if anybody running Zope with mysql on windows can reproduce this error. 
Or maybe someone with a good knowledge of ZMySQLDA and the python mysql-module has 
some hint?

Sorry that this message got so long ...

Markus Kemmerling

> This is curious to me - I tried this on my Linux platform from 
> mysql and it
> doesn't work.
> Perhaps I misunderstand what you are trying to do:
> 
> SELECT COUNT(*) FROM mytable - returns a number - so I really don't expect
> it to work.
> 
> I have a table - shop and a column in that table - article:
> 
> mysql> select count(*) from show group by article;
> ERROR 1064: You have an error in your SQL syntax near 'show group by
> article' at line 1
> 
> Sorry if I misunderstand what you are trying to do -
> 
> =
> Dave Woolston   [EMAIL PROTECTED]
> Digital Creations  www.digicool.com
> (716) 262-4715
> 
> 
> > I have a problem with ZMySQLDA and aggregate functions in 
> combination with
> > grouping on Windows.
> > When I say:
> >   SELECT COUNT(*) FROM mytable GROUP BY myfield;
> > I get an KeyError 'Unhandeld'.
> >
> >SELECT COUNT(*) FROM mytable;
> > works fine, so does
> >   SELECT myfield FROM mytable GROUP BY myfield;
> > but not the combination of both.
> > Also on a linux machine the error doesn't occur. Of course I tested the
> > queries from the mysql command line.
> >
> > Any help?
> >
> > Markus Kemmerling
> 
> 


___
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 other frames



I think probably Javascript is the 'cleanest' solution in this case,
but depending on the complexity of your UI another non-JS approach is
to make every link target the topmost frome (e.g., target="_top") and
redraw all frames in the frameset on each 'click'. This way you know
that all frames reflect the latest situation, but it can be annoying
to see the whole browser redraw every time you do anything. However, 
if your browser doesn't *do* Javascript (so long as it does do
frames hmm.. how likely is that?) then it would at least work 

-steve

> "Martijn" == Martijn Pieters <[EMAIL PROTECTED]> writes:

Martijn> On Sun, Jan 14, 2001 at 11:16:44PM -0800, Dirksen wrote:
>> First of all, I don't think you can achieve that with
>> javascript. As far as I know, neither IE nor Netscape allows
>> javascript to access DOM objects of other frame page for
>> security reasons.

Martijn> This restriction only applies when the two frames come
Martijn> from different domains. Alll URLs from the same webserver
Martijn> can access DOM trees in other frames from the same
Martijn> server. This is how Zope updates the left-hand tree in
Martijn> the management interface when you add a Folder, for
Martijn> instance.

Martijn> For an example of updating navigation buttons across
Martijn> frames see http://www.tunix.nl/'. Ignore the Dutch, just
Martijn> choose an option on the main page, then use the top and
Martijn> left navigation buttons to go around a website.  Then use
Martijn> your browser's back and forward buttons to see the left
Martijn> and top menus follow the current page. Also, when
Martijn> clicking on a link in the content pane, the navigation
Martijn> menus will update. All JavaScript source comments are in
Martijn> english, that's they way I worked.

Martijn> -- Martijn Pieters | Software Engineer
Martijn> mailto:[EMAIL PROTECTED] | Digital Creations
Martijn> http://www.digicool.com/ | Creators of Zope
Martijn> http://www.zope.org/
Martijn> -

Martijn> ___ Zope
Martijn> maillist - [EMAIL PROTECTED]
Martijn> http://lists.zope.org/mailman/listinfo/zope ** No cross
Martijn> posts or HTML encoding!  ** (Related lists -
Martijn> http://lists.zope.org/mailman/listinfo/zope-announce
Martijn> 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] OpenBSD 2.8 woes


Hello,


> > Could anybody enlighten me??? I don't know Python (yet), so the
> > tracebacks are not too informative for me ...
> 
> Are you using Python 2.0?  It's not yet compatible with Zope, though
> efforts are being made. Just enter "python" to find out.


No, I'm not. At first I tried to take the version that comes
shipped as a package with OpenBSD 2.8, which is 1.6 with tk and
threads compiled in (at least that's what the package name
suggests). 
When that didn't work, I pkg_deleted the package and then
downloaded the 1.52 as noted in the Zope specs, compiled and
installed it - it seemed to run, but Zope cr***ed out with a
python.core after trying to access the management screen. The
machine itself definitely is okay, techwise. The python
compilation and installation didn't show any errors. The OpenBSD
installation is totally virgin otherwise. 

I don't really know what else I could do. Right now it looks
pretty much as if I'm going to switch to FreeBSD, my second
favourite :-| 
Has anyone got Zope 2.2.5 running under OpenBSD 2.8??? If so, I'd
be really curious what steps you followed to get it to work.-

Cheers, Jan 
-- 
Radio HUNDERT,6 Medien GmbH Berlin
- EDV -
[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] How do I authenticate through pcgi and win2000 ????


I have installed zope on port 8080 on a win 2K machine.

It runs nicely, but due to firewalls and other reasons it has to run on port
80. So I have added zope.pcgi etc. to the IIS. And it runs nicely.

But when I try to use a manage page I cannot log in without being a member
of the win2K domain, and that is not feasible in this case. I have tried all
setting, I think.

Is there any way to do it?

Should I make my own authentication page so users can log on through a form?
If so how is this done?

Regards Max M

___
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] hasRole bug or feature in 2.2.?


Chris McDonough wrote:
> 
> I'll trust that you're right, Dieter, because reading the traversal
> machinery code makes my head hurt.  :-)

Likewise... I'm sure that's not a good thing ;-)

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] Calling other frames


On Sun, Jan 14, 2001 at 11:16:44PM -0800, Dirksen wrote:
> First of all, I don't think you can achieve that with javascript. As far as I know,
> neither IE nor Netscape allows javascript to access DOM objects of other frame page 
>for
> security reasons.

This restriction only applies when the two frames come from different
domains. Alll URLs from the same webserver can access DOM trees in other
frames from the same server. This is how Zope updates the left-hand tree
in the management interface when you add a Folder, for instance.

For an example of updating navigation buttons across frames see
http://www.tunix.nl/'. Ignore the Dutch, just choose an option on the main
page, then use the top and left navigation buttons to go around a website.
Then use your browser's back and forward buttons to see the left and top
menus follow the current page. Also, when clicking on a link in the
content pane, the navigation menus will update. All JavaScript source
comments are in english, that's they way I worked.

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

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




posted'01/14/2001'
duties['asdfasdf\015\012']