Hi all, have been experimenting with Products of late, I have a directory: FOO and in it. __init__.py with the correct defintion for initialize() and foo,py with a Product Interface and Implementation a la book. but I forgot one thing, a line that says : InitializeClass(MyProduct) Now, my product works fine <u>without</u> this line, and as I'm a curious sort, was wonderiing if anyone could tell me why if you have got initialze() in __jnit__.py why one would <i>need</i> to InitializeClass() in Product.py?? tia Matt
Though you can make a working product without it, InitializeClass() ensures that any explicit security assertions you make for your object are applied correctly. More info: http://dev.zope.org/Wikis/DevSite/Projects/DeclarativeSecurity/ZopeSecurityF... HTH, Dylan At 01:29 AM 1/8/2003, Matthew Russell wrote:
Hi all, have been experimenting with Products of late, I have a directory: FOO and in it. __init__.py with the correct defintion for initialize() and foo,py with a Product Interface and Implementation a la book.
but I forgot one thing, a line that says :
InitializeClass(MyProduct)
Now, my product works fine <u>without</u> this line, and as I'm a curious sort, was wonderiing if anyone could tell me why if you have got initialze() in __jnit__.py why one would <i>need</i> to InitializeClass() in Product.py??
tia Matt
_______________________________________________ Zope maillist - Zope@zope.org 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 )
Matthew Russell wrote:
InitializeClass(MyProduct)
Now, my product works fine <u>without</u> this line, and as I'm a curious sort, was wonderiing if anyone could tell me why if you have got initialze() in __jnit__.py why one would <i>need</i> to InitializeClass() in Product.py??
The one in __init__.py has nothing to do with the one in Product.py. Come back and ask your question again when you're banging your head against a wall trying to figure out why, in some edge cases, instances of your product behave weirdly w.r.t. security ;-) cheers, Chris
participants (3)
-
Chris Withers -
Dylan Reinhardt -
Matthew Russell