예제 #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
파일: __init__.py 프로젝트: CGTIC/Plone_SP
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