Note that very soon (with a month) we'll be moving away from these
painful installers and external support files, and all the
configuration, including type definitions, will be moved to a much
more explicit set of XML files. We'll be using CMFSetup extensions,
so if you want to familiarize yourself with it you can play with
CMFSetup and creation of new types in pure CMF.
Florent
On 20 Sep 2005, at 00:02, 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
--
Dave Kuhlman
http://www.rexx.com/~dkuhlman
_______________________________________________
cps-users mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/cps-users
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED]
_______________________________________________
cps-users mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/cps-users