I'm trying to implement a CPS Product. I want to do this in
Python source code. And, I'm trying to write a document on how to
do this.
I'm attempting to follow the CPSSchema model, that is, I've
generated my type definition with portal_schemas, portal_layouts,
portal_types, and then pasted these (exported) definitions into:
- skins/cps_myproduct/getMyProductSchemas.py
- skins/cps_myproduct/getMyProductLayouts.py
- skins/cps_myproduct/getMyProductTypes.py
Now I need to learn how to make the next step. Specifically, I
need to learn the following:
- How to define the user interface for my new type. Specifically,
for Products based on CPSSchema:
Are there conventions that I must follow in defining the .pt
files in skins/cps_myproduct:
- skins/cps_myproduct/myproduct_add.pt
- skins/cps_myproduct/myproduct_view.pt
- skins/cps_myproduct/myproduct_edit.pt
- How to connect the user interface files (.pt) to my Product
implementation? I've referenced the .pt files in the actions in
my factory_type_information. Is that enough?
Is there anywhere I can look for guidance?
I've been reading "CPS 3 Guide du développeur" (cps3book.pdf).
It's very helpful, but I have not figured out the questions above.
Is there an example of a CPS Product that has been implemented
with the CPSSchemas model? I've been looking at CPSWiki.
Is there anything like a CPS equivalent of the Zope BoringProduct
that uses CPSSchema? If not, I'd like to create one.
My current problem -- When I'm creating a new instance of my type,
I get the edit form, then, when I click on "Create", I get a
trace-back:
File "Python expression
"getattr(object.getTypeInfo(),'cps_proxy_type','') in ('document',
'folderishdocument') and object.getContent().allow_discussion == 0"", line 1,
in <expression>
AttributeError: allow_discussion
"allow_discussion", by the way, is a key in my
factory_type_information.
Apparently, I've got some of the pieces in place, but do not know
how to connect them together.
Thanks for any pointers.
Dave
--
Dave Kuhlman
http://www.rexx.com/~dkuhlman
_______________________________________________
cps-users mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/cps-users