def initialize(context): """Initializer called when used as a Zope 2 product. """ import easyshop.search.content # Register skin directory DirectoryView.registerDirectory('skins', globals())
def initialize(context): import Warenkorb import SimpleProduct import DefaultProduct # Register skin directory DirectoryView.registerDirectory("skins", globals()) content_types, constructors, ftis = process_types(listTypes(PROJECTNAME), PROJECTNAME) utils.ContentInit( PROJECTNAME + " Warenkorb", content_types=content_types, permission=ADD_CONTENT_PERMISSION, extra_constructors=constructors, fti=ftis, ).initialize(context) utils.ContentInit( PROJECTNAME + " Simple Product", content_types=content_types, permission=ADD_CONTENT_PERMISSION, extra_constructors=constructors, fti=ftis, ).initialize(context) utils.ContentInit( PROJECTNAME + " Default Product", content_types=content_types, permission=ADD_CONTENT_PERMISSION, extra_constructors=constructors, fti=ftis, ).initialize(context)
def initialize(context): from gocept.alphaflow import patch_plone_types DirectoryView.registerDirectory(config.SKINS_DIR, config.GLOBALS) initialize_tools(context) initialize_content(context) initialize_index(context)
def setup_site(site): # In 2.5, install the subtyper profile: mt = cmfutils.getToolByName(site, 'portal_migration') plone_version = mt.getInstanceVersion() # Register profile for Plone 3. if int(plone_version[0]) >= 3: quickinstaller_tool = getToolByName(site, 'portal_quickinstaller') quickinstaller_tool.installProduct('p4a.subtyper') if plone_version[0:3] == '2.5': # Setup only needed for Plone 3.0 skin_tool = cmfutils.getToolByName(site, 'portal_skins') path = None for path in DirectoryView.manage_listAvailableDirectories(): if path.endswith('p4a_subtyper'): break assert(path is None, "Subtyper skin directory not found") if 'p4a_subtyper' not in skin_tool.objectIds(): DirectoryView.createDirectoryView(skin_tool, path) for skin_name, paths in skin_tool.getSkinPaths(): if not 'p4a_subtyper' in paths: paths = paths.split(',') index = paths.index('plone_templates') paths.insert(index, 'p4a_subtyper') paths = ','.join(paths) skin_tool._getSelections()[skin_name] = paths
def initialize(context): """Initializer called when used as a Zope 2 product.""" # Register Plone skins directory from Products.CMFCore import DirectoryView GLOBALS = globals() DirectoryView.registerDirectory('skins', GLOBALS)
def initialize(context): """ """ from Products.CMFCore import DirectoryView # This is required. # For some reason you cannot register a skin # directory for a non-theme product through # zcml DirectoryView.registerDirectory('skins', globals())
def initialize(context): """Initializer called when used as a Zope 2 product. """ DirectoryView.registerDirectory('skins', globals()) # register profile profile_registry.registerProfile( name='default', title='EasyShopSkins', description='Skinsfolder for EasyShop for Plone 2.5', path='profiles/default', product='EasyShopSkins', profile_type=EXTENSION, for_=IPloneSiteRoot)
def initialize(context): """Initializer called when used as a Zope 2 product. """ DirectoryView.registerDirectory('skins', globals()) # register profile profile_registry.registerProfile( name = 'default', title = 'EasyShopSkins', description = 'Skinsfolder for EasyShop for Plone 2.5', path = 'profiles/default', product = 'EasyShopSkins', profile_type = EXTENSION, for_ = IPloneSiteRoot)
def setUp(self): from Products.CMFCore.DirectoryView import DirectoryView NodeAdapterTestCase.setUp(self) _DVRegistrySetup.setUp(self) self._obj = DirectoryView('foo_directoryview').__of__(Folder()) self._XML = _DIRECTORYVIEW_XML
def _populate(self, obj): from Products.CMFCore.DirectoryView import DirectoryView obj._setObject('foo_directoryview', DirectoryView('foo_directoryview', 'CMFCore/exportimport/tests/one')) obj.addSkinSelection('foo_path', 'one')
def _initSite(self, selections={}, ids=()): from Products.CMFCore.DirectoryView import DirectoryView site = DummySite() fsdvs = [ (id, DirectoryView(id, 'CMFCore/exportimport/tests/%s' % id)) for id in ids ] site._setObject('portal_skins', DummySkinsTool(selections, fsdvs)) site.REQUEST = 'exists' return site
def setUp(self): from Products.CMFCore import DirectoryView self._olddirreg = DirectoryView._dirreg DirectoryView._dirreg = DirectoryView.DirectoryRegistry() self._dirreg = DirectoryView._dirreg self._dirreg.registerDirectory('one', globals()) self._dirreg.registerDirectory('two', globals()) self._dirreg.registerDirectory('three', globals()) self._dirreg.registerDirectory('four', globals())
def setUp(self): import Products.CMFCore.exportimport from Products.CMFCore.DirectoryView import DirectoryView NodeAdapterTestCase.setUp(self) _DVRegistrySetup.setUp(self) zcml.load_config('configure.zcml', Products.CMFCore.exportimport) self._obj = DirectoryView('foo_directoryview').__of__(Folder()) self._XML = _DIRECTORYVIEW_XML
def _initSite(self, selections={}, ids=()): from Products.CMFCore.DirectoryView import DirectoryView site = DummySite() fsdvs = [ (id, DirectoryView(id, 'Products.CMFCore.exportimport.tests:%s' % id)) for id in ids ] stool = DummySkinsTool(selections, fsdvs).__of__(site) getSiteManager().registerUtility(stool, ISkinsTool) site.REQUEST = 'exists' return site, stool
def setup_site(site): # In 2.5, install the subtyper profile: mt = cmfutils.getToolByName(site, 'portal_migration') plone_version = mt.getInstanceVersion() if plone_version[0:3] == '2.5': # Setup only needed for Plone 3.0 skin_tool = cmfutils.getToolByName(site, 'portal_skins') path = None for path in DirectoryView.manage_listAvailableDirectories(): if path.endswith('p4a_subtyper'): break assert (path is None, "Subtyper skin directory not found") if 'p4a_subtyper' not in skin_tool.objectIds(): DirectoryView.createDirectoryView(skin_tool, path) for skin_name, paths in skin_tool.getSkinPaths(): if not 'p4a_subtyper' in paths: paths = paths.split(',') index = paths.index('plone_templates') paths.insert(index, 'p4a_subtyper') paths = ','.join(paths) skin_tool._getSelections()[skin_name] = paths
def initialize(context): """Initializer called when used as a Zope 2 product. This is referenced from configure.zcml. Regstrations as a "Zope 2 product" is necessary for GenericSetup profiles to work, for example. Here, we call the Archetypes machinery to register our content types with Zope and the CMF. """ # Register Plone skins directory from Products.CMFCore import DirectoryView GLOBALS = globals() DirectoryView.registerDirectory('skins', GLOBALS) # Retrieve the content types that have been registered with Archetypes # This happens when the content type is imported and the registerType() # call in the content type's module is invoked. Actually, this happens # during ZCML processing, but we do it here again to be explicit. Of # course, even if we import the module several times, it is only run # once. content_types, constructors, ftis = atapi.process_types( atapi.listTypes(config.PROJECTNAME), config.PROJECTNAME) # Now initialize all these content types. The initialization process takes # care of registering low-level Zope 2 factories, including the relevant # add-permission. These are listed in config.py. We use different # permissions for each content type to allow maximum flexibility of who # can add which content types, where. The roles are set up in rolemap.xml # in the GenericSetup profile. for atype, constructor in zip(content_types, constructors): utils.ContentInit('%s: %s' % (config.PROJECTNAME, atype.portal_type), content_types = (atype,), permission = config.ADD_PERMISSIONS[atype.portal_type], extra_constructors = (constructor,), ).initialize(context)
def initialize(context): """initialize product (called by zope)""" import VwireLens import config import setuphandlers from Products.Archetypes.atapi import process_types from Products.Archetypes.atapi import listTypes from Products.CMFCore import utils from Products.CMFCore import DirectoryView DirectoryView.registerDirectory('skins', config.product_globals) content_types, constructors, ftis = process_types( listTypes(config.PROJECTNAME), config.PROJECTNAME) utils.ContentInit( "%s Content" % config.PROJECTNAME, content_types = content_types, permission = config.ADD_CONTENT_PERMISSIONS['VwireLens'], extra_constructors = constructors, fti = ftis, ).initialize(context)
logger.debug('Installing Product') import os import os.path from Globals import package_home import Products.CMFPlone.interfaces from Products.Archetypes import listTypes from Products.Archetypes.atapi import * from Products.Archetypes.utils import capitalize from Products.CMFCore import DirectoryView from Products.CMFCore import permissions as cmfpermissions from Products.CMFCore import utils as cmfutils from Products.CMFPlone.utils import ToolInit from config import * DirectoryView.registerDirectory('skins', product_globals) ##code-section custom-init-head #fill in your manual code here ##/code-section custom-init-head def initialize(context): """initialize product (called by zope)""" ##code-section custom-init-top #fill in your manual code here ##/code-section custom-init-top # imports packages and types for registration import content
# -*- coding: utf-8 -*- ## Copyright (C)2007 Ingeniweb ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## You should have received a copy of the GNU General Public License ## along with this program; see the file COPYING. If not, write to the ## Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ This just makes it a Product $Id$ """ # We just put the minimal stuff to have our layer registered from Products.CMFCore import DirectoryView from config import GLOBALS DirectoryView.registerDirectory('skins', GLOBALS)
from Globals import package_home from Products.CMFCore import utils as cmfutils try: # New CMF from Products.CMFCore import permissions as CMFCorePermissions except: # Old CMF from Products.CMFCore import CMFCorePermissions from Products.CMFCore import DirectoryView from Products.CMFPlone.utils import ToolInit from Products.Archetypes.atapi import * from Products.Archetypes import listTypes from Products.Archetypes.utils import capitalize from config import * DirectoryView.registerDirectory('skins', product_globals) DirectoryView.registerDirectory('skins/TKContactManager', product_globals) from Products.GenericSetup import EXTENSION from Products.GenericSetup import profile_registry from Products.CMFPlone.interfaces import IPloneSiteRoot ##code-section custom-init-head #fill in your manual code here ##/code-section custom-init-head 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
from Globals import package_home from Products.CMFCore import utils as cmfutils try: # New CMF from Products.CMFCore import permissions as CMFCorePermissions except: # Old CMF from Products.CMFCore import CMFCorePermissions from Products.CMFCore import DirectoryView from Products.CMFPlone.utils import ToolInit from Products.Archetypes.atapi import * from Products.Archetypes import listTypes from Products.Archetypes.utils import capitalize from config import * DirectoryView.registerDirectory('skins', product_globals) DirectoryView.registerDirectory('skins/CasosDeSucesso', product_globals) ##code-section custom-init-head #fill in your manual code here from Products.validation import validation from Products.CasosDeSucesso.casosdesucesso_validators import isNumberValidator from Products.CasosDeSucesso.casosdesucesso_validators import isSpaceValidator from Products.CasosDeSucesso.casosdesucesso_validators import isEmailValidator from Products.GenericSetup import EXTENSION, profile_registry from Products.CMFPlone.interfaces import IPloneSiteRoot from AccessControl.User import nobody validation.register(isNumberValidator('isOnlyNumber_Casosdesucesso'))
from Products.Archetypes.public import process_types, listTypes # Products imports import config from Products.PloneArticle.pafti import PloneArticleFactoryTypeInformation from Products.PloneArticle.pafti import manage_addPAFTIForm from Products.PloneArticle.pafti import DynamicAllowedContentFTI from Products.PloneArticle.pafti import manage_addDVTFTIForm from Products.PloneArticle import content, proxy from Products.PloneArticle import tool from Products.PloneArticle import migration # Register skin directories so they can be added to portal_skins DirectoryView.registerDirectory('skins', config.GLOBALS) def initialize(context): # Setup migrations migration.executeMigrations() migration.registerMigrations() # optional demo content if config.INSTALL_EXAMPLES: import examples # register the fti context.registerClass( PloneArticleFactoryTypeInformation, permission=ManagePortal,
from Globals import package_home from Products.CMFCore import utils as cmfutils try: # New CMF from Products.CMFCore import permissions as CMFCorePermissions except: # Old CMF from Products.CMFCore import CMFCorePermissions from Products.CMFCore import DirectoryView from Products.CMFPlone.utils import ToolInit from Products.Archetypes.atapi import * from Products.Archetypes import listTypes from Products.Archetypes.utils import capitalize from config import * DirectoryView.registerDirectory('skins', product_globals) DirectoryView.registerDirectory('skins/UWOshHomecomingSimple', product_globals) ##code-section custom-init-head #fill in your manual code here ##/code-section custom-init-head 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 # Initialize portal content content_types, constructors, ftis = process_types(listTypes(PROJECTNAME),
from Products.CMFCore import utils, DirectoryView from Products.Archetypes.atapi import * from Products.Archetypes import listTypes ADD_CONTENT_PERMISSION = """Add FAQ content""" PROJECTNAME = "FAQ" product_globals = globals() DirectoryView.registerDirectory("skins", product_globals) DirectoryView.registerDirectory("skins/faq", product_globals) def initialize(context): ##Import Types here to register them (were removed by pyflake check!) import FAQ import FAQQuestion content_types, constructors, ftis = process_types(listTypes(PROJECTNAME), PROJECTNAME) utils.ContentInit( PROJECTNAME + " Content", content_types=content_types, permission=ADD_CONTENT_PERMISSION, extra_constructors=constructors, fti=ftis, ).initialize(context)
def setUp(self): BaseRegistryTests.setUp(self) self._olddirreg = DirectoryView._dirreg self._dirreg = DirectoryView._dirreg = DirectoryView.DirectoryRegistry( )
from Globals import package_home from Products.CMFCore import utils as cmfutils from Products.CMFCore import permissions from Products.CMFCore import DirectoryView #from Products.CMFPlone.PloneUtilities import ToolInit from Products.CMFCore import utils from Products.Archetypes.atapi import * from Products.Archetypes import listTypes from Products.Archetypes.utils import capitalize import os, os.path from Products.SearchReferenceWidget.config import * DirectoryView.registerDirectory('skins', product_globals) DirectoryView.registerDirectory('skins/SearchReferenceWidget', product_globals) ##code-section custom-init-head #fill in your manual code here ##/code-section custom-init-head 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 SearchReferenceWidget # Initialize portal content
import Products.CMFPlone.interfaces import os import os.path from Globals import package_home from Products.Archetypes import listTypes from Products.Archetypes.atapi import * from Products.Archetypes.utils import capitalize from Products.CMFCore import DirectoryView from Products.CMFCore import permissions as cmfpermissions from Products.CMFCore import utils as cmfutils from Products.CMFPlone.utils import ToolInit from Products.GenericSetup import EXTENSION from Products.GenericSetup import profile_registry from .config import * DirectoryView.registerDirectory('skins', product_globals) DirectoryView.registerDirectory('skins/flickrgallery', product_globals) ##code-section custom-init-head #fill in your manual code here ##/code-section custom-init-head 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 from . import content # Initialize portal content content_types, constructors, ftis = process_types(listTypes(PROJECTNAME),
def initialize(context): initialize_tool(context) initialize_content(context) DirectoryView.registerDirectory('skins', globals())
from AccessControl import ModuleSecurityInfo from Products.CMFCore import DirectoryView from patches import * osha_globals = globals() PROJECTNAME = 'OSHA 3.0' DirectoryView.registerDirectory('skins', osha_globals) ModuleSecurityInfo('osha.policy.utils').declarePublic('logit') ModuleSecurityInfo('slc.cleanwordpastedtext.utils').declarePublic( 'update_object_history') ModuleSecurityInfo('slc.alertservice.utils').declarePublic( 'encodeEmail') def initialize(context): """Initializer called when used as a Zope 2 product.""" from AccessControl import allow_module allow_module('slc.alertservice')
## Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. from os.path import join import logging LOG = logging.getLogger("TagCloudExplorer") from Products.CMFCore import DirectoryView from Products.CMFCore import utils from config import * import tool ## Register our directory in Zope DirectoryView.registerDirectory("skins", globals()) ## Save the globals for use in the Plone Quick Installer GLOBALS = globals() TOOL = tool.TagCloudExplorerTool def initialize(context): ## Register our tool utils.ToolInit( "%s's Tool" % PROJECT_NAME, tools=(TOOL,), icon= join(SKIN_MAIN, ICON), ).initialize(context)
# can't move modules around because things are stored in the ZODB with the # full module path. However, we can create aliases for backwards compatability. sys.modules['Products.RichDocument.RichDocument'] = content.richdocument sys.modules['Products.RichDocument.FileAttachment'] = attachment_content.file sys.modules['Products.RichDocument.ImageAttachment'] = attachment_content.image sys.modules['Products.RichDocument.widgets'] = widget sys.modules['Products.RichDocument.widget'] = widget sys.modules['Products.RichDocument.ImagesManagerWidget'] = widget.images sys.modules['Products.RichDocument.AttachmentsManagerWidget'] = widget.attachments # Get configuration data, permissions from Products.RichDocument.config import * # Register skin directories so they can be added to portal_skins DirectoryView.registerDirectory('skins', globals()) # Register the TinyMCE Upload adpater if TinyMCE is present try: from Products.RichDocument import tinymce except ImportError: pass def initialize(context): # Import the type, which results in registerType() being called from content import RichDocument # initialize the content, including types and add permissions content_types, constructors, ftis = process_types( listTypes(PROJECTNAME),
# -*- extra stuff goes here -*- from Products.Archetypes.public import * from Products.Archetypes import listTypes from Products.CMFCore import permissions, utils as cmf_utils, DirectoryView from config import PROJECTNAME, SKINS_DIR from sys import modules this_module = modules[ __name__ ] import utils ADD_CONTENT_PERMISSION = permissions.AddPortalContent DirectoryView.registerDirectory(SKINS_DIR, globals()) def initialize(context): """ Initializer called when used as a Zope 2 product. """ import contents content_types, constructors, ftis = process_types( listTypes(PROJECTNAME), PROJECTNAME ) allTypes = zip(content_types, constructors) for atype, constructor in allTypes: kind = "%s: %s" % (PROJECTNAME, atype.archetype_name) cmf_utils.ContentInit( kind, content_types = (atype,), permission = ADD_CONTENT_PERMISSION,
from App.Common import package_home except ImportError: # not sure that we still need to support this from Globals import package_home from zope.i18nmessageid import MessageFactory messageFactory = MessageFactory('atvocabularymanager') from Products.CMFCore import utils as cmfutils from Products.CMFCore import DirectoryView from Products.Archetypes.atapi import * from Products.ATVocabularyManager.config import * from Products.ATVocabularyManager.namedvocabulary import NamedVocabulary DirectoryView.registerDirectory(SKINS_DIR, GLOBALS) DirectoryView.registerDirectory(os.path.join(SKINS_DIR, 'ATVocabularyManager'), GLOBALS) def initialize(context): ##Import Types here to register them import types import tools import utils content_types, constructors, ftis = process_types(listTypes(PROJECTNAME), PROJECTNAME) cmfutils.ToolInit(PROJECTNAME + ' Tools', tools=[tools.VocabularyLibrary],
self._readMetadata() def _updateFromFS(self): # workaround for Python 2.1 multiple inheritance lameness return self._baseUpdateFromFS() def _readMetadata(self): # workaround for Python 2.1 multiple inheritance lameness return self._baseReadMetadata() def __call__(self, *args, **kwargs): return self._call(FSPageTemplate.__call__, *args, **kwargs) InitializeClass(FSPageTemplate) InitializeClass(FSControllerPageTemplate) DirectoryView.registerFileExtension('pt', FSPageTemplate) DirectoryView.registerFileExtension('zpt', FSPageTemplate) DirectoryView.registerFileExtension('html', FSPageTemplate) DirectoryView.registerFileExtension('htm', FSPageTemplate) DirectoryView.registerFileExtension('cpt', FSControllerPageTemplate) DirectoryView.registerMetaType('Page Template', FSPageTemplate) DirectoryView.registerMetaType('Controller Page Template', FSControllerPageTemplate) # Patch the ignore list, so that our .py source files don't show up in skins # folders old_ignore = DirectoryView.ignore_re new_ignore_re = re.compile(r'\.|(.*~$)|#|(.*\.(.?pt|htm.?)\.py$)') DirectoryView.ignore_re = new_ignore_re
## CMF imports from Products.CMFCore.utils import ContentInit from Products.CMFCore import permissions, DirectoryView from Products.CMFCore.utils import registerIcon from zope.i18nmessageid import MessageFactory PloneGazetteFactory = MessageFactory("plonegazette") ## App imports from config import PROJECTNAME from config import product_globals DirectoryView.registerDirectory("skins", product_globals) DirectoryView.registerDirectory("skins/PloneGazette", product_globals) def initialize(context): import NewsletterTheme, Newsletter, Subscriber, NewsletterBTree contentConstructors = (Newsletter.addNewsletter, Subscriber.addSubscriber) contentClasses = (Newsletter.Newsletter, Subscriber.Subscriber) factoryTypes = (Newsletter.Newsletter.factory_type_information, Subscriber.Subscriber.factory_type_information) ContentInit( "Plone Gazette Newsletter Theme", content_types=(NewsletterTheme.NewsletterTheme,), permission=PNLPermissions.AddNewsletterTheme,
## CMF imports from Products.CMFCore.utils import ContentInit from Products.CMFCore import permissions, DirectoryView from Products.CMFCore.utils import registerIcon from zope.i18nmessageid import MessageFactory PloneGazetteFactory = MessageFactory('plonegazette') ## App imports import NewsletterTheme, Newsletter, Subscriber, Section, NewsletterTopic from config import PROJECTNAME from config import product_globals DirectoryView.registerDirectory('skins', product_globals) DirectoryView.registerDirectory('skins/PloneGazette', product_globals) ## Types to register contentConstructors = (Newsletter.addNewsletter, Subscriber.addSubscriber, NewsletterTopic.addNewsletterTopic) contentClasses = (Newsletter.Newsletter, Subscriber.Subscriber, NewsletterTopic.NewsletterTopic) factoryTypes = (Newsletter.Newsletter.factory_type_information, Subscriber.Subscriber.factory_type_information, NewsletterTopic.NewsletterTopic.factory_type_information) ## Patches to apply import patches def initialize(context):
CustomizationPolicy = None from Globals import package_home from Products.CMFCore import utils as cmfutils from Products.CMFCore import permissions as CMFCorePermissions from Products.CMFCore import DirectoryView from Products.CMFPlone.utils import ToolInit from Products.Archetypes.atapi import * from Products.Archetypes import listTypes from Products.Archetypes.utils import capitalize import os, os.path from Products.BungeniDefaultContent.config import * DirectoryView.registerDirectory("skins", product_globals) DirectoryView.registerDirectory("skins/BungeniDefaultContent", product_globals) ##code-section custom-init-head #fill in your manual code here ##/code-section custom-init-head 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 # Initialize portal content content_types, constructors, ftis = process_types(listTypes(PROJECTNAME), PROJECTNAME)
import logging logger = logging.getLogger('AuditTrail') logger.info('Installing Product') import os, os.path from Globals import package_home from Products.CMFCore import utils as cmfutils from Products.CMFCore import permissions as cmfpermissions from Products.CMFCore import DirectoryView from Products.CMFPlone.utils import ToolInit from Products.Archetypes.atapi import * from Products.Archetypes import listTypes from Products.Archetypes.utils import capitalize from config import * DirectoryView.registerDirectory('skins', product_globals) DirectoryView.registerDirectory('skins/AuditTrail', product_globals) ##code-section custom-init-head #fill in your manual code here ##/code-section custom-init-head 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 tools # Initialize portal tools
import logging logger = logging.getLogger('BungeniHelpCenter') logger.info('Installing Product') import os, os.path from Globals import package_home from Products.CMFCore import utils as cmfutils from Products.CMFCore import permissions as cmfpermissions from Products.CMFCore import DirectoryView from Products.CMFPlone.utils import ToolInit from Products.Archetypes.atapi import * from Products.Archetypes import listTypes from Products.Archetypes.utils import capitalize from config import * DirectoryView.registerDirectory('skins', product_globals) DirectoryView.registerDirectory('skins/bungeni_help_center', product_globals) from Products.CMFPlone.interfaces import IPloneSiteRoot from Products.GenericSetup import EXTENSION, profile_registry import monkeypatch 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 logging logger = logging.getLogger('Marginalia') logger.info('Installing Product') import os, os.path from Globals import package_home from Products.CMFCore import utils as cmfutils from Products.CMFCore import permissions as cmfpermissions from Products.CMFCore import DirectoryView from Products.CMFPlone.utils import ToolInit from Products.Archetypes.atapi import * from Products.Archetypes import listTypes from Products.Archetypes.utils import capitalize from config import * DirectoryView.registerDirectory('skins', product_globals) DirectoryView.registerDirectory('skins/marginalia-templates', product_globals) DirectoryView.registerDirectory('skins/marginalia', product_globals) ##code-section custom-init-head #fill in your manual code here ##/code-section custom-init-head from Products.CMFPlone.interfaces import IPloneSiteRoot from Products.GenericSetup import EXTENSION, profile_registry 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 logging logger = logging.getLogger('Marginalia') logger.info('Installing Product') import os, os.path from Globals import package_home from Products.CMFCore import utils as cmfutils from Products.CMFCore import permissions as cmfpermissions from Products.CMFCore import DirectoryView from Products.CMFPlone.utils import ToolInit from Products.Archetypes.atapi import * from Products.Archetypes import listTypes from Products.Archetypes.utils import capitalize from config import * DirectoryView.registerDirectory('skins', product_globals) DirectoryView.registerDirectory('skins/Marginalia', product_globals) ##code-section custom-init-head #fill in your manual code here ##/code-section custom-init-head 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 tools import interfaces
CustomizationPolicy = None from Globals import package_home from Products.CMFCore import utils as cmfutils from Products.CMFCore import CMFCorePermissions from Products.CMFCore import DirectoryView from Products.CMFPlone.utils import ToolInit from Products.Archetypes.atapi import * from Products.Archetypes import listTypes from Products.Archetypes.utils import capitalize import os, os.path from Products.BungeniSkinPanafrica.config import * DirectoryView.registerDirectory('skins', product_globals) DirectoryView.registerDirectory('skins/BungeniSkinPanafrica', product_globals) ##code-section custom-init-head #fill in your manual code here ##/code-section custom-init-head 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
def initialize(context): """Initializer called when used as a Zope 2 product.""" # Register skin directory DirectoryView.registerDirectory('skins', globals())
# Copyright (c) 2004-2006 by BlueDynamics Alliance - Klein & Partner KEG, Austria # # BSD-like licence, see LICENCE.txt # import os from Globals import package_home from Products.CMFCore import utils as cmfutils from Products.CMFCore import DirectoryView from Products.Archetypes.atapi import * from Products.Archetypes.utils import capitalize from Products.ATVocabularyManager.config import * from Products.ATVocabularyManager.namedvocabulary import NamedVocabulary DirectoryView.registerDirectory(SKINS_DIR, GLOBALS) DirectoryView.registerDirectory(os.path.join(SKINS_DIR, 'ATVocabularyManager'), GLOBALS) def initialize(context): ##Import Types here to register them import types import tools import utils content_types, constructors, ftis = process_types(listTypes(PROJECTNAME), PROJECTNAME) cmfutils.ToolInit( PROJECTNAME+' Tools', tools = [tools.VocabularyLibrary], icon='tool.gif'
from Globals import package_home from Products.CMFCore import utils as cmfutils try: # New CMF from Products.CMFCore import permissions as CMFCorePermissions except: # Old CMF from Products.CMFCore import CMFCorePermissions from Products.CMFCore import DirectoryView from Products.CMFPlone.utils import ToolInit from Products.Archetypes.atapi import * from Products.Archetypes import listTypes from Products.Archetypes.utils import capitalize from config import * DirectoryView.registerDirectory('skins', product_globals) DirectoryView.registerDirectory('skins/Announcements', product_globals) ##code-section custom-init-head #fill in your manual code here ##/code-section custom-init-head 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 Announcement import AnnouncementsFolder
CustomizationPolicy = None from Globals import package_home from Products.CMFCore import utils as cmfutils from Products.CMFCore import permissions from Products.CMFCore import DirectoryView from Products.CMFPlone.utils import ToolInit from Products.Archetypes.atapi import * from Products.Archetypes import listTypes from Products.Archetypes.utils import capitalize import os, os.path from Products.ZipFileTransport.config import * DirectoryView.registerDirectory('skins', product_globals) DirectoryView.registerDirectory('skins/ZipFileTransport', product_globals) 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)
# Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ Initialization """ from zope.i18nmessageid import MessageFactory from AccessControl import ModuleSecurityInfo from Products.CMFCore import DirectoryView from Products.CMFCore import utils import DefaultWorkflowPolicy import PlacefulWorkflowTool import WorkflowPolicyConfig tools = (PlacefulWorkflowTool.PlacefulWorkflowTool, ) DirectoryView.registerDirectory('skins', globals()) # Initialization method def initialize(context): utils.registerIcon( DefaultWorkflowPolicy.DefaultWorkflowPolicyDefinition, 'images/workflow_policy.gif', globals()) context.registerClass( PlacefulWorkflowTool.PlacefulWorkflowTool, meta_type="Placeful Workflow Tool", constructors=(PlacefulWorkflowTool.addPlacefulWorkflowTool, ), icon='tool.gif')
from Products.CMFCore import DirectoryView GLOBALS = globals() ATTR = 'Solgema.PortletsManager' DirectoryView.registerDirectory('skins', GLOBALS) def initialize(context): """Initializer called when used as a Zope 2 product."""
from Products.Archetypes.public import process_types, listTypes # Products imports import config from Products.PloneArticle.pafti import PloneArticleFactoryTypeInformation from Products.PloneArticle.pafti import manage_addPAFTIForm from Products.PloneArticle.pafti import DynamicAllowedContentFTI from Products.PloneArticle.pafti import manage_addDVTFTIForm from Products.PloneArticle import content, proxy from Products.PloneArticle import tool from Products.PloneArticle import migration # Register skin directories so they can be added to portal_skins DirectoryView.registerDirectory('skins', config.GLOBALS) def initialize(context): # Setup migrations migration.executeMigrations() migration.registerMigrations() # optional demo content if config.INSTALL_EXAMPLES: import examples # register the fti context.registerClass(PloneArticleFactoryTypeInformation, permission=ManagePortal, constructors=(manage_addPAFTIForm, ),
CustomizationPolicy = None from Globals import package_home from Products.CMFCore import utils as cmfutils from Products.CMFCore import CMFCorePermissions from Products.CMFCore import DirectoryView from Products.CMFPlone.utils import ToolInit from Products.Archetypes.atapi import * from Products.Archetypes import listTypes from Products.Archetypes.utils import capitalize import os, os.path from Products.BungeniSkinUG.config import * DirectoryView.registerDirectory('skins', product_globals) DirectoryView.registerDirectory('skins/BungeniSkinUG', product_globals) ##code-section custom-init-head #fill in your manual code here ##/code-section custom-init-head 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
from Globals import package_home from Products.CMFCore import utils as cmfutils try: # New CMF from Products.CMFCore import permissions as CMFCorePermissions except: # Old CMF from Products.CMFCore import CMFCorePermissions from Products.CMFCore import DirectoryView from Products.CMFPlone.utils import ToolInit from Products.Archetypes.atapi import * from Products.Archetypes import listTypes from Products.Archetypes.utils import capitalize from config import * DirectoryView.registerDirectory('skins', product_globals) DirectoryView.registerDirectory('skins/UWOshCommitteeOnCommittees', product_globals) ##code-section custom-init-head #fill in your manual code here ##/code-section custom-init-head 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
#Archetypes from Products.Archetypes.public import * from Products.Archetypes import listTypes from Products.Archetypes.utils import capitalize from zope.i18nmessageid import MessageFactory ssMessageFactory = MessageFactory('signupsheet') import os, os.path, sys, content # Get configuration data, permissions from Products.SignupSheet.config import * # Register skin directories so they can be added to portal_skins DirectoryView.registerDirectory('skins', product_globals) DirectoryView.registerDirectory('skins/SignupSheet', product_globals) DirectoryView.registerDirectory('skins/Registrant', product_globals) def initialize(context): # Import the type, which results in registerType() being called from content import signupsheet, registrant # initialize the content, including types and add permissions content_types, constructors, ftis = process_types( listTypes(PROJECTNAME), PROJECTNAME) utils.ContentInit( PROJECTNAME + ' Content',
# 02110-1301, USA. # __author__ = """Gauthier Bastien <*****@*****.**>, Stephan Geulette <*****@*****.**>""" __docformat__ = 'plaintext' # There are three ways to inject custom code here: # # - To set global configuration variables, create a file AppConfig.py. # This will be imported in config.py, which in turn is imported in # each generated class and in this file. # - To perform custom initialisation after types have been registered, # use the protected code section at the bottom of initialize(). import logging logger = logging.getLogger('MeetingLalouviere') logger.debug('Installing Product') from Products.CMFCore import DirectoryView from config import product_globals DirectoryView.registerDirectory('skins', product_globals) import model.pm_updates # noqa import adapters # noqa def initialize(context): """initialize product (called by zope)"""
CustomizationPolicy = None from Globals import package_home from Products.CMFCore import utils as cmfutils from Products.CMFCore import CMFCorePermissions from Products.CMFCore import DirectoryView from Products.CMFPlone.utils import ToolInit from Products.Archetypes.atapi import * from Products.Archetypes import listTypes from Products.Archetypes.utils import capitalize import os, os.path from Products.SERPROSCWorkflow.config import * DirectoryView.registerDirectory('skins', product_globals) DirectoryView.registerDirectory('skins/SERPROSCWorkflow', product_globals) ##code-section custom-init-head #fill in your manual code here ##/code-section custom-init-head 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