I am not sure that I was explicit in my reply,
The "allow_discussion" schema is defined in portal_schemas > common so
you don't have to redefine it, you just have to tell zope where to find it.
Cheers.
Alin Voinea wrote:
Hi,
Here is a HowTo Product, is an old one but it will help you (maybe :))
http://svn.nuxeo.org/trac/pub/browser/MyProject/
The "allow_discussion" can be fixed by adding in your Portal Type
Schemas field value 'common' (portal_types > MyProduct > Schemas). The
explanation is simple, you have to add an int schema to your product,
named "allow_discussion", this property is needed if your product
proxy_type is document or folderishdocument.
Dave Kuhlman wrote:
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
_______________________________________________
cps-users mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/cps-users
--
Alin Voinea, Nuxeo Romania
+40 21 322 19 90
http://www.nuxeo.ro
[EMAIL PROTECTED]
_______________________________________________
cps-users mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/cps-users