Re: [Zope] Problems with mysql and sql methode

2000-10-22 Thread Richard Moon

MySQL is case-sensitive over table names, so MERCHANTPAYMENT is not the 
same as merchantpayment.

Other databases (Postgresql, Informix) are not.

Perhaps the Access/ODBC interface hides the case-sensitivity while the 
direct ZMySQLDA does not ?

Richard

At 21:52 20/10/00, you wrote:
Ok know I get this problem
Error, _mysql.OperationalError: (1109, "Unknown table 'MERCHANTPAYMENT' in
where clause")


SQL used:

select PYNAME, PYPRICE
from PAYMENT
where MERCHANTPAYMENT.MEID = '418' and MERCHANTPAYMENT.PYID = PYID

other ideas?

Thanks

Jens Grewen

- Original Message -
From: "Farrell, Troy" [EMAIL PROTECTED]
To: "'Jens Grewen'" [EMAIL PROTECTED]; "Zope Maillist" [EMAIL PROTECTED]
Sent: Friday, October 20, 2000 10:04 PM
Subject: RE: [Zope] Problems with mysql and sql methode


  You may try:
 
  SELECT pyname, pyprice
  FROM payment
  WHERE merchantpayment.meid = 418 AND merchantpayment.pyid = payment.pyid
 
  I have a feeling mysql is not liking you for not selecting results from
  table MERCHANTPAYMENT becuase you said you would.
 
  Troy
 
  -Original Message-
  From: Jens Grewen [mailto:[EMAIL PROTECTED]]
  Sent: Friday, October 20, 2000 11:04 AM
  To: Zope Maillist
  Subject: [Zope] Problems with mysql and sql methode
 
 
  Hi,
 
  I have a problem with an SQL Methode with the this sql statement
 
  select PAYMENT.PYNAME, PAYMENT.PYPRICE
  from MERCHANTPAYMENT, PAYMENT
  where MERCHANTPAYMENT.MEID = 418 and MERCHANTPAYMENT.PYID = PAYMENT.PYID
 
  on the following tables:
 
 
  MERCHANTPAYMENT
  -
  MPID int(30)
  MEID int(30)
  PYID int(30)
  -
 
  PAYMENT
  -
  PYID int(30)
  PYNAME varchar(50)
  PYPRICE varchar(50)
  -
 
  the statement runs under MS ACCESS (link over myODBC) and I get the
correct
  resut but under zope sql methode I get no result. (There was no data
  matching)
 
  Any ideas
 
  Jens Grewen
 
 
  ___
  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 )


Richard Moon
[EMAIL PROTECTED]



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




[Zope] Sendmail examples

2000-10-22 Thread steve smith

Anyone have any good, real-world examples using DTML-Sendmail tags? Would
especially appreciate examples integrating SQL queries.

Ta!

Steve


___
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] date off by one day per year cummulative

2000-10-22 Thread Jonathan Cheyne


Hi all, Zope 2.2.0, displaying a date property from a zclass has been out
by one day for a while, trick was just to +1 to the dtml. THought this
was fine til dates into 2001 needed to go on and hey, they become one
day too far now ... so now I need to add code to determine the year before
adding or not. 

Not good. Quite grim, actually.

It only happens when you use the fmt="xyz" to reformat the dates into
UK dd/mm/yy (from the default yy/mm/dd).

Should I just work around for now, or is this likely to remain like this
for a while. If so then zope gets mildly unusable outside the USA.

cheers

Jonathan



___
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] Sendmail examples

2000-10-22 Thread J. Atwood

Hey Steve,

Don't have any examples with SQL (although, in theory it is just a 
call to some data and is treated the same as any other data) but take 
a look at this.

http://www.zope.org/Members/BwanaZulia/tell_a_friend/

Cheers,
J

At 10:01 PM +1000 1/22/2001, steve smith wrote:
Anyone have any good, real-world examples using DTML-Sendmail tags? Would
especially appreciate examples integrating SQL queries.

Ta!

Steve


___
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] Help needed with news articles

2000-10-22 Thread Bak @ kedai

try kmnetnews from zope.org/Products
or
you can use dtml document to construct a simple news item.
untested code by newbie
dtml-in "objectItems(['DTML Document'])" size=4 reverse
sort=bobobase_modification_time
dtml-var title(and other stuff/properties)
/dtml-in
/untested

the above code should be in a DTML Method

-Original Message-
From: Taco Scargo [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Sunday, October 22, 2000 5:23 AM
Subject: [Zope] Help needed with news articles


Unfortunately nobody responded, so I am reposting this question again. I
just need a link to an example or explanation.

Basically I want to create a page listing the last 4 articles from a Zope
folder. The articles need a publish from/to field, title and (dtml) text. I
somehow need to be able to find and display the article from another dtml
document. I read many FAQs and tried working with zcatalogs, but somehow I
am not getting there. It is probably not so difficult. If there is somebody
how can help me or give me a link to a clear explanation or example I would
be very very grateful. Thanks !

Taco


___
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] date off by one day per year cummulative

2000-10-22 Thread Chris McDonough

Jonathan,

Would you be kind enough to put this bug into the collector on Zope.org?

- Original Message -
From: "Jonathan Cheyne" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, October 22, 2000 10:02 AM
Subject: [Zope] date off by one day per year cummulative



 Hi all, Zope 2.2.0, displaying a date property from a zclass has been out
 by one day for a while, trick was just to +1 to the dtml. THought this
 was fine til dates into 2001 needed to go on and hey, they become one
 day too far now ... so now I need to add code to determine the year before
 adding or not.

 Not good. Quite grim, actually.

 It only happens when you use the fmt="xyz" to reformat the dates into
 UK dd/mm/yy (from the default yy/mm/dd).

 Should I just work around for now, or is this likely to remain like this
 for a while. If so then zope gets mildly unusable outside the USA.

 cheers

 Jonathan



 ___
 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] Help creating Object

2000-10-22 Thread Salvatore DIDIO

Hello,

In the manage folder I can't create any object.
I got a message telling that the object can not be owned by the
superuser.
(line 217 in file Owned.py).
Can someone help me ?

Thanks


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




[Zope] Multiple queries in a ZSQL method?

2000-10-22 Thread Noah

Hi, 

I'm using MySQL.  I need to have a ZSQL Method that does an insert and a select in one 
call.
After I do an insert I need to check the LAST_INSERT_ID to get the primary key of the 
record that I just inserted. Something like this:

insert into author
(id, name, sort_name, email, bio, initials)
values
(null,
dtml-sqlvar name type=nb,
dtml-sqlvar sort_name type=nb,
dtml-sqlvar email type=nb,
dtml-sqlvar bio type=nb,
dtml-sqlvar initials type=nb);

select LAST_INSERT_ID();

If I put this into two different methods then I'm afraid that I will have some
threading problems due to the fact that another client might come in and
do an insert using the database connection I was using. LAST_INSERT_ID
is safe as long as you have an unshared connection. Zope does
connection pooling, so I worry that using two separate ZSQL Methods
may not always work. And WILL NOT work if Zope gives me a different connection
for the second ZSQL call.

Is there a better way to do this?

Yours,
Noah






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




[Zope] Creating Object

2000-10-22 Thread Salvatore DIDIO

Hello,

I am new to Zope
I've just installed Zope on Linux. I just can't create any object !.
I receive the following message :
the object can not be owned by the superuser
(line 217 in file Owned.py)
Could someone help me ?

Thank you very much



___
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] Multiple queries in a ZSQL method?

2000-10-22 Thread Ender

multiple non-select statements (max 1 select) are done through the use
of

dtml-var sql_delimiter

kapil

Noah wrote:
 
 Hi,
 
 I'm using MySQL.  I need to have a ZSQL Method that does an insert and a select in 
one call.
 After I do an insert I need to check the LAST_INSERT_ID to get the primary key of the
 record that I just inserted. Something like this:
 
 insert into author
 (id, name, sort_name, email, bio, initials)
 values
 (null,
 dtml-sqlvar name type=nb,
 dtml-sqlvar sort_name type=nb,
 dtml-sqlvar email type=nb,
 dtml-sqlvar bio type=nb,
 dtml-sqlvar initials type=nb);
 
 select LAST_INSERT_ID();
 
 If I put this into two different methods then I'm afraid that I will have some
 threading problems due to the fact that another client might come in and
 do an insert using the database connection I was using. LAST_INSERT_ID
 is safe as long as you have an unshared connection. Zope does
 connection pooling, so I worry that using two separate ZSQL Methods
 may not always work. And WILL NOT work if Zope gives me a different connection
 for the second ZSQL call.
 
 Is there a better way to do this?
 
 Yours,
 Noah
 
 ___
 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] Creating Object

2000-10-22 Thread Ender

Salvatore DIDIO wrote:
 
 Hello,
 
 I am new to Zope
 I've just installed Zope on Linux. I just can't create any object !.
 I receive the following message :
 the object can not be owned by the superuser
 (line 217 in file Owned.py)
 Could someone help me ?
 
 Thank you very much

i feel for you, in zope 2.2 and above the initial account, the
superuser, isn't allowed to create/own objects. 

what you're supposed to do is create a new user in the acl_users of the
root directory which will be your first working account.

after you create a user in acl_users, logout by shutting down the
browser and than try logging into the system with a new browser.

you can escape shutting down the browser by editing one of the existing
methods to have this section of code. when asked to reauthenticate type
in the name of the new user. than click cancel and reload the /manage
page, you should be able to login as the new user.

dtml-raise Unauthorized
Log out
/dtml-raise

Cheers 

Kapil

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




Re: [Zope] Creating Object

2000-10-22 Thread Phil Harris

Sal,

You need to create a normal user with a role of 'Manager'.

This will allow you to create things to your hearts wotsit.

In the Zope management screen, click on acl_users and follow the
instructions.

Just one thing, make sure you select Manager from the list of roles, the
list is just the possibles.

hth

Phil
- Original Message -
From: "Salvatore DIDIO" [EMAIL PROTECTED]
To: "Zope" [EMAIL PROTECTED]
Sent: Sunday, October 22, 2000 9:41 PM
Subject: [Zope] Creating Object


| Hello,
|
| I am new to Zope
| I've just installed Zope on Linux. I just can't create any object !.
| I receive the following message :
| the object can not be owned by the superuser
| (line 217 in file Owned.py)
| Could someone help me ?
|
| Thank you very much
|
|
|
| ___
| 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] Creating Object

2000-10-22 Thread J. Atwood

You can't create an object as superuser.

Create another user in acl_users with 'manager' group and log in as 
them (you will probably have to reboot your browser).

J

At 10:41 PM +0200 10/22/2000, Salvatore DIDIO wrote:
Hello,

I am new to Zope
I've just installed Zope on Linux. I just can't create any object !.
I receive the following message :
 the object can not be owned by the superuser
(line 217 in file Owned.py)
Could someone help me ?

Thank you very much



___
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] Creating Object

2000-10-22 Thread Mark N. Gibson

You're logged into the zope management interface as superuser.  

To change this, create a user in the root acl_users folder, giving it a
username and password, and the manager and owner roles.

Now restart your browser, go to the management interface, and log in as
the user you just created.  You should be able to create objects.

Mark


 
 Hello,
 
 I am new to Zope
 I've just installed Zope on Linux. I just can't create any object !.
 I receive the following message :
 the object can not be owned by the superuser
 (line 217 in file Owned.py)
 Could someone help me ?
 
 Thank you very much
 
 
 
 ___
 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] Roxen Zope, not working

2000-10-22 Thread Bill Anderson

Adrian Madrid wrote:
 
 I'm having problems running Zope on top of Roxen on a Win2k machine.
 They both run just fine separate but I can't make it work together. I
 followed the instructions from
 http://www.zope.org/Members/magnus/Roxen but I never got it to see the
 first page. Here are the tracebacks I get:
 
 * This is what I get when I try mysite.com:


snip

These are all Roxen tracebacks, try their lists for details (good luck).

Bill
(I run many sites just fine with Roxen/Zope, but that's on Linux)

--
E PLURIBUS LINUX


___
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] IIS and Zope share same problem :-S

2000-10-22 Thread Bill Anderson

Chris Withers wrote:
 
 Andrew Kenneth Milton wrote:
 
  |
  | http://www.zope.org/standard_html_header for example ;-)
 
  Not that old chestnut again...
 
 Yes, that old chestnut again. If it's considered a serious security flaw
 by Microsoft, maybe the Zope community should finally do something to
 solve it.
 
 ...and yes, there are discussions about this on Zope-dev right now,
 which will hopefully produce a solution :-)
 
 cheers,


As soon as you can tell us how to get Zope to go executing _files_ on
the server (read, in the filesystem), as opposed to objects in the
site I might accept it as the same bug.  :^)=

Then-again,-I-might-_use_-that-capability-if-I-could-ly y'rs Bill

--
E PLURIBUS LINUX


___
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] Problems with sequence-item

2000-10-22 Thread Taco Scargo

I get errors when sequence-item is being called to list the contents of a
folder

E.g.
dtml-in "(1,2,3)" reverse
dtml-var sequence-item
/dtml-in

correctly outputs 3 2 1

When I do

dtml-in "folder.objectValues()"
dtml-var id
/dtml-in

it correctly outputs all ids in the folder.

But

dtml-in "folder.objectValues()"
dtml-var sequence-item
/dtml-in

will fail with an error
Error Type: AttributeError
Error Value: __call__

What am I doing wrong ?

Thanks,

Taco Scargo





   1stUp.com - Free the Web
   Get your free Internet access at http://www.1stUp.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] IIS and Zope share same problem :-S

2000-10-22 Thread Curtis Maloney

On Fri, 20 Oct 2000, Chris Withers wrote:
 Andrew Kenneth Milton wrote:
  | http://www.zope.org/standard_html_header for example ;-)
 
  Not that old chestnut again...

 Yes, that old chestnut again. If it's considered a serious security flaw
 by Microsoft, maybe the Zope community should finally do something to
 solve it.

 ...and yes, there are discussions about this on Zope-dev right now,
 wwhich will hopefully produce a solution :-)


Now, I may be missing the point of the fine grained access control of ZOPE, 
but knowing an objects ID is not at all the same as being able to access it, 
or even invoke it correctly.

The MS bug "allows access to any file on the webserver".  Whilst in ZOPE you 
may be able to enter the URL and invoke the object to some degree, unless you 
have the permissions to do whatever it does, what harm can you do? 

To me, this seems like more of a "patch by sensible admin" problem than a 
security hole.

 cheers,

 Chris


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 )




Re: [Zope] Problems with sequence-item

2000-10-22 Thread Curtis Maloney

On Mon, 23 Oct 2000, Taco Scargo wrote:
 I get errors when sequence-item is being called to list the contents of a
 folder

 E.g.
 dtml-in "(1,2,3)" reverse
 dtml-var sequence-item
 /dtml-in

 correctly outputs 3 2 1

 When I do

 dtml-in "folder.objectValues()"
 dtml-var id
 /dtml-in

 it correctly outputs all ids in the folder.

 But

 dtml-in "folder.objectValues()"
 dtml-var sequence-item
 /dtml-in

 will fail with an error
 Error Type: AttributeError
 Error Value: __call__

 What am I doing wrong ?


Your problem appears to be in the using of objectValues().  This returns the 
actual objects.  So, in the second loop (dtml-var id)  you are referencing 
the 'id' member of each object.  Nothing wrong there.

However, in the third loop (dtml-var sequence-item) you are trying to 
render the object itself.  This will 'call' each object, which some of them 
(obviously) object to. (No pun intended)

If you want to render all the DTML Documents and DTML Methods in the folder , 
try something like:

dtml-in "folder.objectValues(['DTML Document', 'DTML Method'])"
  dtml-var sequence-item
/dtml-in

but this could get very messy with a large folder. (o8

 Thanks,

 Taco Scargo


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 )




Re: [Zope] Problems with sequence-item

2000-10-22 Thread Mark N. Gibson

 
 I get errors when sequence-item is being called to list the contents of a
 folder
 
 E.g.
 dtml-in "(1,2,3)" reverse
 dtml-var sequence-item
 /dtml-in
 
 correctly outputs 3 2 1
 
 When I do
 
 dtml-in "folder.objectValues()"
 dtml-var id
 /dtml-in
 
 it correctly outputs all ids in the folder.
 
 But
 
 dtml-in "folder.objectValues()"
 dtml-var sequence-item
 /dtml-in
 
 will fail with an error
 Error Type: AttributeError
 Error Value: __call__
 
 What am I doing wrong ?
 

In this example, dtml-var sequence-item is actually trying to call the items
in the folder.  In this case, at least one of the items is not callable ( like 
another folder).  If you did something like this:

dtml-in "folder.objectValues('DTML Method')"
dtml-var sequence-item
/dtml-in

You would see the results of 'viewing' or calling every DTML Method in folder.

Mark

 Thanks,
 
 Taco Scargo
 
 
 
 
 
1stUp.com - Free the Web
Get your free Internet access at http://www.1stUp.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 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] Problems with sequence-item

2000-10-22 Thread Taco Scargo

Had already tried that, but it doesn't work.
I have 8 DTML Documents in a folder called artikelen.

dtml-in "artikelen.objectValues('DTML Document')"
dtml-var sequence-item
/dtml-in

Fails with the error:
Error Type: AttributeError
Error Value: __call__

I am really clueless

Thanks,

Taco
- Original Message -
From: "Mark N. Gibson" [EMAIL PROTECTED]
To: "Taco Scargo" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, October 22, 2000 3:52 PM
Subject: Re: [Zope] Problems with sequence-item
 In this example, dtml-var sequence-item is actually trying to call the
items
 in the folder.  In this case, at least one of the items is not callable
 like
 another folder).  If you did something like this:

 dtml-in "folder.objectValues('DTML Method')"
 dtml-var sequence-item
 /dtml-in

 You would see the results of 'viewing' or calling every DTML Method in
folder.

 Mark


___
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] Problems with sequence-item

2000-10-22 Thread Curtis Maloney

On Mon, 23 Oct 2000, Taco Scargo wrote:
 Had already tried that, but it doesn't work.
 I have 8 DTML Documents in a folder called artikelen.

 dtml-in "artikelen.objectValues('DTML Document')"
 dtml-var sequence-item
 /dtml-in

 Fails with the error:
 Error Type: AttributeError
 Error Value: __call__

 I am really clueless


Any chance you could post the WHOLE traceback, so we might be able to see 
which object it's choking on?

 Thanks,

 Taco

Curtis.

___
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] Problems with sequence-item

2000-10-22 Thread Taco Scargo

Please feel free to look at it at

http://www.gezondheidskrant.nl:8080/mainframe

Taco
- Original Message -
From: "Curtis Maloney" [EMAIL PROTECTED]
To: "Taco Scargo" [EMAIL PROTECTED]; "Mark N. Gibson" [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Sunday, October 22, 2000 6:57 PM
Subject: Re: [Zope] Problems with sequence-item
 Any chance you could post the WHOLE traceback, so we might be able to see
 which object it's choking on?


___
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] Problems with sequence-item

2000-10-22 Thread Ender

I thought at first this might be a permission problem, but after
browsing around the site. i'm pretty sure its a calling issue. its hard
to say for sure given the lack of details.

Taco, i'm pretty sure your objectValues on the addressen folder to fill
in to fill in the addresses of the artiklen document. zope renders these
subtemplates slightly differently than a template called directly by the
browser, when you're calling the addressen subobject from the document
call it like this

dtml-var "addressen.YOURADDRESS(_.None, _)"

or in a dtml-in

dtml-let x=sequence-item
dtml-var "x(_.None,_)"
/dtml-let


if that doesn't solve it for you, than it would be helpful to have the
relevant src of the document. i tried without success to duplicate the
exact same error, but i'm pretty sure that the problem has something to
do with this.


Kapil



Taco Scargo wrote:
 
 Please feel free to look at it at
 
 http://www.gezondheidskrant.nl:8080/mainframe
 
 Taco
 - Original Message -
 From: "Curtis Maloney" [EMAIL PROTECTED]
 To: "Taco Scargo" [EMAIL PROTECTED]; "Mark N. Gibson" [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Sunday, October 22, 2000 6:57 PM
 Subject: Re: [Zope] Problems with sequence-item
  Any chance you could post the WHOLE traceback, so we might be able to see
  which object it's choking on?
 
 ___
 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] HELP! Permissions problem, ZClass

2000-10-22 Thread Ender

trying giving anonymous proxy roles on the actual add method.



Eric Walstad wrote:
 
 Help, pls! I have a ZClass that is functioning beautifully if I am logged
 in, but the anonymous user keeps getting prompted for a password.  The
 problem occurs when my DTML method trys to  create a new instance of the
 ZClass.  I tried giving that DTML method a Proxy of "Manager" but that isn't
 helping.
 
 Any pointers?
 
 Thanks,
 
 Eric.
 
 Here's the traceback:
 Zope Error
 
  Zope has encountered an error while publishing this resource.
 
  Unauthorized
 
  You are not authorized to access CNewsItem.
 
  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/ZPublisher/Publish.py, line
 171, in publish
File /usr/local/Zope/lib/python/ZPublisher/mapply.py, line
 160, in mapply
  (Object: buildNews)
File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line
 112, in call_object
  (Object: buildNews)
File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 172,
 in __call__
  (Object: buildNews)
File
 /usr/local/Zope/lib/python/DocumentTemplate/DT_String.py, line 528, in
 __call__
  (Object: buildNews)
File /usr/local/Zope/lib/python/DocumentTemplate/DT_With.py,
 line 146, in render
  (Object: manage_addProduct['NewsItem'])
File /usr/local/Zope/lib/python/DocumentTemplate/DT_Util.py,
 line 337, in eval
  (Object: CNewsItem_add(_.None, _, NoRedir=1))
  (Info: _)
File string, line 0, in ?
File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 168,
 in __call__
  (Object: CNewsItem_add)
File
 /usr/local/Zope/lib/python/DocumentTemplate/DT_String.py, line 528, in
 __call__
  (Object: CNewsItem_add)
File /usr/local/Zope/lib/python/DocumentTemplate/DT_With.py,
 line 133, in render
  (Object: CNewsItem.createInObjectManager(REQUEST['id'],
 REQUEST))
File /usr/local/Zope/lib/python/DocumentTemplate/DT_Util.py,
 line 331, in eval
  (Object: CNewsItem.createInObjectManager(REQUEST['id'],
 REQUEST))
  (Info: CNewsItem)
File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 194,
 in validate
  (Object: buildNews)
File
 /usr/local/Zope/lib/python/AccessControl/SecurityManager.py, line 139, in
 validate
File
 /usr/local/Zope/lib/python/AccessControl/ZopeSecurityPolicy.py, line 209, in
 validate
  Unauthorized: (see above)
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

___
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-dev] Using the Zope debugger (authenticating)

2000-10-22 Thread Morten W. Petersen

How do I authenticate myself when using the Zope debugger?
(I've seen this before I think, but I couldn't find it)

Thanks.

-Morten

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




Re: [Zope-dev] Excluding meta_types

2000-10-22 Thread Ender



you can redefine the meta_types tuple like so
meta_types=({'name':'MessageFilter',
'action':'manage_addMessageFilter'},)

btw how is GUM going?

kapil


"Morten W. Petersen" wrote:
 
 When I'm building a class which inherits from the OFS.Folder.Folder, how
 do I exlude the meta_types it brings with it (if it's there they come
 from).
 
 In other words, if I have a class, with meta_type 'MessageFilterFolder',
 which should only be able to contain instances of meta_type 'MessageFilter',
 what do I do (i.e. exlude all the other meta_types)?
 
 Thanks in advance.
 
 -Morten
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )

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




Re: [Zope-dev] Excluding meta_types

2000-10-22 Thread Morten W. Petersen

[[EMAIL PROTECTED]]

| btw how is GUM going?

It's ZopeGUM now.. =)

It's coming along; I'm planning on releasing a stable version of it available
within a week.

(CVS will be available soon from SourceForge).

-Morten

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




Re: [Zope-dev] Problems with offline MS IE 5

2000-10-22 Thread Ross Boylan

Applying W2K SP1 seemed to fix up this problem.  However, the original 
problem may not have occurred instantly, so perhaps it takes a bit more to 
bring it out.

At any rate, I also upgraded to IE 5.5, so I hope that will be the end of 
the bad caching behavior.

Thanks, Jens, for your response.

At 11:09 PM 10/19/2000, Ross Boylan wrote:
I recently tried doing some Zope development on a laptop and ran into a 
problem: when I updated a product the updates did not "take."  In 
particular, when I edited the text in a .dtml file and restarted Zope, I 
still saw the old text  when I got to the appropriate point (the file was 
wrapped in an HTMLFile() and used for creating a new instance of one of 
the products in the package).

I think I checked all of the following:
* the file was getting updated
* all instances of explorer were shut down
* MSIE options set to "Check for newer version of stored page on every 
visit to the page"

A notable peculiarity was that whenever I tried to access my local zope, I 
would get a "you are offline, do you wish to go online" message (I even 
used localhost as the machine name!).  I would say yes, it would say it 
couldn't connect and ask if I wanted to try again.  I said yes, but then I 
ran into the problems described above.

Zope 2.2.2 on MS W2K with MS IE 5.0.

Does this ring any bells with anyone?  Is it an IE problem?  a Zope 
problem?  an interaction?


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