[ZPT] ZPT served from a python Product / where are my attr. gone ?

Evan Simpson evan@digicool.com
Thu, 19 Jul 2001 11:51:45 -0400


michael@beehive.de wrote:

> Error Type: Undefined
> Error Value: "doc_type" not found in "here/doc_type"


> class Document(Acquisition.Implicit):
>     """I am Used"""
> 
>     def __init__(self, TMP=None):
>         """Zuweisung aller Objektproperties aus einer SQL-Abfrage"""
>         self.id2 = str(TMP[0]['id'])
>         self.doc_type = str(TMP[0]['doc_type'])#The thing i am trying to 
> access

An important difference between DTMLFile and the current version of 
PageTemplateFile is that DTMLFiles don't apply any Zope security, while 
PageTemplateFiles do.  You should probably add a security declaration 
for 'doc_type', unless you're not planning to access it from any 
through-the-web code.

Cheers,

Evan @ digicool