Did I find the right examples for you? yes no

All Samples(3)  |  Call(0)  |  Derive(0)  |  Import(3)

src/p/l/plone.app.theming-1.2.0/src/plone/app/theming/browser/controlpanel.py   plone.app.theming(Download)
from plone.app.theming.interfaces import RULE_FILENAME
from plone.app.theming.interfaces import DEFAULT_THEME_FILENAME
from plone.app.theming.interfaces import TEMPLATE_THEME
 
from plone.app.theming.utils import extractThemeInfo
                    if themeData.rules == u"/++%s++%s/%s" % (THEME_RESOURCE_NAME, themeData.__name__, RULE_FILENAME,):
                        if not themeDirectory.isFile(RULE_FILENAME):
                            templateThemeDirectory = queryResourceDirectory(THEME_RESOURCE_NAME, TEMPLATE_THEME)
                            themeDirectory.writeFile(RULE_FILENAME, templateThemeDirectory.readFile(RULE_FILENAME))
 
            title = form.get('title')
            description = form.get('description') or ''
            baseOn = form.get('baseOn', TEMPLATE_THEME)
            enableImmediately = form.get('enableImmediately', True)
 
 
        for theme in self.availableThemes:
            if theme.__name__ == TEMPLATE_THEME:
                continue
 

src/p/l/plone.app.theming-HEAD/src/plone/app/theming/browser/controlpanel.py   plone.app.theming(Download)
from plone.app.theming.interfaces import RULE_FILENAME
from plone.app.theming.interfaces import DEFAULT_THEME_FILENAME
from plone.app.theming.interfaces import TEMPLATE_THEME
 
from plone.app.theming.utils import extractThemeInfo
                    if themeData.rules == u"/++%s++%s/%s" % (THEME_RESOURCE_NAME, themeData.__name__, RULE_FILENAME,):
                        if not themeDirectory.isFile(RULE_FILENAME):
                            templateThemeDirectory = queryResourceDirectory(THEME_RESOURCE_NAME, TEMPLATE_THEME)
                            themeDirectory.writeFile(RULE_FILENAME, templateThemeDirectory.readFile(RULE_FILENAME))
 
            title = form.get('title')
            description = form.get('description') or ''
            baseOn = form.get('baseOn', TEMPLATE_THEME)
            enableImmediately = form.get('enableImmediately', True)
 
 
        for theme in self.availableThemes:
            if theme.__name__ == TEMPLATE_THEME:
                continue
 

src/c/o/collective.behavior.localdiazo-1.0b3/src/collective/behavior/localdiazo/behavior.py   collective.behavior.localdiazo(Download)
from collective.behavior.localdiazo import _
from collective.behavior.localregistry.behavior import ILocalRegistry
from plone.app.theming.interfaces import TEMPLATE_THEME
from plone.app.theming.utils import getAvailableThemes
from plone.directives import form
    terms = [SimpleTerm(theme.rules, theme.rules, theme.title)
             for theme in themes
             if theme.__name__ != TEMPLATE_THEME]
    terms.insert(0, (SimpleTerm('', '', _(u'No local theme'))))