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


Python Schema.copy方法代码示例

本文整理汇总了Python中Products.Archetypes.atapi.Schema.copy方法的典型用法代码示例。如果您正苦于以下问题:Python Schema.copy方法的具体用法?Python Schema.copy怎么用?Python Schema.copy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Products.Archetypes.atapi.Schema的用法示例。


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

示例1: Schema

# 需要导入模块: from Products.Archetypes.atapi import Schema [as 别名]
# 或者: from Products.Archetypes.atapi.Schema import copy [as 别名]
from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin
from Products.CMFCore.utils import UniqueObject
from Products.DCWorkflow.Transitions import TRIGGER_USER_ACTION

#from zLOG import LOG, INFO, ERROR
from Products.ECAssignmentBox.tool.Statistics import Statistics
from Products.ECAssignmentBox.tool.interfaces import IECABTool
from Products.ECAssignmentBox import config
from Products.ECAssignmentBox import LOG

schema = Schema((
),
)

ECABTool_schema = BaseSchema.copy() + schema.copy()

class ECABTool(UniqueObject, BaseContent, BrowserDefaultMixin):
    """
    """
    security = ClassSecurityInfo()
    implements(IECABTool)
    meta_type = 'ECABTool'
    plone_tool = True
    _at_rename_after_creation = True

    schema = ECABTool_schema

    def __init__(self, id=None):
        """
        Tool-constructors have no id argument, the id is fixed
开发者ID:collective,项目名称:ECAssignmentBox,代码行数:32,代码来源:ECABTool.py

示例2: Schema

# 需要导入模块: from Products.Archetypes.atapi import Schema [as 别名]
# 或者: from Products.Archetypes.atapi.Schema import copy [as 别名]
""" Requestor folder
"""
from AccessControl import ClassSecurityInfo
from Products.Archetypes.atapi import registerType, Schema
from Products.ATContentTypes.content.folder import ATBTreeFolder
from Products.EEAEnquiry.config import PROJECTNAME
from Products.CMFCore.permissions import ModifyPortalContent

schema = Schema((

),
)

EnquiryRequestorFolder_schema = getattr(
    ATBTreeFolder, 'schema', Schema(())).copy() + schema.copy()

class EnquiryRequestorFolder(ATBTreeFolder):
    """ Enquiry Requestor Folder
    """
    security = ClassSecurityInfo()

    # This name appears in the 'add' box
    archetype_name = 'EnquiryRequestorFolder'
    meta_type = 'EnquiryRequestorFolder'
    portal_type = 'EnquiryRequestorFolder'
    allowed_content_types = ['EnquiryRequestor'] + list(
        getattr(ATBTreeFolder, 'allowed_content_types', []))
    filter_content_types = 1
    global_allow = 0
    immediate_view = 'base_view'
    default_view = 'base_view'
开发者ID:eea,项目名称:Products.EEAEnquiry,代码行数:33,代码来源:EnquiryRequestorFolder.py

示例3: BoutiqueItem

# 需要导入模块: from Products.Archetypes.atapi import Schema [as 别名]
# 或者: from Products.Archetypes.atapi.Schema import copy [as 别名]
            i18n_domain='gites',
        ),
        required=1,
        storage=AttributeStorage()
    ),

),
)

##code-section after-local-schema #fill in your manual code here
schema['photo'].sizes = {'large': (900, 421),
                         'thumb': (240, 156)}
##/code-section after-local-schema

BoutiqueItem_schema = BaseFolderSchema.copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
BoutiqueItem_schema = ATFolder.schema.copy() + \
    schema.copy()

##/code-section after-schema


class BoutiqueItem(ATFolder):
    """
    """
    implements(IBoutiqueItem)
    security = ClassSecurityInfo()
    __implements__ = (getattr(ATFolder, '__implements__', ()))
开发者ID:gitesdewallonie,项目名称:gites.core,代码行数:32,代码来源:boutiqueitem.py

示例4: PoiIssue

# 需要导入模块: from Products.Archetypes.atapi import Schema [as 别名]
# 或者: from Products.Archetypes.atapi.Schema import copy [as 别名]
                        u"Tags can be used to add arbitrary categorisation to "
                        u"issues. The list below shows existing tags which "
                        u"you can select, or you can add new ones."
                    ),
                ),
            ),
            searchable=True,
            vocabulary="getTagsVocab",
            enforceVocabulary=False,
            write_permission=permissions.ModifyIssueTags,
            accessor="Subject",
        ),
    )
)

PoiIssue_schema = BaseFolderSchema.copy() + schema.copy()
PoiIssue_schema.moveField("subject", after="watchers")


class PoiIssue(BaseFolder, BrowserDefaultMixin):
    """The default tracker
    """

    _at_rename_after_creation = True
    archetype_name = "Issue"
    implements(IIssue)
    meta_type = "PoiIssue"
    portal_type = "PoiIssue"
    schema = PoiIssue_schema
    security = ClassSecurityInfo()
开发者ID:pabo3000,项目名称:Products.Poi,代码行数:32,代码来源:PoiIssue.py

示例5: DavizDataField

# 需要导入模块: from Products.Archetypes.atapi import Schema [as 别名]
# 或者: from Products.Archetypes.atapi.Schema import copy [as 别名]
        )
    ),
    DavizDataField('dataOwner', alias="owner",
        schemata='default',
        vocabulary_factory=OrganisationsVocabulary,
        widget=OrganisationsWidget(
            label=_("Data source Organisation"),
            description=_("Specify data source Organisation"),
            i18n_domain="eea",
            visible={'edit': 'invisible', 'view': 'invisible'}
        )
    ),

))

DAVIZ_SCHEMA = ATFolder.schema.copy() + SCHEMA.copy()

def finalizeSchema(schema=DAVIZ_SCHEMA):
    """ Reorder and update schemata
    """
    # Move all fields to Metadata schemata
    for field in schema.fields():
        # Leave this fields in their original schemata
        if field.schemata == 'data input':
            continue

        # We use schema extender for this fields, so leave them in
        # categorization tab
        if field.getName() in ('subject', 'location', 'themes'):
            field.schemata = 'categorization'
            continue
开发者ID:alecghica,项目名称:eea.daviz,代码行数:33,代码来源:schema.py

示例6: ECLecture

# 需要导入模块: from Products.Archetypes.atapi import Schema [as 别名]
# 或者: from Products.Archetypes.atapi.Schema import copy [as 别名]
            label = "Body Text",
            label_msgid = "label_body_text",
            description = "Enter course information",
            description_msgid = "help_body_text",
            rows = 18,
            i18n_domain = config.I18N_DOMAIN,
            allow_file_upload = config.ALLOW_DOCUMENT_UPLOAD,

        )
    ),

),
)


ECLecture_schema = SuperSchema.copy() + schema.copy()

if 'directions' in ECLecture_schema:
    # hide directions field if inheriting from ECFolder
    ECLecture_schema['directions'].widget.visible = {'view' : 'invisible',
                                           'edit' : 'invisible' }
    # move inherited fields to separate edit page
    ECLecture_schema['completedStates'].schemata = 'more'
    ECLecture_schema['projectedAssignments'].schemata = 'more'


class ECLecture(SuperClass):
    """A folder which contains lecture information."""
    security = ClassSecurityInfo()

    implements(interfaces.IECLecture)
开发者ID:collective,项目名称:ECLecture,代码行数:33,代码来源:ECLecture.py

示例7: PoiResponse

# 需要导入模块: from Products.Archetypes.atapi import Schema [as 别名]
# 或者: from Products.Archetypes.atapi.Schema import copy [as 别名]
                description="Select the responsible manager for this issue",
                format="flex",
                label_msgid="Poi_label_newResponsibleManager",
                description_msgid="Poi_help_newResponsibleManager",
                i18n_domain="Poi",
            ),
            vocabulary="getManagersVocab",
            default_method="getCurrentResponsibleManager",
            enforceVocabulary=True,
            accessor="getNewResponsibleManager",
            write_permission=permissions.ModifyIssueAssignment,
        ),
    )
)

PoiResponse_schema = BaseSchema.copy() + schema.copy()


class PoiResponse(BaseContent, BrowserDefaultMixin):
    """A response to an issue, added by a project manager. When giving
    a response, the workflow state of the parent issue can be set at
    the same time.
    """

    security = ClassSecurityInfo()
    __implements__ = (
        (getattr(BaseContent, "__implements__", ()),)
        + (getattr(BrowserDefaultMixin, "__implements__", ()),)
        + (Response,)
    )
    implements(IResponse)
开发者ID:veit,项目名称:Products.Poi,代码行数:33,代码来源:PoiResponse.py

示例8: IntegerWidget

# 需要导入模块: from Products.Archetypes.atapi import Schema [as 别名]
# 或者: from Products.Archetypes.atapi.Schema import copy [as 别名]
        required = True,
        default = 0,
        validators = ('isInt', validators.POSITIVE_NUMBER_VALIDATOR_NAME),
        widget = IntegerWidget(
            label = "Projected Number of Assignments",
            label_msgid = "label_projected_assignments",
            description = "Projected number of assignments, 0 means undefined",
            description_msgid = "help_projected_assignments",
            i18n_domain = config.I18N_DOMAIN,
        ),
    ),

),
)

ECFolder_schema = ATFolderSchema.copy() + schema.copy()

class ECFolder(ATFolder):
    """
    """
    security = ClassSecurityInfo()

    implements(interfaces.IECFolder)

    meta_type = 'ECFolder'
    _at_rename_after_creation = True

    schema = ECFolder_schema

    # Methods
    security.declarePrivate('getCompletedStatesVocab')
开发者ID:collective,项目名称:ECAssignmentBox,代码行数:33,代码来源:ECFolder.py

示例9: PoiPscTracker

# 需要导入模块: from Products.Archetypes.atapi import Schema [as 别名]
# 或者: from Products.Archetypes.atapi.Schema import copy [as 别名]
        widget=StringWidget(
            label="Short name",
            description=("Short name for the tracker - should be 'issues' "
                         "to comply with the standards."),
            label_msgid="Poi_label_psctracker_title",
            description_msgid="Poi_description_psctracker_title",
            i18n_domain='Poi',
        ),
        required=False,
        mode="r"
    ),

),
)

PoiPscTracker_schema = PoiTracker_schema.copy() + schema.copy()
PoiPscTracker_schema['title'].required = False
PoiPscTracker_schema['title'].widget.visible = {'edit': 'invisible',
                                                'view': 'visible'}
del PoiPscTracker_schema['availableReleases']


class PoiPscTracker(PoiTracker):
    """Version of the PoiTracker which supports the
    PloneSoftwareCenter. Intended to be added inside a PSCProject.
    """
    _at_rename_after_creation = True
    archetype_name = 'Issue Tracker'
    implements(ITracker)
    meta_type = 'PoiPscTracker'
    portal_type = 'PoiPscTracker'
开发者ID:CMcStone,项目名称:Products.Poi,代码行数:33,代码来源:PoiPscTracker.py

示例10: OrderedClassifiedsCategory

# 需要导入模块: from Products.Archetypes.atapi import Schema [as 别名]
# 或者: from Products.Archetypes.atapi.Schema import copy [as 别名]
                   'mini': (200, 200),
                   'thumb': (128, 128),
                   'tile': (64, 64),
                   'icon': (32, 32),
                   'listing': (16, 16),
                  },
    ),
),
)

OrderedClassifiedsCategory_schema = document.ATDocumentSchema.copy()
OrderedClassifiedsCategory_schema += ConstrainTypesMixinSchema
OrderedClassifiedsCategory_schema += schemata.NextPreviousAwareSchema
OrderedClassifiedsCategory_schema += atapi.Schema((

)) + schema.copy()


schemata.finalizeATCTSchema(OrderedClassifiedsCategory_schema,
                            folderish=True,
                            moveDiscussion=False)


class OrderedClassifiedsCategory(folder.ATFolder):
    """
        Category which can contain Classifieds (such as books),
        Ordered version
    """
    security = ClassSecurityInfo()

    implements(interfaces.IOrderedClassifiedsCategory)
开发者ID:vindula,项目名称:collective.classifieds,代码行数:33,代码来源:OrderedClassifiedsCategory.py

示例11: BooleanField

# 需要导入模块: from Products.Archetypes.atapi import Schema [as 别名]
# 或者: from Products.Archetypes.atapi.Schema import copy [as 别名]
                 ),
    BooleanField(
        name='billableProject',
        default="True",
        widget=BooleanWidget(
            label='Billable',
            label_msgid='eXtremeManagement_label_billable',
            i18n_domain='eXtremeManagement')
    ),
), )


FolderSchema = OrderedBaseFolderSchema.copy()
FolderSchema['description'].isMetadata = False
FolderSchema['description'].schemata = 'default'
Project_schema = FolderSchema + DefaultSchema.copy()


class Project(OrderedBaseFolder):
    """
    """
    security = ClassSecurityInfo()
    implements(IXMProject)

    # This name appears in the 'add' box
    archetype_name = 'Project'
    portal_type = meta_type = 'Project'
    typeDescription = "Project"
    typeDescMsgId = 'description_edit_project'
    _at_rename_after_creation = True
    schema = Project_schema
开发者ID:zestsoftware,项目名称:Products.eXtremeManagement,代码行数:33,代码来源:Project.py

示例12: getattr

# 需要导入模块: from Products.Archetypes.atapi import Schema [as 别名]
# 或者: from Products.Archetypes.atapi.Schema import copy [as 别名]
        keepReferencesOnCopy=True,
        accessor="get_related_items",
        edit_accessor="get_raw_related_items",
        mutator="set_related_items",
        widget=EEAReferenceBrowserWidget(
            label="Answers to policy question and related EEAFigures",
            description='Answers to policy question and related EEAFigures',
            label_msgid='indicators_label_question_answered',
            i18n_domain='indicators',
            macro="assessmentpart_relationwidget",
        )
    ),
))

AssessmentPart_schema = ATFolderSchema.copy() + \
    getattr(ATCTContent, 'schema', Schema(())).copy() + schema.copy()

AssessmentPart_schema.moveField('relatedItems', pos=0)
finalizeATCTSchema(AssessmentPart_schema)


class AssessmentPart(ATFolder, ModalFieldEditableAware,
                     CustomizedObjectFactory, ATCTContent,
                     BrowserDefaultMixin):
    """Assessment part
    """
    security = ClassSecurityInfo()

    implements(interfaces.IAssessmentPart)

    meta_type = 'AssessmentPart'
开发者ID:eea,项目名称:eea.indicators,代码行数:33,代码来源:AssessmentPart.py


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