コード例 #1
0
def initialize(context):
    ##code-section custom-init-top #fill in your manual code here
    ##/code-section custom-init-top

    # imports packages and types for registration

    import LookAndFeel

    # Initialize portal content
    content_types, constructors, ftis = process_types(
        listTypes(PROJECTNAME),
        PROJECTNAME)

    cmfutils.ContentInit(
        PROJECTNAME + ' Content',
        content_types      = content_types,
        permission         = DEFAULT_ADD_CONTENT_PERMISSION,
        extra_constructors = constructors,
        fti                = ftis,
        ).initialize(context)

    # Apply customization-policy, if theres any
    if CustomizationPolicy and hasattr(CustomizationPolicy, 'register'):
        CustomizationPolicy.register(context)
        print 'Customization policy for BungeniSkinPanafrica installed'
コード例 #2
0
ファイル: __init__.py プロジェクト: uwosh/UWOshOIE
def initialize(context):
    # imports packages and types for registration
    from Products.validation import validation
    validation.register(validators.ReferenceValidator('ReferenceValidator'))
    validation.register(validators.isValidYearValidator('isValidYearValidator'))
    validation.register(validators.isDifficultToWalkValidator('isDifficultToWalkValidator'))
    validation.register(validators.orientationSession2hoursValidator('orientationSession2hoursValidator'))
    validation.register(validators.orientationSession2DateValidator('orientationSession2DateValidator'))
    validation.register(validators.orientationConflictDateValidator('orientationConflictDateValidator'))
    validation.register(validators.financialAidValidator('financialAidValidator'))
    
    import content

    # initialize portal content
    content_types, constructors, ftis = process_types(
        listTypes(PROJECTNAME),
        PROJECTNAME)

    utils.ContentInit(
        PROJECTNAME + ' Content',
        content_types      = content_types,
        permission         = DEFAULT_ADD_CONTENT_PERMISSION,
        extra_constructors = constructors,
        fti                = ftis,
        ).initialize(context)

    # apply customization-policy, if theres any
    if CustomizationPolicy and hasattr(CustomizationPolicy, 'register'):
        CustomizationPolicy.register(context)
        print 'Customization policy for UWOshOIE installed'
コード例 #3
0
def initialize(context):
    ##code-section custom-init-top #fill in your manual code here
    ##/code-section custom-init-top

    # imports packages and types for registration

    import Custodian
    import Harvester
    import Log
    import Metadata
    import MetadataManager
    import Standard    
    import Logs
#    import MetadataCollection
    import LogContainer
    import Archive

    # Initialize portal content
    content_types, constructors, ftis = process_types(
        listTypes(PROJECTNAME),
        PROJECTNAME)

    cmfutils.ContentInit(
        PROJECTNAME + ' Content',
        content_types      = content_types,
        permission         = DEFAULT_ADD_CONTENT_PERMISSION,
        extra_constructors = constructors,
        fti                = ftis,
        ).initialize(context)

    # Apply customization-policy, if theres any
    if CustomizationPolicy and hasattr(CustomizationPolicy, 'register'):
        CustomizationPolicy.register(context)
        print 'Customization policy for ZMetadata installed'
コード例 #4
0
ファイル: __init__.py プロジェクト: collective/collective.ads
def initialize(context):
    """Initializer called when used as a Zope 2 product."""
    ##code-section custom-init-top #fill in your manual code here
    ##/code-section custom-init-top

    # imports packages and types for registration
    import content
    import admin

    content_types, constructors, ftis = process_types(
        listTypes(PROJECTNAME),
        PROJECTNAME)

    cmfutils.ContentInit(
        PROJECTNAME + ' Content',
        content_types      = content_types,
        permission         = DEFAULT_ADD_CONTENT_PERMISSION,
        extra_constructors = constructors,
        fti                = ftis,
        ).initialize(context)
        
    tools = [admin.AdsAdmin.AdsAdmin]
    ToolInit("%s Tool" % PROJECTNAME,
                    tools=tools,
                    icon="browser/images/adminicon.gif",
                   ).initialize(context)
    # Apply customization-policy, if theres any
    if CustomizationPolicy and hasattr(CustomizationPolicy, 'register'):
        CustomizationPolicy.register(context)
        print 'Customization policy for Ads installed'
コード例 #5
0
def initialize(context):
    ##code-section custom-init-top #fill in your manual code here
    ##/code-section custom-init-top

    # imports packages and types for registration
    import tools


    # Initialize portal tools
    tools = [tools.password_tool.password_tool]
    ToolInit( PROJECTNAME +' Tools',
                tools = tools,
                icon='tool.gif'
                ).initialize( context )

    # Initialize portal content
    content_types, constructors, ftis = process_types(
        listTypes(PROJECTNAME),
        PROJECTNAME)

    cmfutils.ContentInit(
        PROJECTNAME + ' Content',
        content_types      = content_types,
        permission         = DEFAULT_ADD_CONTENT_PERMISSION,
        extra_constructors = constructors,
        fti                = ftis,
        ).initialize(context)

    # Apply customization-policy, if theres any
    if CustomizationPolicy and hasattr(CustomizationPolicy, 'register'):
        CustomizationPolicy.register(context)
        print 'Customization policy for SERPROSenha installed'
コード例 #6
0
ファイル: __init__.py プロジェクト: a25kk/mp-bbb
def initialize(portal):
  import content.TabbedSubpages

  content_types, constructors, ftis = \
    process_types(listTypes(PROJECTNAME), PROJECTNAME)

  utils.ContentInit(
    PROJECTNAME,
    content_types      = content_types,
    permission         = AddTabbedSubpages,
    extra_constructors = constructors,
    fti                = ftis,
    ).initialize(portal)

  if CustomizationPolicy and hasattr(CustomizationPolicy, 'register'):
    CustomizationPolicy.register(context)
    print 'Customizationpolicy for %s installed' % PROJECTNAME
コード例 #7
0
ファイル: __init__.py プロジェクト: liberiun/cynin-intranet
def initialize(context):
    # Initialize portal content
    content_types, constructors, ftis = process_types(
        listTypes(PROJECTNAME),
        PROJECTNAME)

    cmfutils.ContentInit(
        PROJECTNAME + ' Content',
        content_types      = content_types,
        permission         = DEFAULT_ADD_CONTENT_PERMISSION,
        extra_constructors = constructors,
        fti                = ftis,
        ).initialize(context)

    # Apply customization-policy, if theres any
    if CustomizationPolicy and hasattr(CustomizationPolicy, 'register'):
        CustomizationPolicy.register(context)
        print 'Customization policy for ZipFileTransport installed'
コード例 #8
0
ファイル: __init__.py プロジェクト: a25kk/stv2
def initialize(context):
    ##code-section custom-init-top #fill in your manual code here
    ##/code-section custom-init-top

    # imports packages and types for registration
    import interfaces
    import content

    import WindowZTool

    # Initialize portal tools
    tools = [WindowZTool.WindowZTool]
    ToolInit( PROJECTNAME +' Tools',
                tools = tools,
                icon='tool.gif'
                ).initialize( context )

    # Initialize portal content
    all_content_types, all_constructors, all_ftis = process_types(
        listTypes(PROJECTNAME),
        PROJECTNAME)

    cmfutils.ContentInit(
        PROJECTNAME + ' Content',
        content_types      = all_content_types,
        permission         = DEFAULT_ADD_CONTENT_PERMISSION,
        extra_constructors = all_constructors,
        fti                = all_ftis,
        ).initialize(context)

    # Give it some extra permissions to control them on a per class limit
    for i in range(0,len(all_content_types)):
        klassname=all_content_types[i].__name__
        if not klassname in ADD_CONTENT_PERMISSIONS:
            continue

        context.registerClass(meta_type   = all_ftis[i]['meta_type'],
                              constructors= (all_constructors[i],),
                              permission  = ADD_CONTENT_PERMISSIONS[klassname])

    # Apply customization-policy, if theres any
    if CustomizationPolicy and hasattr(CustomizationPolicy, 'register'):
        CustomizationPolicy.register(context)
        print 'Customization policy for windowZ installed'
コード例 #9
0
ファイル: __init__.py プロジェクト: a25kk/stv2
def initialize(context):
    ##code-section custom-init-top #fill in your manual code here
    ##/code-section custom-init-top

    # imports packages and types for registration
    import content
    import interfaces

    import utilities
    import contenthandler

    # Initialize portal content
    content_types, constructors, ftis = process_types(
        listTypes(PROJECTNAME),
        PROJECTNAME)

    cmfutils.ContentInit(
        PROJECTNAME + ' Content',
        content_types      = content_types,
        permission         = DEFAULT_ADD_CONTENT_PERMISSION,
        extra_constructors = constructors,
        fti                = ftis,
        ).initialize(context)

    # Apply customization-policy, if theres any
    if CustomizationPolicy and hasattr(CustomizationPolicy, 'register'):
        CustomizationPolicy.register(context)
        print 'Customization policy for feedfeeder installed'

    ##code-section custom-init-bottom #fill in your manual code here
    profile_registry.registerProfile(
        name='default',
        title='Feedfeeder',
        description='Profile for Feedfeeder',
        path='profiles/default',
        product='feedfeeder',
        profile_type=EXTENSION,
        for_=Products.CMFPlone.interfaces.IPloneSiteRoot)
コード例 #10
0
try: