Back to index

plone3  3.1.7
Fact.py
Go to the documentation of this file.
00001 from Products.Archetypes.atapi import *
00002 from DateTime import DateTime
00003 from Products.Archetypes.config import PKG_NAME
00004 
00005 schema = BaseSchema + Schema((
00006     TextField('quote',
00007               searchable=1,
00008               required=1,
00009               ),
00010 
00011     LinesField('sources',
00012                widget=LinesWidget,
00013                ),
00014 
00015     TextField('footnote',
00016               required=1,
00017               widget=TextAreaWidget,
00018               ),
00019 
00020     DateTimeField('fact_date',
00021                   default=DateTime(),
00022                   widget=CalendarWidget(label="Date"),
00023                   ),
00024 
00025     StringField('url',
00026                 widget=StringWidget(description="A URL citing the fact",
00027                                   label="URL"),
00028                 validators=('isURL',),
00029                 ),
00030     ))
00031 
00032 class Fact(BaseContent):
00033     """A quoteable fact or tidbit"""
00034     schema = schema
00035 
00036 
00037 registerType(Fact, PKG_NAME)