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

Michael Kobald michael@beehive.de
Thu, 19 Jul 2001 18:12:52 +0200


Thanks for your response.
But i don=B4t think it=B4s not a security proplem, but i have to set the=20=

security later !!!!!

If i insert the following Code into class DeTeLineFolder:

::::::::::::::::::::::
doc_type =3D 'my Type'

templateFile =3D PageTemplateFile("Templates/test", globals() )
=09
def foo(self):
	"""fdfd"""
	return self.templateFile(self)
::::::::::::::::::::::::::::

I can call this via URL ..../myfolder/213/foo/

No Probelms !. Same Code in ZPT "here/doc_type"

Something i tried as well:


If i call self._v_Docu_Instace =3D Document(TMP) with an extra self

	def __getitem__(self, attr):
		.....
		self._v_Docu_Instace =3D Document(self, TMP)
		return self._v_Docu_Instace
and

  class Document(Acquisition.Implicit):
	"""I am Used"""

	def __init__(self,self , TMP=3DNone):

Everything workes well again, but that=B4s very dirty, and you get big=20=

Problem in your data.fs, realy strange !


Any ideas left ?


micha

	=09
On Donnerstag, Juli 19, 2001, at 05:51  Ur, Evan Simpson wrote:

> 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=3DNone):
>>         """Zuweisung aller Objektproperties aus einer SQL-Abfrage"""
>>         self.id2 =3D str(TMP[0]['id'])
>>         self.doc_type =3D str(TMP[0]['doc_type'])#The thing i am =
trying=20
>> to access
>
> An important difference between DTMLFile and the current version of=20
> PageTemplateFile is that DTMLFiles don't apply any Zope security, =
while=20
> PageTemplateFiles do.  You should probably add a security declaration=20=

> for 'doc_type', unless you're not planning to access it from any=20
> through-the-web code.
>
> Cheers,
>
> Evan @ digicool
>
>
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt

---------------------------------------------------------
Michael Kobald
beehive elektronische medien GmbH
Fischerhuettenstr. 79 b
D-14163 Berlin
Tel.: 0 30 / 84 78 20