from Products.CMFCore import permissions try: from Products.CMFPlone.factory import _IMREALLYPLONE5 # noqa except ImportError: from archetypes.querywidget.field import QueryField else: from plone.app.collection.field import QueryField PROJECTNAME = "plone.restapi.tests" ATTestDocumentSchema = ATDocumentSchema.copy() + atapi.Schema(( atapi.StringField("testStringField"), atapi.BooleanField("testBooleanField"), atapi.IntegerField("testIntegerField"), atapi.FloatField("testFloatField"), atapi.FixedPointField("testFixedPointField"), atapi.DateTimeField("testDateTimeField"), atapi.LinesField("testLinesField"), atapi.FileField("testFileField"), atapi.TextField("testTextField"), atapi.ImageField("testImageField"), atapi.ReferenceField("testReferenceField", relationship="testrelation"), atapi.ReferenceField( "testMVReferenceField", relationship="testrelation", multiValued=True), BlobField("testBlobField"), FileField("testBlobFileField"), ImageField("testBlobImageField"), QueryField("testQueryField"), atapi.StringField("testRequiredField", required=True), atapi.StringField("testReadonlyField", mode="r"),
searchable=False, widget=atapi.TextAreaWidget(label=_(u"Produto"), ), ), atapi.StringField(name='complexidade', required=True, searchable=True, vocabulary=[], widget=MasterSelectWidget( label=_(u"Complexidade"), description=_(u"Complexidade"), )), atapi.FloatField(name='multiplicador', required=True, searchable=True, default=1.0, widget=atapi.StringWidget( label=_(u"Multiplicador"), description=_(u"Multiplicador"), size=10, )), atapi.BooleanField(name='deflator', required=False, searchable=True, widget=atapi.BooleanWidget( label=_(u"Deflator"), description=_(u"Aplicar deflator"), )), atapi.FloatField(name='valor_deflator', required=False, searchable=True, widget=atapi.StringWidget(
atapi.IntegerField( "maxOpportunityTest", required=False, default=2, storage=atapi.AnnotationStorage(), widget=atapi.IntegerWidget( label=_(u'Opportunities to pass'), description= _(u'Maximum number of chances the user has in order tho pass the exam' ), ), ), atapi.FloatField('minScoreGrade', required=False, default=90.0, storage=atapi.AnnotationStorage(), widget=atapi.DecimalWidget( label=_(u'Score to approve'), description=_(u'Minimun score to pass the exam'), )), atapi.ReferenceField( 'evaluationDependecy', relationship='evaluation_dependecy', allowed_types=('Exam', ), multiValued=False, #keepReferencesOnCopy=True, storage=atapi.AnnotationStorage(), widget=ReferenceBrowserWidget( label=_(u'Referenced Evaluation'), description=_(u'Choose an exam that allow to take this exam'), ), ),
from plone.app.folder.folder import ATFolder from plone.app.folder.folder import ATFolderSchema try: from Products.CMFPlone.factory import _IMREALLYPLONE5 # noqa except ImportError: from archetypes.querywidget.field import QueryField else: from plone.app.collection.field import QueryField PROJECTNAME = 'plone.restapi.tests' ATTestDocumentSchema = ATDocumentSchema.copy() + atapi.Schema(( atapi.StringField('testStringField'), atapi.BooleanField('testBooleanField'), atapi.IntegerField('testIntegerField'), atapi.FloatField('testFloatField'), atapi.FixedPointField('testFixedPointField'), atapi.DateTimeField('testDateTimeField'), atapi.LinesField('testLinesField'), atapi.FileField('testFileField'), atapi.TextField('testTextField'), atapi.ImageField('testImageField'), atapi.ReferenceField('testReferenceField', relationship='testrelation'), atapi.ReferenceField( 'testMVReferenceField', relationship='testrelation', multiValued=True), BlobField('testBlobField'), FileField('testBlobFileField'), ImageField('testBlobImageField'), QueryField('testQueryField'), atapi.StringField('testRequiredField', required=True), atapi.StringField('testReadonlyField', mode='r'),
atapi.TextField( 'details', storage=atapi.AnnotationStorage(), default_content_type='text/html', allowable_content_type='(text/html, text/plain)', default_output_type='text/x-html-safe', widget=atapi.RichWidget( label=_(u"Details"), description=_(u"Description of GIS Layer"), ), ), atapi.FloatField( 'transparency', storage=atapi.AnnotationStorage(), widget=atapi.DecimalWidget( label=_(u"Transparency"), description=_(u"0.0 = transparent, 1.0 = opaque"), ), default=0.7, validators=('isDecimal'), ), atapi.StringField( 'latlong', storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label=_(u"Latitude Longitude"), description=_(u'formatted as "lat long"'), ), required=False, ), atapi.IntegerField( 'zoom',
from Products.ATContentTypes.content import schemata # -*- Message Factory Imported Here -*- from example.app.interfaces import IVenue from example.app.config import PROJECTNAME VenueSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.FloatField( name='latitude', required=True, widget=atapi.DecimalWidget( label='latitude', description='Please enter latitude.', visible={ 'view': 'visible', 'edit': 'visible' }, ), ), atapi.FloatField( name='longitude', required=True, widget=atapi.DecimalWidget( label='longitude', description='Please enter longitude.', visible={ 'view': 'visible', 'edit': 'visible' },
), atapi.DateTimeField( name='data_fim', required=False, searchable=True, widget=atapi.CalendarWidget( label=_(u'Data de conclusão'), ), ), atapi.FloatField( name='duracao', required=True, searchable=True, widget=atapi.StringWidget( label=_(u"Duração"), description=_(u"Duração em horas da atividade."), size=10,) ), atapi.FloatField( name='quantHST', required=True, searchable=True, widget=atapi.StringWidget( label=_(u"QTDE de HST"), size=10,) ), atapi.TextField(
expression='here.renderMemoryValue(here.getAllocatedMemory())', widget=atapi.ComputedWidget(label='Allocated storage'), ), atapi.ComputedField( 'storage_class', expression='here.getStorageClass()', widget=atapi.ComputedWidget(label='Storage class'), ), atapi.IntegerField( 'max_objects', widget=atapi.IntegerWidget( label='Max. Objects', description='Allocated (maximum) number of objects', ), ), atapi.FloatField('cost_factor'), atapi.DateTimeField( 'preserve_until', widget=atapi.CalendarWidget( label='Preserve until', description='Until when does this resource need ' 'to be allocated?', show_hm=False), ), )) + ResourceContextFields.copy() + CommonFields.copy() schemata.finalizeATCTSchema(RegisteredStorageResourceSchema, moveDiscussion=False) class RegisteredStorageResource(base.ATCTContent, CommonUtilities,
from eke.biomarker import ProjectMessageFactory as _ from eke.biomarker.config import PROJECTNAME from eke.biomarker.content.base import predicateURIBase from eke.biomarker.interfaces import IStudyStatistics from eke.knowledge.content.knowledgeobject import KnowledgeObject from Products.Archetypes import atapi from Products.ATContentTypes.content.schemata import finalizeATCTSchema from zope.interface import implements StudyStatisticsSchema = KnowledgeObject.schema.copy() + atapi.Schema(( atapi.FloatField( 'sensitivity', required=False, storage=atapi.AnnotationStorage(), widget=atapi.DecimalWidget( label=_(u'Sensitivity'), description=_( u'Proportion of actual positives that are correctly identified.' ), ), predicateURI=predicateURIBase + 'Sensitivity', ), atapi.FloatField( 'specificity', required=False, storage=atapi.AnnotationStorage(), widget=atapi.DecimalWidget( label=_(u'Specificity'), description=_( u'Proportion of actual negatives that are correctly identified.' ), ),