Sunday, March 06, 2005

Zope dan mXm easy Product

perghhh...mmg betol2 cair la kepale otak aku ni blajar simple Zope structure, python script utk design aku punye simple easyProduct berdasarkan mXm easyProduct ni...memula problem masa aku install Zope tu dlm linux...berterabur lak content dia....tapi atas bantuan Mr. Bakhtiar (Bos Network)...sume problem tu dpt la diselesaikan....then, lagi skali problem masa aku nak install mXm easyProduct tu dlm Zope...haa...yg ni lagi critical....tapi dengan bantuan Mr. Bak...skali lagi mende ni berjaye dibereskan...hmmm...yg ni basic phyton script utk aku punye easyProduct. Masih dalam proses pembikinan eh.

Lokasi = zope instance/Product/easyReport/easyReport.py
-------------------------------------------------------------------
from mxm import mxmSimpleItem

class easyReport(mxmSimpleItem.mxmSimpleItem):


meta_type = 'easyReport'

_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'},
{'id':'float_number', 'type':'float', 'mode':'w'},
{'id':'int_number', 'type':'int', 'mode':'w'},
{'id':'long_number', 'type':'long', 'mode':'w'},
{'id':'the_date', 'type':'date', 'mode':'w'},
{'id':'one_line', 'type':'string', 'mode':'w'},
{'id':'several_lines_text', 'type':'text', 'mode':'w'},
{'id':'list_of_lines', 'type':'lines', 'mode':'w'},
{'id':'line_of_items', 'type':'tokens', 'mode':'w'},
{'id':'select_widget', 'type':'selection', 'mode':'w', 'select_variable':'someListOrMethod'},
{'id':'multi_select_widget', 'type':'multiple selection', 'mode':'w', 'select_variable':'someListOrMethod'},

)

#####################################################
# 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, easyReport,
REQUEST)

constructors = (mxmSimpleItem.manage_addForm,
manage_addAction)

sumber rujukan:

p/s:
* sbenarnye aku betul2 blaja mende alah ni pasal aku nak buat projek...report system yg dah brape tahun terbengkalai disebabkan pale otak aku yg penin ngadap python script yg digunakan utk generate Zope ni...

*Bsok budget nak sambut utk dtml method lak :)))

No comments: