- """Definition of the video content type
- """
- from zope.interface import implements
- from Products.Archetypes import atapi
- #from Products.ATContentTypes.content import base
- """
- cambio realizado de base a file y iatfile
- """
- from Products.ATContentTypes.content import file
- from Products.ATContentTypes.interface.file import IATFile
- from Products.ATContentTypes.content import schemata
- #-*-Import of FileSystemStorage-*-
- from iw.fss.FileSystemStorage import FileSystemStorage
- # -*- Message Factory Imported Here -*-
- from cenditel.multimedia import multimediaMessageFactory as _
- from cenditel.multimedia.interfaces import Ivideo
- from cenditel.multimedia.config import PROJECTNAME
- #videoSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((
- """
- cambio realizado en el schema, ahora usa File
- """
- videoSchema= file.ATFileSchema.copy() + atapi.Schema((
- # -*- Your Archetypes field definitions here ... -*-
- atapi.StringField("title",
- required=True,
- searchable=True,
- storage=atapi.AnnotationStorage(),
- widget=atapi.StringWidget(label=_(u"title"))
- ),
- atapi.TextField("description",
- required=False,
- searchable=True,
- storage=atapi.AnnotationStorage(),
- widget=atapi.RichWidget(label=_(u"description"))
- ),
- #IATFile.FileField("video",
- # required=True,
- # searchable=False,
- # storage=FileSystemStorage(),
- #storage=atapi.AnnotationStorage(),
- # widget=IATFile.FileWidget(label=_(u"video"))
- # ),
- ))
- # Set storage on fields copied from ATContentTypeSchema, making sure
- # they work well with the python bridge properties.
- videoSchema['title'].storage = atapi.AnnotationStorage()
- videoSchema['description'].storage = atapi.AnnotationStorage()
- schemata.finalizeATCTSchema(videoSchema, moveDiscussion=False)
- class video(file.ATFile):
- """It is a Video File to be show in the site"""
- implements(IATFile, Ivideo)
- _at_rename_after_creation = True
- meta_type = "video"
- schema = videoSchema
- title = atapi.ATFieldProperty('title')
- description = atapi.ATFieldProperty('description')
- # -*- Your ATSchema to Python Property Bridges Here ... -*-
- atapi.registerType(video, PROJECTNAME)