Ejemplo n.º 1
0
class IInstagram(Interface):
    """Description of the Example Type"""

    # -*- schema definition goes here -*-
    downloadlink = schema.TextLine(
        title=_(u"Download Link"),
        required=False,
        description=_(u"Field description"),
    )
Ejemplo n.º 2
0
class ICard(Interface):
    """Description of the Example Type"""

    # -*- schema definition goes here -*-
    data = schema.Date(
        title=_(u"Data"),
        required=True,
        description=_(u"Field description"),
    )
    #
    foto = schema.Bytes(
        title=_(u"Foto"),
        required=True,
        description=_(u"Field description"),
    )
    #
    subtitulo = schema.TextLine(
        title=_(u"Subtitulo"),
        required=False,
        description=_(u"Field description"),
    )
    #
    downloadlink = schema.TextLine(
        title=_(u"Download link"),
        required=False,
        description=_(u"Field description"),
    )
Ejemplo n.º 3
0
class IFoto(Interface):
    """Description of the Example Type"""

    # -*- schema definition goes here -*-
    legenda = schema.TextLine(
        title=_(u"Legenda"),
        required=False,
        description=_(u"Field description"),
    )
#
    legenda = schema.Bytes(
        title=_(u"Arquivo"),
        required=True,
        description=_(u"Field description"),
    )
Ejemplo n.º 4
0
class IVinheta(Interface):
    """Description of the Example Type"""

    # -*- schema definition goes here -*-
    downloadlink = schema.TextLine(
        title=_(u"Download Link"),
        required=False,
        description=_(u"Field description"),
    )
    #
    video = schema.Bytes(
        title=_(u"Video"),
        required=True,
        description=_(u"Field description"),
    )
Ejemplo n.º 5
0
class ICNADestaque(Interface):
    """Description of the Example Type"""

    # -*- schema definition goes here -*-
    veiculo = schema.List(
        title=_(u"Veiculo"),
        required=False,
        description=_(u"Field description"),
    )
    #
    data = schema.Date(
        title=_(u"Data"),
        required=True,
        description=_(u"Field description"),
    )
    #
    texto = schema.Text(
        title=_(u"Texto"),
        required=False,
        description=_(u"Field description"),
    )
Ejemplo n.º 6
0
class IColuna(Interface):
    """Description of the Example Type"""

    # -*- schema definition goes here -*-
    downloadlink = schema.TextLine(
        title=_(u"Download Link"),
        required=False,
        description=_(u"Field description"),
    )
    #
    autor = schema.TextLine(
        title=_(u"Autor"),
        required=True,
        description=_(u"Field description"),
    )
    #
    foto = schema.Bytes(
        title=_(u"Foto"),
        required=True,
        description=_(u"Field description"),
    )
Ejemplo n.º 7
0
from rendereasy.cna.interfaces import IAlbum
from rendereasy.cna.config import PROJECTNAME

from DateTime.DateTime import *
from Products.CMFPlone.utils import getToolByName
from string import join

AlbumSchema = folder.ATFolderSchema.copy() + atapi.Schema((

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

    atapi.StringField(
        'downloadlink',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u"Download link"),
        ),
    ),


))

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

AlbumSchema['title'].widget.label = _(u"Nome do Álbum")
AlbumSchema['title'].storage = atapi.AnnotationStorage()
AlbumSchema['description'].storage = atapi.AnnotationStorage()
AlbumSchema['description'].widget.visible = {"edit": "invisible", "view": "invisible"}
AlbumSchema['location'].widget.visible = {"edit": "invisible", "view": "invisible"}
AlbumSchema['language'].widget.visible = {"edit": "invisible", "view": "invisible"}
Ejemplo n.º 8
0
from rendereasy.cna import cnaMessageFactory as _

from rendereasy.cna.interfaces import ICard
from rendereasy.cna.config import PROJECTNAME

from DateTime.DateTime import *
from Products.CMFPlone.utils import getToolByName
from string import join

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

    # -*- Your Archetypes field definitions here ... -*-
    atapi.StringField(
        'subtitulo',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(label=_(u"Subtítulo"), ),
    ),
    atapi.DateTimeField(
        'data',
        storage=atapi.AnnotationStorage(),
        widget=atapi.CalendarWidget(label=_(u"Data"), ),
        required=True,
        validators=('isValidDate'),
    ),
    atapi.FileField(
        'foto',
        storage=atapi.AnnotationStorage(),
        widget=atapi.FileWidget(label=_(u"Foto"), ),
        required=True,
        validators=('isNonEmptyFile'),
    ),
Ejemplo n.º 9
0
from rendereasy.cna import cnaMessageFactory as _

from rendereasy.cna.interfaces import ICNADestaques
from rendereasy.cna.config import PROJECTNAME

from DateTime.DateTime import *
from Products.CMFPlone.utils import getToolByName
from string import join

CNADestaquesSchema = folder.ATFolderSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.StringField(
        'downloadlink',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(label=_(u"Download link"), ),
    ), ))

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

CNADestaquesSchema['title'].storage = atapi.AnnotationStorage()
CNADestaquesSchema['description'].storage = atapi.AnnotationStorage()
CNADestaquesSchema['description'].widget.visible = {
    "edit": "invisible",
    "view": "invisible"
}
CNADestaquesSchema['location'].widget.visible = {
    "edit": "invisible",
    "view": "invisible"
}
Ejemplo n.º 10
0
from rendereasy.cna.interfaces import IFoto
from rendereasy.cna.config import PROJECTNAME

from DateTime.DateTime import *
from Products.CMFPlone.utils import getToolByName
from string import join

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

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

    atapi.FileField(
        'legenda',
        storage=atapi.AnnotationStorage(),
        widget=atapi.FileWidget(
            label=_(u"Arquivo"),
        ),
        required=True,
        validators=('isNonEmptyFile'),
    ),

    atapi.StringField(
        'legenda',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u"Legenda"),
        ),
    ),

))
Ejemplo n.º 11
0
from rendereasy.cna import cnaMessageFactory as _

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

from DateTime.DateTime import *
from Products.CMFPlone.utils import getToolByName
from string import join

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

    # -*- Your Archetypes field definitions here ... -*-
    atapi.FileField(
        'video',
        storage=atapi.AnnotationStorage(),
        widget=atapi.FileWidget(label=_(u"Video"), ),
        required=True,
        validators=('isNonEmptyFile'),
    ),
    atapi.StringField(
        'downloadlink',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(label=_(u"Download link"), ),
    ),
))

# 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()
Ejemplo n.º 12
0
from rendereasy.cna.interfaces import ICNADestaque
from rendereasy.cna.config import PROJECTNAME

from Products.ATVocabularyManager import NamedVocabulary
from DateTime.DateTime import *
from Products.CMFPlone.utils import getToolByName
from string import join

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

    # -*- Your Archetypes field definitions here ... -*-
    atapi.LinesField(
        'veiculo',
        storage=atapi.AnnotationStorage(),
        widget=atapi.SelectionWidget(label=_(u"Veículo"), ),
        vocabulary=NamedVocabulary("veiculos"),
        required=True,
    ),
    atapi.DateTimeField(
        'data',
        storage=atapi.AnnotationStorage(),
        widget=atapi.CalendarWidget(
            label=_(u"Data"),
            starting_year='2017',
            show_hm=False,
        ),
        required=True,
        validators=('isValidDate'),
        default_method='getDefaultTime',
    ),
Ejemplo n.º 13
0
from rendereasy.cna.interfaces import IPerguntaResposta
from rendereasy.cna.config import PROJECTNAME

from DateTime.DateTime import *
from Products.CMFPlone.utils import getToolByName
from string import join

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

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

    atapi.StringField(
        'downloadlink',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u"Download link"),
        ),
    ),


))

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

PerguntaRespostaSchema['title'].storage = atapi.AnnotationStorage()
PerguntaRespostaSchema['description'].storage = atapi.AnnotationStorage()
PerguntaRespostaSchema['downloadlink'].widget.visible = {"edit": "invisible", "view": "invisible"}

schemata.finalizeATCTSchema(PerguntaRespostaSchema, moveDiscussion=False)