Пример #1
0
def initialize(context):

    # side effect import to patch the response's retry method
    import monkey

    # Install the wrapper around zpublisher_exception_hook.
    monkey.installExceptionHook()
Пример #2
0
def initialize(context):

    # side effect import to patch the response's retry method
    import monkey

    # Install the wrapper around zpublisher_exception_hook.
    monkey.installExceptionHook()

    # Install the status code for linkintegritynotificationexception
    monkey.installStatusCode()
Пример #3
0
def initialize(context):

    # side effect import to patch the response's retry method
    import monkey

    # Install the wrapper around zpublisher_exception_hook.
    monkey.installExceptionHook()

    # Install the status code for linkintegritynotificationexception
    monkey.installStatusCode()
Пример #4
0
def initialize(context):
    """Initializer called when used as a Zope 2 product."""

    from monkey import installExceptionHook
    installExceptionHook()
Пример #5
0
Файл: __init__.py Проект: vwc/fv
try:
    from plone.app.upgrade import v40
    HAS_PLONE30 = True
    HAS_PLONE40 = True
except ImportError:
    HAS_PLONE40 = False
    try:
        from Products.CMFPlone.migrations import v3_0
    except ImportError:
        HAS_PLONE30 = False
    else:
        HAS_PLONE30 = True

if not HAS_PLONE30 and PLONE_25_PUBLISHER_MONKEYPATCH:
    from monkey import installExceptionHook
    installExceptionHook()

# BBB for Z2 vs Z3 interfaces checks
def implementedOrProvidedBy(anInterface, anObject):
    try:
        return anInterface.providedBy(anObject)
    except AttributeError:
        return anInterface.isImplementedBy(anObject)


# alias for legacy instances of PFGCaptchaField from when it was
# a separate product
try:
    import Products.PFGCaptchaField
except ImportError:
    import Products.PloneFormGen.content.fields