当前位置: 首页>>代码示例>>Python>>正文


Python document.ATDocumentSchema类代码示例

本文整理汇总了Python中Products.ATContentTypes.content.document.ATDocumentSchema的典型用法代码示例。如果您正苦于以下问题:Python ATDocumentSchema类的具体用法?Python ATDocumentSchema怎么用?Python ATDocumentSchema使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ATDocumentSchema类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Schema

from Products.ATContentTypes.content.document import ATDocumentSchema, ATDocumentBase
from vindula.controlpanel.content.interfaces import IRedirectUser

from zope.interface import implements
from archetypes.schemaextender.field import ExtensionField
from Products.Archetypes.atapi import *
from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget
from Products.UserAndGroupSelectionWidget.at import widget

from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from vindula.controlpanel.config import *

from vindula.controlpanel.browser.at.widget import VindulaReferenceSelectionWidget

# Interface and schema
RedirectUser_schema =  ATDocumentSchema.copy() + Schema((
    
    LinesField(
            name="userORgroups",
            multiValued=1,
            widget = widget.UserAndGroupSelectionWidget(
                label=u"Usuários ou Grupos",
                description=u"Selecione os usuários ou grupos que estarão nesta regra.",required=True,
                ),
            required=True,
            ),
    
    ReferenceField('redirectPath',
        multiValued=0,
        label=_(u"Local de envio"),
        relationship='redirectPath',
开发者ID:vindula,项目名称:vindula.controlpanel,代码行数:31,代码来源:redirectuser.py

示例2: ISendAsPDFTool

from Products.Archetypes import atapi
from Products.CMFCore.utils import ImmutableId
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.permissions import ModifyPortalContent
from Products.ATContentTypes.content.document import ATDocument
from Products.ATContentTypes.content.document import ATDocumentSchema
from zope.interface import Interface, implements
import config

from collective.sendaspdf import SendAsPDFMessageFactory as _

class ISendAsPDFTool(Interface):
    """send as pdf tool marker interface"""


sendAsPDFSchema = ATDocumentSchema.copy() + atapi.Schema((
    atapi.StringField(
        name = 'pdf_generator',
        default='wk',
        widget=atapi.SelectionWidget(
            format="select",
            label=_(u'label_pdf_generator',
                    default=u'PDF generator'),
            ),
        vocabulary = '_generatorVocabulary'
        ),

    atapi.StringField(
        name = 'tempdir',
        default='/tmp',
        widget=atapi.StringWidget(
开发者ID:giacomos,项目名称:collective.sendaspdf,代码行数:31,代码来源:tool.py

示例3: BlobField

from Products.CMFCore import permissions
from plone.app.blob.field import BlobField
from plone.app.blob.field import FileField
from plone.app.blob.field import ImageField
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'),
开发者ID:lccruz,项目名称:plone.restapi,代码行数:31,代码来源:attypes.py

示例4: Schema

    from Products.CMFCore.CMFCorePermissions import ModifyPortalContent, View
try:
  from Products.LinguaPlone.public import *
except ImportError:
  from Products.Archetypes.public import *

from zope.interface import implements
from Products.ATContentTypes.content.document import ATDocumentSchema
from Products.ATContentTypes.content.document import ATDocument
from Products.ATContentTypes.content.schemata import finalizeATCTSchema

from Products.qPloneGoogleMaps.field import *
from Products.qPloneGoogleMaps.config import *
from geo.interfaces import IPlacemark

MarkerSchema = ATDocumentSchema.copy() + Schema((
    MapField('location',
        default=None,
        required=True,
        validators=('isLocation',),
        widget=MapWidget(
            label='Marker Location',
            label_msgid='label_marker_center',
            description='Here you can choose marker location on the map by mouse clicking',
            description_msgid='help_marker_center',
            i18n_domain='googlemaps',
        )
    ),

    StringField('color',
        vocabulary=('default', 'red', 'green', 'blue'),
开发者ID:kroman0,项目名称:products,代码行数:31,代码来源:Marker.py

示例5: Schema

from zope.app.component.hooks import getSite 
from zope.interface import Interface
from vindula.content.content.interfaces import IVindulaPortlet
from plone.contentrules.engine.interfaces import IRuleAssignable
from AccessControl import ClassSecurityInfo
from zope.interface import implements
from Products.Archetypes.atapi import *
from Products.ATContentTypes.content.document import ATDocumentSchema
from Products.ATContentTypes.content.document import ATDocumentBase
from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from vindula.content.config import *

from vindula.controlpanel.browser.at.widget import VindulaReferenceSelectionWidget

VindulaPortlet_schema = ATDocumentSchema.copy() + Schema((

   ReferenceField('imageRelac',
        multiValued=0,
        allowed_types=('Image'),
        label=_(u"Imagem "),
        relationship='Imagem',
        widget=VindulaReferenceSelectionWidget(
            #default_search_index='SearchableText',
            label=_(u"Imagem "),
            description='Imagem para destaque no portlet. A imagem será redimensionada para um tamanho adequado.')),

    TextField(
            name='title_image',
            widget=StringWidget(
                label=_(u"Título da Imagem"),
开发者ID:vindula,项目名称:vindula.content,代码行数:31,代码来源:vindulaportlet.py

示例6: getattr

        allow_browse="True",
    ),

),
)

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

Feature_schema = BaseFolderSchema.copy() + \
    getattr(Named, 'schema', Schema(())).copy() + \
    getattr(Work, 'schema', Schema(())).copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
Feature_schema = ATDocumentSchema.copy() + \
    schema.copy() + \
    getattr(Named, 'schema', Schema(())).copy() + \
    getattr(Work, 'schema', Schema(())).copy()
##/code-section after-schema

class Feature(BaseFolder, ATDocumentBase, Named, Work, BrowserDefaultMixin):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.IFeature)

    meta_type = 'Feature'
    _at_rename_after_creation = True
开发者ID:kidaak,项目名称:PleiadesEntity,代码行数:30,代码来源:Feature.py

示例7: PositionalAccuracy

            description="Attach feature source file",
            label="Feature source file",
            label_msgid='PleiadesEntity_label_source',
            description_msgid='PleiadesEntity_help_source',
            i18n_domain='PleiadesEntity',
        ),
        storage=AttributeStorage(),
        description="XML source of features",
    ),
),
)

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

PositionalAccuracy_schema = ATDocumentSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema

class PositionalAccuracy(ATDocument):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.IPositionalAccuracy)

    meta_type = 'PositionalAccuracy'
    _at_rename_after_creation = True
开发者ID:kidaak,项目名称:PleiadesEntity,代码行数:30,代码来源:PositionalAccuracy.py

示例8: Malad

#802, Building No. 1,
#Dheeraj Sagar, Malad(W)
#Mumbai-400064, India
###############################################################################
from Products.Archetypes.atapi import *

from Products.ATContentTypes.content.document \
     import ATDocument as BaseClass
from Products.ATContentTypes.content.document \
     import ATDocumentSchema as DefaultSchema

from Products.ATContentTypes.content.base import registerATCT

from ubify.coretypes.config import PROJECTNAME


schema = DefaultSchema.copy()


class ATDocument(BaseClass):
    __doc__ = BaseClass.__doc__ + " (customizable version)"

    portal_type = BaseClass.portal_type
    archetype_name = BaseClass.archetype_name

    schema = schema


registerATCT(ATDocument, PROJECTNAME)

开发者ID:Cenditel,项目名称:cenditel.comunidades.cynin,代码行数:29,代码来源:document.py

示例9: Schema

from Products.PloneArticle.config import PLONEARTICLE_TOOL, PROJECTNAME

from Products.PloneArticle.interfaces import IPloneArticle
from Products.PloneArticle.field import FileInnerContentField, \
     ImageInnerContentField, LinkInnerContentField
from Products.PloneArticle.widget import FileInnerContentWidget, \
    ImageInnerContentWidget, LinkInnerContentWidget
from Products.PloneArticle.content.mixin import ArticleMixin
from Products.PloneArticle.pafti import PloneArticleFactoryTypeInformation

from Products.PloneArticle.version import CURRENT_ARTICLE_VERSION


# Inherits schema from ATDocument
# Copy it to make sure PloneArticle schema is totally independant
PloneArticleSchema = ATDocumentSchema.copy() + Schema((
    FileInnerContentField(
        'files',
        searchable=True,
        schemata='files',
        widget=FileInnerContentWidget(
            label='Files',
            label_msgid='label_files',
            i18n_domain='plonearticle',
            ),
        ),
    ImageInnerContentField(
        'images',
        searchable=True,
        schemata='images',
        widget=ImageInnerContentWidget(
开发者ID:collective,项目名称:Products.PloneArticle,代码行数:31,代码来源:article.py

示例10: Schema

from vindula.liberiuntheme import MessageFactory as _

from AccessControl import ClassSecurityInfo

from vindula.liberiuntheme.content.interfaces import IPlanosPrecos
from Products.ATContentTypes.content.document import ATDocumentSchema,ATDocumentBase

from zope.interface import implements
from Products.Archetypes.atapi import *
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from vindula.liberiuntheme.config import *
from DateTime.DateTime import DateTime
from time import strftime, gmtime


PlanosPrecos_schema = ATDocumentSchema.copy() + Schema((

    TextField(
            name='URLButton',
            widget=StringWidget(
                label=_(u"URL do destino."),
                description=_(u"Insira a URL que o usuário será direcionado ao clicar no botão de 'assinar'."),
                label_msgid='vindula_liberiuntheme_label_title_URLButton',
                description_msgid='vindula_liberiuntheme_title_URLButton',
                i18n_domain='vindula_liberiuntheme',
            ),
        required=True,
    ),        
    
    
    IntegerField(
开发者ID:vindula,项目名称:vindula.liberiuntheme,代码行数:31,代码来源:planosprecos.py

示例11: HelpCenterHowTo

from PHCContent import PHCContentMixin, HideOwnershipFields, IHelpCenterContent

from Products.ATContentTypes.interface import IATFolder, IATDocument
from Products.ATContentTypes.content.document import \
    ATDocumentSchema, ATDocumentBase
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from Products.ATContentTypes.lib.constraintypes import \
    ConstrainTypesMixinSchema
from Products.ATContentTypes.content.base import ATCTOrderedFolder


# Create a Frankenstein's monster: a hybrid of ATCT
# folder and document types.
# Since the document type is more complex, we'll use it for the base.

HowToSchema = ATDocumentSchema.copy() + ConstrainTypesMixinSchema + \
              HelpCenterItemSchemaNarrow

HideOwnershipFields(HowToSchema)
finalizeATCTSchema(HowToSchema, folderish=True, moveDiscussion=False)


class HelpCenterHowTo(ATCTOrderedFolder, ATDocumentBase, PHCContentMixin):
    """A How-to is a document describing how to address a single, common
    use-case or issue. You may add images and files as attachments.
    """

    implements(IATFolder, IATDocument, IHelpCenterHowTo, IHelpCenterContent)
    isPrincipiaFolderish = True
    content_icon = 'howto_icon.gif'
    typeDescription = 'A How-to is a document describing how to address a ' \
开发者ID:pingviini,项目名称:Products.PloneHelpCenter,代码行数:31,代码来源:HowTo.py

示例12: Schema

from AccessControl import ClassSecurityInfo
from Products.ATContentTypes.content.document import ATDocumentSchema, ATDocumentBase
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from Products.Archetypes.atapi import *
from five import grok
from plone.app.blob.field import FileField, ImageField
from plone.contentrules.engine.interfaces import IRuleAssignable
from zope.interface import implements

from vindula.content import MessageFactory as _
from vindula.content.config import *
from vindula.content.content.interfaces import IVindulaVideo
from vindula.content.models.content_field import ContentField


VindulaVideo_schema =  ATDocumentSchema.copy() + Schema((
 
 
    BooleanField(
        name='activ_portlteRight',
        default=True,
        widget=BooleanWidget(
            label="Coluna Direita",
            description='Ativa a visualização dos itens da coluna da direita. Ex: Portlets.',
        ),
        required=False,
    ),                                                       
    
    BooleanField(
        name='activ_portletLeft',
        default=True,
开发者ID:vindula,项目名称:vindula.content,代码行数:31,代码来源:vindulavideo.py

示例13:

        for name in show:
            if name in to_hide:
                to_hide.remove(name)

    for name in to_hide:
        if name in schema:
            field = schema[name]
            schema.changeSchemataForField(name, 'default')
            field.widget.visible = {'view': 'invisible', 'edit': 'invisible'}
            field.write_permission = ManagePortal

    # Hide from navigation by default
    schema['excludeFromNav'].default = True


ShopItemBlockSchema = ATDocumentSchema.copy() + atapi.Schema((

    atapi.ReferenceField(
        'item',
        required=1,
        languageIndependent=True,
        relationship='itemblock_item',
        allowed_types=['ShopItem'],
        allow_search=True,
        allow_browse=True,
        widget=ReferenceBrowserWidget(
            label=_(u"label_item", default=u"Shop Item"),
            startup_directory_method='get_startup_directory',
        ),
    ),
))
开发者ID:4teamwork,项目名称:ftwshop.simplelayout,代码行数:31,代码来源:shopitemblock.py

示例14:

from collective.datagridcolumns.SelectColumn import SelectColumn
from collective.datagridcolumns.TextAreaColumn import TextAreaColumn
from collective.tablepage import config
from collective.tablepage import tablepageMessageFactory as _
from collective.tablepage.interfaces import IDataStorage
from collective.tablepage.interfaces import ITablePage
from zope.component import queryUtility
from zope.interface import implements

try:
    from archetypes.referencebrowserwidget import ReferenceBrowserWidget
except ImportError:
    from Products.ATReferenceBrowserWidget.ATReferenceBrowserWidget import ReferenceBrowserWidget


TablePageSchema = ATDocumentSchema.copy() + atapi.Schema(
    (
        atapi.TextField(
            "textBefore",
            required=False,
            searchable=True,
            storage=atapi.AnnotationStorage(migrate=True),
            validators=("isTidyHtmlWithCleanup",),
            default_output_type="text/x-html-safe",
            widget=atapi.RichWidget(
                label=_(u"label_text_before", default=u"Text before the table"),
                visible={"view": "invisible", "edit": "visible"},
                rows=25,
                allow_file_upload=zconf.ATDocument.allow_document_upload,
            ),
        ),
开发者ID:sureshvv,项目名称:collective.tablepage,代码行数:31,代码来源:tablepage.py

示例15: Schema

from vindula.themedefault.browser.viewlets import MenuViewlet 

from zope.interface import Interface

from vindula.implantacao.content.interfaces import IImplantacao
from Products.ATContentTypes.content.document import ATDocumentSchema
from Products.ATContentTypes.content.document import ATDocumentBase
from Products.SmartColorWidget.Widget import SmartColorWidget

from zope.interface import implements
from Products.Archetypes.atapi import *
from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from vindula.implantacao.config import *

Implantacao_schema =  ATDocumentSchema.copy() + Schema((

                                                     
#Layout  -------------------------------------
    ImageField(
        name='logoCabecalho',
        widget=ImageWidget(
            label=_(u"Logo do cabeçalho"),
            description=_(u""),
            label_msgid='vindula_themedefault_label_logoCabecalho',
            description_msgid='vindula_themedefault_help_logoCabecalho',
            i18n_domain='vindula_implantacao',
        ),
        schemata = 'Layout',
    ),
    
开发者ID:vindula,项目名称:vindula.implantacao,代码行数:30,代码来源:implantacao.py


注:本文中的Products.ATContentTypes.content.document.ATDocumentSchema类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。