Exemplo n.º 1
0
from plone.app.theming.interfaces import IThemeSettings
from plone.app.theming.interfaces import IThemingLayer
from plone.app.theming.utils import expandAbsolutePrefix

from plone.app.theming.utils import PythonResolver
from plone.app.theming.utils import InternalResolver
from plone.app.theming.utils import NetworkResolver

from plone.app.theming.utils import findContext
from plone.app.theming.utils import compileExpression
from plone.app.theming.utils import createExpressionContext
from plone.app.theming.utils import isThemeEnabled
from plone.app.theming.zmi import patch_zmi

# Disable theming of ZMI
patch_zmi()

LOGGER = logging.getLogger('plone.app.theming')

class _Cache(object):
    """Simple cache for the transform
    """

    def __init__(self):
        self.transform = None
        self.expressions = None

    def updateTransform(self, transform):
        self.transform = transform

    def updateExpressions(self, expressions):
Exemplo n.º 2
0
from plone.registry.interfaces import IRegistry
from plone.transformchain.interfaces import ITransform

from plone.app.theming.interfaces import IThemeSettings, IThemingLayer

from plone.app.theming.utils import compileThemeTransform
from plone.app.theming.utils import prepareThemeParameters
from plone.app.theming.utils import isThemeEnabled
from plone.app.theming.utils import findContext
from plone.app.theming.utils import getParser
from plone.app.theming.zmi import patch_zmi


# Disable theming of ZMI
patch_zmi()

LOGGER = logging.getLogger('plone.app.theming')

class _Cache(object):
    """Simple cache for the transform
    """

    def __init__(self):
        self.transform = None
        self.expressions = None

    def updateTransform(self, transform):
        self.transform = transform

    def updateExpressions(self, expressions):