Remove the example CMFType classes.

This commit is contained in:
david 2002-11-19 08:26:45 +00:00
parent 4235da6389
commit 02ab96e829
2 changed files with 0 additions and 90 deletions

View File

@ -1,46 +0,0 @@
from AccessControl import ClassSecurityInfo
#from Products.CMFTypes import registerType
from Products.Lampadas import registerType
from Products.CMFTypes.BaseContent import BaseContent
from Products.CMFTypes.ExtensibleMetadata import ExtensibleMetadata
from Products.CMFTypes.Field import *
from Products.CMFTypes.Form import *
from Products.CMFTypes.debug import log
def addDDocument(self, id, **kwargs):
o = DDocument(id, **kwargs)
self._setObject(id, o)
class DDocument(BaseContent):
"""An extensible Document (test) type"""
portal_type = meta_type = "DDocument"
type = BaseContent.type + FieldList((
Field('teaser',
searchable=1,
form_info=TextAreaInfo(description="A short lead-in to the article so that we might get people to read the body",
label="Teaser",
rows=3)),
Field('author'),
Field('body',
required=1,
searchable=1,
allowable_content_types=('text/plain', 'text/structured', 'text/html', 'application/msword'),
form_info=RichFormInfo(description="Enter a valid body for this document. This is what you will see",
label="Body Text",
)),
IntegerField("number", form_info=IntegerInfo(), default=42),
Field('image', form_info=FileInfo()),
# SlotField("about",
# form_info=SlotInfo(slot_metal="here/about_slot/macros/aboutBox",
# )),
))
registerType(DDocument)

View File

@ -1,44 +0,0 @@
from AccessControl import ClassSecurityInfo
#from Products.CMFTypes import registerType
from Products.Lampadas import registerType
from Products.CMFTypes.BaseContent import BaseContent
from Products.CMFTypes.ExtensibleMetadata import ExtensibleMetadata
from Products.CMFTypes.Field import *
from Products.CMFTypes.Form import *
from Products.CMFTypes.debug import log
def addFact(self, id, **kwargs):
o = Fact(id, **kwargs)
self._setObject(id, o)
class Fact(BaseContent):
"""A quoteable fact or tidbit"""
portal_type = meta_type = "Fact"
type = BaseContent.type + FieldList((
Field('quote',
searchable=1,
required=1,
form_info=StringInfo(description="What are you quoting, what is the fact",
label="Quote",
)),
LinesField('sources', form_info=LinesInfo()),
Field('footnote',
required=1,
form_info = TextAreaInfo(description="The full footnot for this fact/quote")),
DateTimeField('fact_date',
form_info=DateTimeInfo(description="When does this fact originate from",
label="Date")),
Field('url',
form_info=LinkInfo(description="When does this fact originate from",
label="URL")),
))
registerType(Fact)