First of all, make sure you don't try to define classes that should be
persistent in an external method... it wont work the way you expect it
to.

Second (untested):

def getRecords(self):
    """ """
    class record:
        __allow_access_to_unprotected_subobjects__ = 1 
        # this may be unnecessary?
        pass

    r = record().__of__(self)
    r.height = '25'
    return [r]

> -----Original Message-----
> From: Steve Jibson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 26, 2000 12:13 PM
> To: [EMAIL PROTECTED]
> Subject: [Zope] problem with dtml-in and Zope 2.2
> 
> 
> 
> 
> (I've seen other similar posts on the mailing list, but I haven't seen
> the answer, so I'll re-phrase the question and hope someone can help.)
> 
> 
> I've got an external method that returns a list of record objects:
> 
> def getRecords(self):
> 
>     class record:
>         pass
> 
>     r = record()
>     r.height = '25'
>     return [r]
> 
> 
> 
> Then I've got a dtml-document that uses this list:
> 
> <dtml-in "getRecords()">
>   <dtml-var height>
> </dtml-in>
> 
> 
> This worked great before I upgraded to Zope 2.2, now when I "view" the
> dtml-method, I get a popup asking for me to re-authenticate (which, of
> course, fails every time).
> 
> The other posts I've seen similar to this have all involved using
> <dtml-in> to iterate over the results of a database query.  It appears
> that there may be a problem with <dtml-in> in Zope 2.2.
> 
> Please help!
> 
> Steve Jibson
> Parlant Technology
> <[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 )

Reply via email to