class ISampleContentType(Interface): """Description of the Example Type""" # -*- schema definition goes here -*- newfield = schema.TextLine( title=_(u"Field Label"), required=False, description=_(u"Field Desc"), )
def test(self): """ test method """ dummy = _(u'a dummy string') return {'dummy': dummy}
# -*- Message Factory Imported Here -*- from milktea.archetype import archetypeMessageFactory as _ from milktea.archetype.interfaces import ISampleContentType from milktea.archetype.config import PROJECTNAME SampleContentTypeSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.StringField( 'newfield', storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label=_(u"Field Label"), description=_(u"Field Desc"), ), ), )) # Set storage on fields copied from ATContentTypeSchema, making sure # they work well with the python bridge properties. SampleContentTypeSchema['title'].storage = atapi.AnnotationStorage() SampleContentTypeSchema['description'].storage = atapi.AnnotationStorage() schemata.finalizeATCTSchema(SampleContentTypeSchema, moveDiscussion=False)
from Products.ATContentTypes.content import schemata # -*- Message Factory Imported Here -*- from milktea.archetype import archetypeMessageFactory as _ from milktea.archetype.interfaces import ISampleContentType from milktea.archetype.config import PROJECTNAME SampleContentTypeSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.StringField( 'newfield', storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label=_(u"Field Label"), description=_(u"Field Desc"), ), ), )) # Set storage on fields copied from ATContentTypeSchema, making sure # they work well with the python bridge properties. SampleContentTypeSchema['title'].storage = atapi.AnnotationStorage() SampleContentTypeSchema['description'].storage = atapi.AnnotationStorage() schemata.finalizeATCTSchema(SampleContentTypeSchema, moveDiscussion=False) class SampleContentType(base.ATCTContent): """Description of the Example Type"""