Did I find the right examples for you? yes no

All Samples(35)  |  Call(21)  |  Derive(0)  |  Import(14)

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 getZODBThemes
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
            if themeSelection:
                themeData = self.getThemeData(self.availableThemes, themeSelection)
                applyTheme(themeData)
                self.settings.enabled = True
 
            self.authorize()
 
            applyTheme(None)
            self.settings.enabled = False
 
 
                if self.settings.rules != rules:
                    applyTheme(None)
 
                self.settings.enabled = themeEnabled
 
                if enableNewTheme:
                    applyTheme(themeData)
                    self.settings.enabled = True
 

src/p/l/plone.app.theming-HEAD/src/plone/app/theming/browser/controlpanel.py   plone.app.theming(Download)
from plone.app.theming.utils import getZODBThemes
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
            if themeSelection:
                themeData = self.getThemeData(self.availableThemes, themeSelection)
                applyTheme(themeData)
                self.settings.enabled = True
 
            self.authorize()
 
            applyTheme(None)
            self.settings.enabled = False
 
 
                if self.settings.rules != rules:
                    applyTheme(None)
 
                self.settings.enabled = themeEnabled
 
                if enableNewTheme:
                    applyTheme(themeData)
                    self.settings.enabled = True
 

src/p/l/plone.app.theming-1.2.0/src/plone/app/theming/exportimport/handler.py   plone.app.theming(Download)
 
from plone.app.theming.interfaces import IThemeSettings
from plone.app.theming.utils import applyTheme
from plone.app.theming.utils import getAvailableThemes
 
            raise ValueError("Theme %s is not available" % themeName)
 
        applyTheme(themeInfo)
        logger.info('Theme %s applied' % themeName)
 

src/p/l/plone.app.theming-HEAD/src/plone/app/theming/exportimport/handler.py   plone.app.theming(Download)
 
from plone.app.theming.interfaces import IThemeSettings
from plone.app.theming.utils import applyTheme
from plone.app.theming.utils import getAvailableThemes
 
            raise ValueError("Theme %s is not available" % themeName)
 
        applyTheme(themeInfo)
        logger.info('Theme %s applied' % themeName)
 

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
            continue
 
    applyTheme(None)
 
    setup = getToolByName(context, 'portal_setup')

src/p/l/plone.app.theming-1.2.0/src/plone/app/theming/tests/test_utils.py   plone.app.theming(Download)
        from plone.app.theming.interfaces import IThemeSettings
        from plone.app.theming.utils import getAvailableThemes
        from plone.app.theming.utils import applyTheme
 
        theme = None
        settings.rules = None
 
        applyTheme(theme)
 
        self.assertEqual(settings.rules, theme.rules)
 
        from plone.app.theming.interfaces import IThemeSettings
        from plone.app.theming.utils import applyTheme
 
        settings = getUtility(IRegistry).forInterface(IThemeSettings, False)
        settings.parameterExpressions = {}
 
        applyTheme(None)
 
        self.assertEqual(settings.rules, None)

src/p/l/plone.app.theming-HEAD/src/plone/app/theming/tests/test_utils.py   plone.app.theming(Download)
        from plone.app.theming.interfaces import IThemeSettings
        from plone.app.theming.utils import getAvailableThemes
        from plone.app.theming.utils import applyTheme
 
        theme = None
        settings.rules = None
 
        applyTheme(theme)
 
        self.assertEqual(settings.rules, theme.rules)
 
        from plone.app.theming.interfaces import IThemeSettings
        from plone.app.theming.utils import applyTheme
 
        settings = getUtility(IRegistry).forInterface(IThemeSettings, False)
        settings.parameterExpressions = {}
 
        applyTheme(None)
 
        self.assertEqual(settings.rules, None)

src/p/l/plone.app.theming-1.2.0/src/plone/app/theming/tests/test_transform.py   plone.app.theming(Download)
 
from plone.app.theming.interfaces import IThemeSettings
from plone.app.theming.utils import applyTheme, getAvailableThemes, getTheme
from plone.app.theming.utils import InternalResolver, PythonResolver, resolvePythonURL
 
        self.settings.enabled = True
        theme = getTheme('plone.app.theming.tests')
        applyTheme(theme)
        self.assertEqual(self.settings.rules, u'/++theme++plone.app.theming.tests/rules.xml')
        self.assertEqual(self.settings.currentTheme, u"plone.app.theming.tests")

src/p/l/plone.app.theming-HEAD/src/plone/app/theming/tests/test_transform.py   plone.app.theming(Download)
 
from plone.app.theming.interfaces import IThemeSettings
from plone.app.theming.utils import applyTheme, getAvailableThemes, getTheme
from plone.app.theming.utils import InternalResolver, PythonResolver, resolvePythonURL
 
        self.settings.enabled = True
        theme = getTheme('plone.app.theming.tests')
        applyTheme(theme)
        self.assertEqual(self.settings.rules, u'/++theme++plone.app.theming.tests/rules.xml')
        self.assertEqual(self.settings.currentTheme, u"plone.app.theming.tests")

src/c/o/collective.jbot-1.0a3/collective/jbot/testing.py   collective.jbot(Download)
from zope.configuration import xmlconfig
from plone.testing import z2
from plone.app.theming.utils import (
    getAvailableThemes, applyTheme, createThemeFromTemplate,
    getCurrentTheme)
 
    if getCurrentTheme() != 'custom':
        applyTheme(theme)
 
 
def deactivateTheme():
    applyTheme(None)

  1 | 2  Next