Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(16)  |  Call(7)  |  Derive(0)  |  Import(9)

src/e/r/erp5-HEAD/product/ERP5/ERP5Site.py   erp5(Download)
  def addCMFDefaultDirectoryViews(self, p):
    """Semi-manually create DirectoryViews since CMFDefault 2.X no longer
    registers the "skins" directory, only its subdirectories, making it
    unusable with Products.CMFCore.DirectoryView.addDirectoryViews."""
    from Products.CMFCore.DirectoryView import createDirectoryView, _generateKey
      reg_key = _generateKey(Products.CMFDefault.__name__,
                             'skins/' + cmfdefault_skin_layer)
      createDirectoryView(ps, reg_key)
 
  def setupDefaultSkins(self, p):

src/a/r/arecibo-HEAD/clients/plone/clearwind.arecibo/clearwind/arecibo/setuphandlers.py   arecibo(Download)
from Products.CMFCore.DirectoryView import createDirectoryView
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone.interfaces import ISelectableConstrainTypes
from Products.CMFEditions.setuphandlers import DEFAULT_POLICIES
import string
    def add(portal, name, location):
        portal_skins = getToolByName(portal, "portal_skins")
        if name not in portal_skins.objectIds():
            createDirectoryView(portal_skins, location, name)
 

src/p/a/paab.policy-0.2/paab/policy/exportimport/setuphandlers.py   paab.policy(Download)
# Adaptation to paab: Roberto Allende
#
from Products.CMFCore.DirectoryView import createDirectoryView
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.permissions import ManagePortal
    # add in the directory view pointing to our skin
    if layer_name not in skinsTool.objectIds():
        createDirectoryView(skinsTool, layer_location, layer_name)
        out.append('Added "%s" directory view to portal_skins' % layer_name)
 

src/c/l/clearwind.arecibo-0.7/clearwind/arecibo/setuphandlers.py   clearwind.arecibo(Download)
from Products.CMFCore.DirectoryView import createDirectoryView
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone.interfaces import ISelectableConstrainTypes
import string
 
def setupSkins(portal):
    def add(portal, name, location):
        portal_skins = getToolByName(portal, "portal_skins")
        if name not in portal_skins.objectIds():
            createDirectoryView(portal_skins, location, name)

src/p/r/Products.kupu-1.5.2/Products/kupu/plone/util.py   Products.kupu(Download)
# Utility functions used by Kupu tool
import os
from App.Common import package_home
from Products.CMFCore.DirectoryView import createDirectoryView
from Products.kupu import kupu_globals
    if name not in skinstool.objectIds():
        kupu_plone_skin_dir = minimalpath(os.path.join(kupu_package_dir, relpath))
        createDirectoryView(skinstool, kupu_plone_skin_dir, name)
        print >>out, "The layer '%s' was added to the skins tool" % name
 

src/c/y/cyn.in-HEAD/products/Plone4ArtistsCalendar/pythonlib/p4a/subtyper/sitesetup.py   cyn.in(Download)
        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():

src/p/4/p4a.subtyper-2.0/p4a/subtyper/sitesetup.py   p4a.subtyper(Download)
        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():

src/a/r/arecibo-HEAD/clients/plone/clearwind.arecibo/clearwind/arecibo/Extensions/Install.py   arecibo(Download)
import transaction
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.DirectoryView import createDirectoryView
from clearwind.arecibo.interfaces import IAreciboConfiguration
from clearwind.arecibo.config import AreciboConfiguration

src/p/l/plone.app.upgrade-1.3.6/plone/app/upgrade/v30/alphas.py   plone.app.upgrade(Download)
from Products.CMFCore.interfaces import IConfigurableWorkflowTool
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.DirectoryView import createDirectoryView
from Products.CMFDiffTool.interfaces import IDiffTool
from Products.CMFEditions.interfaces import IArchivistTool

src/p/l/plone.app.upgrade-HEAD/plone/app/upgrade/v30/alphas.py   plone.app.upgrade(Download)
from Products.CMFCore.interfaces import IConfigurableWorkflowTool
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.DirectoryView import createDirectoryView
from Products.CMFDiffTool.interfaces import IDiffTool
from Products.CMFEditions.interfaces import IArchivistTool

  1 | 2  Next