本文整理汇总了Python中Products.ATContentTypes.content.document.ATDocumentSchema.copy方法的典型用法代码示例。如果您正苦于以下问题:Python ATDocumentSchema.copy方法的具体用法?Python ATDocumentSchema.copy怎么用?Python ATDocumentSchema.copy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Products.ATContentTypes.content.document.ATDocumentSchema
的用法示例。
在下文中一共展示了ATDocumentSchema.copy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from Products.ATContentTypes.content.document import ATDocumentSchema [as 别名]
# 或者: from Products.ATContentTypes.content.document.ATDocumentSchema import copy [as 别名]
label=_(u'call_award_notice_corrigendum_label',
default=u'Award notice corrigendum'),
description=_(
u'call_award_notice_corrigendum_description',
default=u'Select the file with the award notice corrigendum'),
allow_search=0,
restrict_browsing_to_startup_directory=1,
force_close_on_insert=1,
),
relationship='award_notice_corrigendum_attachment',
),
),
)
CallForContractors_schema = BaseSchema.copy() + \
schema.copy() +\
ConstrainTypesMixinSchema.copy() +\
NextPreviousAwareSchema.copy()
finalizeATCTSchema(CallForContractors_schema)
unwantedFields = ('rights', 'contributors', 'allowDiscussion', 'location',
'creators', 'creation_date', 'modification_date', 'nextPreviousEnabled',
'excludeFromNav', 'tableContents', 'presentation', 'language')
for name in unwantedFields:
CallForContractors_schema[name].widget.visible['edit'] = 'invisible'
CallForContractors_schema[name].widget.visible['view'] = 'invisible'
CallForContractors_schema.changeSchemataForField(name, 'default')
示例2: Schema
# 需要导入模块: from Products.ATContentTypes.content.document import ATDocumentSchema [as 别名]
# 或者: from Products.ATContentTypes.content.document.ATDocumentSchema import copy [as 别名]
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',
示例3: ISendAsPDFTool
# 需要导入模块: from Products.ATContentTypes.content.document import ATDocumentSchema [as 别名]
# 或者: from Products.ATContentTypes.content.document.ATDocumentSchema import copy [as 别名]
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(
示例4: BlobField
# 需要导入模块: from Products.ATContentTypes.content.document import ATDocumentSchema [as 别名]
# 或者: from Products.ATContentTypes.content.document.ATDocumentSchema import copy [as 别名]
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'),
示例5: Schema
# 需要导入模块: from Products.ATContentTypes.content.document import ATDocumentSchema [as 别名]
# 或者: from Products.ATContentTypes.content.document.ATDocumentSchema import copy [as 别名]
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'),
示例6: Schema
# 需要导入模块: from Products.ATContentTypes.content.document import ATDocumentSchema [as 别名]
# 或者: from Products.ATContentTypes.content.document.ATDocumentSchema import copy [as 别名]
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"),
示例7: getattr
# 需要导入模块: from Products.ATContentTypes.content.document import ATDocumentSchema [as 别名]
# 或者: from Products.ATContentTypes.content.document.ATDocumentSchema import copy [as 别名]
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
示例8: PositionalAccuracy
# 需要导入模块: from Products.ATContentTypes.content.document import ATDocumentSchema [as 别名]
# 或者: from Products.ATContentTypes.content.document.ATDocumentSchema import copy [as 别名]
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
示例9: Malad
# 需要导入模块: from Products.ATContentTypes.content.document import ATDocumentSchema [as 别名]
# 或者: from Products.ATContentTypes.content.document.ATDocumentSchema import copy [as 别名]
#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)
示例10: Schema
# 需要导入模块: from Products.ATContentTypes.content.document import ATDocumentSchema [as 别名]
# 或者: from Products.ATContentTypes.content.document.ATDocumentSchema import copy [as 别名]
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(
示例11: Schema
# 需要导入模块: from Products.ATContentTypes.content.document import ATDocumentSchema [as 别名]
# 或者: from Products.ATContentTypes.content.document.ATDocumentSchema import copy [as 别名]
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(
示例12: HelpCenterHowTo
# 需要导入模块: from Products.ATContentTypes.content.document import ATDocumentSchema [as 别名]
# 或者: from Products.ATContentTypes.content.document.ATDocumentSchema import copy [as 别名]
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 ' \
示例13: Schema
# 需要导入模块: from Products.ATContentTypes.content.document import ATDocumentSchema [as 别名]
# 或者: from Products.ATContentTypes.content.document.ATDocumentSchema import copy [as 别名]
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,
示例14:
# 需要导入模块: from Products.ATContentTypes.content.document import ATDocumentSchema [as 别名]
# 或者: from Products.ATContentTypes.content.document.ATDocumentSchema import copy [as 别名]
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',
),
),
))
示例15:
# 需要导入模块: from Products.ATContentTypes.content.document import ATDocumentSchema [as 别名]
# 或者: from Products.ATContentTypes.content.document.ATDocumentSchema import copy [as 别名]
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,
),
),