def web_admin(module, action, arguments=None): """Add support for legacy mod publisher.""" from invenio.legacy.wsgi import \ is_mp_legacy_publisher_path, mp_legacy_publisher, \ application as legacy_application possible_module, possible_handler = is_mp_legacy_publisher_path( request.environ['PATH_INFO']) if possible_module is not None: legacy_publisher = lambda req: \ mp_legacy_publisher(req, possible_module, possible_handler) return legacy_application(request.environ, g.start_response, handler=legacy_publisher) return render_template('404.html'), 404
def legacy_publisher(req): return mp_legacy_publisher(req, possible_module, possible_handler)