← Back to team overview

mlhim-owners team mailing list archive

[Branch ~hkcr-dev/hkcr/hkcr] Rev 71: Added the actual content ype for CDDFile.

 

------------------------------------------------------------
revno: 71
committer: Timothy W. Cook <timothywayne.cook@xxxxxxxxx>
branch nick: hkcr
timestamp: Sun 2011-05-29 22:02:02 -0500
message:
  Added the actual content ype for CDDFile.
modified:
  hkcr.cddfile/hkcr/cddfile/content/cddfile.py


--
lp:hkcr
https://code.launchpad.net/~hkcr-dev/hkcr/hkcr

Your team Multi-level Healthcare Information Modelling Owners is subscribed to branch lp:hkcr.
To unsubscribe from this branch go to https://code.launchpad.net/~hkcr-dev/hkcr/hkcr/+edit-subscription
=== modified file 'hkcr.cddfile/hkcr/cddfile/content/cddfile.py'
--- hkcr.cddfile/hkcr/cddfile/content/cddfile.py	2011-05-19 17:36:03 +0000
+++ hkcr.cddfile/hkcr/cddfile/content/cddfile.py	2011-05-30 03:02:02 +0000
@@ -1,4 +1,5 @@
-"""Definition of the CDD File content type
+"""
+Definition of the CDD File content type
 """
 
 from zope.interface import implements
@@ -6,14 +7,15 @@
 from Products.Archetypes import atapi
 from Products.ATContentTypes.content import base
 from Products.ATContentTypes.content import schemata
+from Products.ATContentTypes.content import file
 
 # -*- Message Factory Imported Here -*-
 
 from hkcr.cddfile.interfaces import ICDDFile
 from hkcr.cddfile.config import PROJECTNAME
 
-CDDFileSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((
-
+CDDFileSchema = file.ATFileSchema.copy() + atapi.Schema((
+#CDDFileSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((
     # -*- Your Archetypes field definitions here ... -*-
 
 ))
@@ -27,7 +29,7 @@
 schemata.finalizeATCTSchema(CDDFileSchema, moveDiscussion=False)
 
 
-class CDDFile(base.ATCTContent):
+class CDDFile(file.ATFile):
     """The graphical model of a concept."""
     implements(ICDDFile)
 
@@ -38,5 +40,7 @@
     description = atapi.ATFieldProperty('description')
 
     # -*- Your ATSchema to Python Property Bridges Here ... -*-
-
+    
+    allowed_content_types = ['Image', 'File']
+    
 atapi.registerType(CDDFile, PROJECTNAME)