Exemple #1
0
class IVinheta(Interface):
    """Description of the Example Type"""

    # -*- schema definition goes here -*-
    video = schema.Bytes(
        title=_(u"Video"),
        required=False,
        description=_(u"Field description"),
    )
Exemple #2
0
class IFoto(Interface):
    """Description of the Example Type"""

    # -*- schema definition goes here -*-
    arquivo = schema.Bytes(
        title=_(u"Foto"),
        required=True,
        description=_(u"Field description"),
    )
#
    legenda = schema.TextLine(
        title=_(u"Legenda"),
        required=False,
        description=_(u"Field description"),
    )
class IColuna(Interface):
    """Description of the Example Type"""

    # -*- schema definition goes here -*-
    foto = schema.Bytes(
        title=_(u"Foto"),
        required=True,
        description=_(u"Field description"),
    )
    #
    autor = schema.TextLine(
        title=_(u"Autor"),
        required=True,
        description=_(u"Field description"),
    )
class IPerguntaResposta(Interface):
    """ """

    # -*- schema definition goes here -*-
    nomepergunta = schema.TextLine(
        title=_(u"Nome - Pergunta"),
        required=False,
        description=_(u"Field description"),
    )
    #
    creditopergunta = schema.TextLine(
        title=_(u"Credito - Pergunta"),
        required=False,
        description=_(u"Field description"),
    )
    #
    videopergunta = schema.Bytes(
        title=_(u"Video - Pergunta"),
        required=False,
        description=_(u"Field description"),
    )
    #
    nomeresposta = schema.TextLine(
        title=_(u"Nome - Resposta"),
        required=True,
        description=_(u"Field description"),
    )
    #
    creditoresposta = schema.TextLine(
        title=_(u"Credito - Resposta"),
        required=False,
        description=_(u"Field description"),
    )
    #
    videoresposta = schema.Bytes(
        title=_(u"Video - Resposta"),
        required=True,
        description=_(u"Field description"),
    )
# -*- Message Factory Imported Here -*-
from rendereasy.origine import origineMessageFactory as _

from rendereasy.origine.interfaces import IColuna
from rendereasy.origine.config import PROJECTNAME

ColunaSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-


    atapi.StringField(
        'autor',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u"Autor"),
        ),
        required=True,
    ),

    atapi.ImageField(
        'foto',
        storage=atapi.AnnotationStorage(),
        widget=atapi.ImageWidget(
            label=_(u"Foto"),
        ),
        required=True,
        validators=('isNonEmptyFile'),
    ),

Exemple #6
0
from Products.Archetypes import atapi
from Products.ATContentTypes.content import base
from Products.ATContentTypes.content import schemata

# -*- Message Factory Imported Here -*-
from rendereasy.origine import origineMessageFactory as _

from rendereasy.origine.interfaces import IFoto
from rendereasy.origine.config import PROJECTNAME

FotoSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.ImageField('arquivo',
                     storage=atapi.AnnotationStorage(),
                     widget=atapi.ImageWidget(label=_(u"Foto"), ),
                     required=True,
                     validators=('isNonEmptyFile'),
                     sizes={'foto': (1248, 702)}),
    atapi.StringField(
        'legenda',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(label=_(u"Legenda"), ),
    ),
))

# Set storage on fields copied from ATContentTypeSchema, making sure
# they work well with the python bridge properties.

FotoSchema['title'].widget.visible = {"edit": "invisible", "view": "invisible"}
FotoSchema['title'].required = False
from Products.ATContentTypes.content import base
from Products.ATContentTypes.content import schemata

# -*- Message Factory Imported Here -*-
from rendereasy.origine import origineMessageFactory as _

from rendereasy.origine.interfaces import IVinheta
from rendereasy.origine.config import PROJECTNAME

VinhetaSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.FileField(
        'video',
        storage=atapi.AnnotationStorage(),
        widget=atapi.FileWidget(label=_(u"Vídeo"), ),
        required=True,
        validators=('isNonEmptyFile'),
    ), ))

# Set storage on fields copied from ATContentTypeSchema, making sure
# they work well with the python bridge properties.

VinhetaSchema['title'].storage = atapi.AnnotationStorage()
VinhetaSchema['description'].storage = atapi.AnnotationStorage()
VinhetaSchema['description'].widget.visible = {
    "edit": "invisible",
    "view": "invisible"
}
VinhetaSchema['location'].widget.visible = {
    "edit": "invisible",
Exemple #8
0
from Products.ATContentTypes.content import base
from Products.ATContentTypes.content import schemata

# -*- Message Factory Imported Here -*-
from rendereasy.origine import origineMessageFactory as _

from rendereasy.origine.interfaces import IPerguntaResposta
from rendereasy.origine.config import PROJECTNAME

PerguntaRespostaSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.StringField(
        'nomepergunta',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(label=_(u"Nome - Pergunta"), ),
    ),
    atapi.StringField(
        'creditopergunta',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(label=_(u"Crédito - Pergunta"), ),
    ),
    atapi.FileField(
        'videopergunta',
        storage=atapi.AnnotationStorage(),
        widget=atapi.FileWidget(label=_(u"Vídeo - Pergunta"), ),
        validators=('isNonEmptyFile'),
    ),
    atapi.StringField(
        'nomeresposta',
        storage=atapi.AnnotationStorage(),