source: trunk/AudioAsset.py @ 66

Revision 66, 1.3 KB checked in by tarmo, 14 years ago (diff)

Changed the svn:eol-style property to "native", since
people aren't using unix line feeds uniformally.

  • Property svn:eol-style set to native
Line 
1from Products.Archetypes.public import BaseSchema, Schema
2from Products.Archetypes.public import StringField, LinesField, TextField, CMFObjectField, FileField
3from Products.Archetypes.public import LinesWidget, TextAreaWidget, IdWidget, StringWidget, SelectionWidget, RichWidget, FileWidget
4from Products.Archetypes.public import BaseContent, registerType
5from Globals import InitializeClass
6from Products.CMFCore.utils import getToolByName
7from AccessControl import ClassSecurityInfo, Unauthorized
8from config import PROJECTNAME
9from Products.Toolbox.BaseAsset import BaseAsset
10
11schema = BaseSchema + Schema((
12    FileField('AudioAssetFile',
13        required=True,
14        primary=True,
15        #languageIndependent=True,
16        #storage = AnnotationStorage(migrate=True),
17        #accessor="getAudioAssetFile",
18        allowable_content_type = ('application/ogg',),
19        widget=FileWidget(
20            label="Upload audio file",
21            label_msgid="label_upload_audio_file",
22            description="Upload audio file",
23            description_msgid="desc_upload_audio_file",
24            i18n_domain="toolbox",
25            show_content_type = True,),
26        ),
27))
28
29class AudioAsset(BaseAsset):
30    schema = schema
31    meta_type = "AudioAsset"
32    archetype_name = "AudioAsset" 
33    global_allow = 1
34
35registerType(AudioAsset, PROJECTNAME)
Note: See TracBrowser for help on using the repository browser.