[Zope] mxm Product
Max M
maxm@mxm.dk
Thu, 14 Feb 2002 15:09:52 +0000
Heimo Laukkanen wrote:
>Zope 2.4.3 and Python 2.1.1. Any help or ideas where could the problem
>be?
>
Indentation
>Untill then I better start my product from scratch ,-(
>
Well that will be the same there ;-) The Easy product really is nothing
elsa than starting from scratch. Just with a few default settings. So
any problem you will have in making an Easy product you will have in
your own products.
but here is how it should look:
regards Max M
########################################3
from Products.mxm import mxmSimpleItem
from Globals import HTMLFile
class mxmItem(mxmSimpleItem.mxmSimpleItem):
meta_type = 'mxmItem'
_properties = (
{'id':'title', 'type':'string', 'mode':'w'},
{'id':'Summary', 'type':'text', 'mode':'w'},
{'id':'content', 'type':'text', 'mode':'w'},
{'id':'author', 'type':'string', 'mode':'w'},
)
__ac_permissions__ = mxmSimpleItem.mxmSimpleItem.__ac_permissions__ + (
# label
('View',
# methods
('summary',),
# roles
('Anonymous', 'Manager'),
),
)
# Used to view content of the object
index_html = HTMLFile('www/index_html', globals())
# Used to view content of the object
summary = HTMLFile('www/summary', globals())
#####################################################
# Constructor functions, only used when adding class
# to objectManager
def manage_addAction(self, id=None, REQUEST=None):
"Add instance to parent ObjectManager"
mxmSimpleItem.addClass(self, id, mxmItem, REQUEST)
constructors = (mxmSimpleItem.manage_addForm, manage_addAction)
>
>
>_______________________________________________
>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 )
>