Did I find the right examples for you? yes no

All Samples(20)  |  Call(11)  |  Derive(0)  |  Import(9)

src/p/l/plone.app.theming-1.2.0/src/plone/app/theming/browser/controlpanel.py   plone.app.theming(Download)
from plone.app.theming.utils import getAvailableThemes
from plone.app.theming.utils import applyTheme
from plone.app.theming.utils import getOrCreatePersistentResourceDirectory
from plone.app.theming.utils import createThemeFromTemplate
 
                else:
 
                    themeContainer = getOrCreatePersistentResourceDirectory()
                    themeExists = themeData.__name__ in themeContainer
 
 
            toDelete = form.get('themes', [])
            themeDirectory = getOrCreatePersistentResourceDirectory()
 
            for theme in toDelete:

src/p/l/plone.app.theming-HEAD/src/plone/app/theming/browser/controlpanel.py   plone.app.theming(Download)
from plone.app.theming.utils import getAvailableThemes
from plone.app.theming.utils import applyTheme
from plone.app.theming.utils import getOrCreatePersistentResourceDirectory
from plone.app.theming.utils import createThemeFromTemplate
 
                else:
 
                    themeContainer = getOrCreatePersistentResourceDirectory()
                    themeExists = themeData.__name__ in themeContainer
 
 
            toDelete = form.get('themes', [])
            themeDirectory = getOrCreatePersistentResourceDirectory()
 
            for theme in toDelete:

src/s/e/seantis.dir.events-1.2.1/seantis/dir/events/upgrades.py   seantis.dir.events(Download)
from zope.component.hooks import getSite
 
from plone.app.theming.utils import (
    applyTheme,
    getOrCreatePersistentResourceDirectory
 
    # remove the old diazo theme and disable theming for now
    themes = getOrCreatePersistentResourceDirectory()
    to_delete = [
        'izug.seantis.dir.events.theme',

src/p/l/plone.app.theming-HEAD/src/plone/app/theming/tests/test_utils.py   plone.app.theming(Download)
    def test_getOrCreatePersistentResourceDirectory_new(self):
        from plone.app.theming.utils import getOrCreatePersistentResourceDirectory
 
        d = getOrCreatePersistentResourceDirectory()
        self.assertEqual(d.__name__, "theme")
 
    def test_getOrCreatePersistentResourceDirectory_exists(self):
        from zope.component import getUtility
        from plone.resource.interfaces import IResourceDirectory
        from plone.app.theming.utils import getOrCreatePersistentResourceDirectory
        persistentDirectory.makeDirectory("theme")
 
        d = getOrCreatePersistentResourceDirectory()
        self.assertEqual(d.__name__, "theme")
 
    def test_getZODBThemes(self):
        import zipfile
        import os.path
        from plone.app.theming.utils import getOrCreatePersistentResourceDirectory
        from plone.app.theming.utils import getZODBThemes

src/p/l/plone.app.theming-1.2.0/src/plone/app/theming/tests/test_utils.py   plone.app.theming(Download)
    def test_getOrCreatePersistentResourceDirectory_new(self):
        from plone.app.theming.utils import getOrCreatePersistentResourceDirectory
 
        d = getOrCreatePersistentResourceDirectory()
        self.assertEqual(d.__name__, "theme")
 
    def test_getOrCreatePersistentResourceDirectory_exists(self):
        from zope.component import getUtility
        from plone.resource.interfaces import IResourceDirectory
        from plone.app.theming.utils import getOrCreatePersistentResourceDirectory
        persistentDirectory.makeDirectory("theme")
 
        d = getOrCreatePersistentResourceDirectory()
        self.assertEqual(d.__name__, "theme")
 
    def test_getZODBThemes(self):
        import zipfile
        import os.path
        from plone.app.theming.utils import getOrCreatePersistentResourceDirectory
        from plone.app.theming.utils import getZODBThemes