[Zope] non-zope objects in zope

Sam Gendler sgendler at everesttech.net
Tue Apr 27 21:26:31 EDT 2004


I used to be a fairly knowledgable zope user many years ago, but things 
have moved on and I've forgotten most of what I know.  I have a largish 
library of python modules which define a number of classes which have 
methods that perform work in a product.  Currently, much of the system 
is managed vai commandline tools which utilize the library.  We want to 
ad a web interface, and I figured zope would be a natural, since 
everything is already in python.

I created external methods which return instances of classes, but if I 
try to use those instances from within dtml (iterating over a list of 
them, for instance), I just get prompted for authentication 
credentials.  I seem to recall that there was some way of applying 
zopishness to external object instances at runtime, but I can't 
remember what that mechanism is, and I couldn't find it in either the 
zope book or the zope bible I went out an bought.

For example, if I have a customer class which has name, id, and revenue 
members, and I create an external method to return a list of customer 
instances, I cannot do the following

<dtml-in extListCustomers prefix="cust">
<dtml-var expr="cust_item.id"> <dtml-var expr="cust_item.name"> <dtml 
var expr="cust_item.revenue">
</dtml-in>

Thanks

--sam




More information about the Zope mailing list