<configure xmlns="http://namespaces.zope.org/zope"
    xmlns:browser="http://namespaces.zope.org/browser"
    xmlns:naaya="http://namespaces.zope.org/naaya"
    xmlns:zcml="http://namespaces.zope.org/zcml">

    <adapter factory="naaya.core.portlets.MainSectionsPortlet"
             name="portlet_maincategories" />

    <naaya:call factory=".utils.set_default_socket_timeout_to_1min" />

    <subscriber handler="naaya.core.heartbeat.cleanup_unsubmitted_objects" />
    <subscriber handler="naaya.core.heartbeat.rdfcalendar_cron" />

    <naaya:call factory=".monitoring.initialize" />
    <configure zcml:condition="installed ZPublisher.interfaces">
        <subscriber for="ZPublisher.interfaces.IPubFailure"
            handler=".monitoring.log_pub_failure" />
    </configure>

    <naaya:call factory=".site_logging.init_site_loggers" />

    <browser:resourceDirectory
        name="naaya.mime_icons"
        directory="./mime-icons"
        permission="zope.Public"
        />

    <naaya:rstkMethod
        name="parse_string_to_datetime"
        handler="dateutil.parser.parse"
        getattrPatch="yes" />

    <naaya:rstkMethod
        name="convert_datetime_to_DateTime"
        handler=".zope2util.dt2DT"
        getattrPatch="yes" />

    <naaya:rstkMethod
        name="convert_DateTime_to_datetime"
        handler=".zope2util.DT2dt"
        getattrPatch="yes" />

    <naaya:rstkMethod
        name="json_loads"
        handler=".zope2util.json_loads"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.is_descendant_of"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.relative_object_path"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.path_in_site"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.is_valid_email"
        getattrPatch="yes" />

    <naaya:rstkMethod
        name="url_quote"
        handler="urllib.quote"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler="naaya.core.utils.icon_for_content_type"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.button_form"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.DT_strftime_rfc3339"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.dt_strftime"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.json_dumps"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.uni_decode"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.we_provide"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.catch_unauthorized"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.url_quote"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.url_unquote"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.escape_html"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.unescape_html_entities"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.simple_paginate"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.get_object_view_info"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.google_analytics"
        context="yes"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.provides"
        context="yes"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.latest_visible_uploads"
        context="yes"
        getattrPatch="yes" />

    <naaya:rstkMethod
        handler=".zope2util.users_in_role"
        context="yes"
        getattrPatch="yes" />

    <naaya:simpleView
        for=".interfaces.IExternalApplicationFrame"
        name="frame"
        handler=".frameservice.frame_view"
        permission="zope2.Public" />

</configure>
