Пример #1
0
def registerSlotExprType():
    # Register the 'slot:' expression type.

    # Register with Products.PageTemplates.
    try:
        from Products.PageTemplates.Expressions import getEngine
    except ImportError:
        log.exception("Unable to register the slot expression type")
    else:
        engine = getEngine()
        if not engine.getTypes().has_key('slot'):
            engine.registerType('slot', SlotExpr)

    # Register with zope.tales.
    try:
        from zope.tales.engine import Engine
    except ImportError:
        log.exception("Unable to register the slot expression type")
    else:
        if not Engine.getTypes().has_key('slot'):
            Engine.registerType('slot', SlotExpr)
Пример #2
0
def registerSlotExprType():
    # Register the 'slot:' expression type.

    # Register with Products.PageTemplates.
    try:
        from Products.PageTemplates.Expressions import getEngine
    except ImportError:
        log.exception("Unable to register the slot expression type")
    else:
        engine = getEngine()
        if not engine.getTypes().has_key('slot'):
            engine.registerType('slot', SlotExpr)

    # Register with zope.tales.
    try:
        from zope.tales.engine import Engine
    except ImportError:
        log.exception("Unable to register the slot expression type")
    else:
        if not Engine.getTypes().has_key('slot'):
            Engine.registerType('slot', SlotExpr)
Пример #3
0
def registerTALESExpressionType(name, handler):
    Engine.registerType(name, handler)
Пример #4
0
def register(name, handler):
    """Register tales expression type."""
    Engine.registerType(name, handler)
Пример #5
0
def registerTALESExpressionType(name, handler):
    Engine.registerType(name, handler)