bibsword='WebInterfaceSword', ping='WebInterfacePingPages', linkbacks='WebInterfaceRecentLinkbacksPages', textmining='WebInterfaceDocExtract', yourcomments='WebInterfaceYourCommentsPages', goto='WebInterfaceGotoPages', authorlist='WebInterfaceAuthorlistPages', ) def __new__(cls): from flask import current_app if CFG_ACCESS_CONTROL_LEVEL_SITE > 0: for key in cls._mapping.keys(): setattr(cls, key, WebInterfaceDisabledPages()) else: webinterfaces_ = dict(webinterfaces) webinterfaces_['WebInterfaceAdminPages'] = WebInterfaceAdminPages for key, value in cls._mapping.items(): if value in webinterfaces_: setattr(cls, key, webinterfaces_[value]()) else: current_app.logger.error( "Can not load {name}.".format(name=value)) setattr(cls, key, WebInterfaceDeprecatedPages()) return super(WebInterfaceInvenio, cls).__new__(cls) # This creates the 'handler' function, which will be invoked directly # by mod_python. invenio_handler = create_handler(WebInterfaceInvenio())
info='WebInterfaceInfoPages', exporter='WebInterfaceFieldExporterPages', kb='WebInterfaceBibKnowledgePages', admin2='WebInterfaceAdminPages', textmining='WebInterfaceDocExtract', yourcomments='WebInterfaceYourCommentsPages', goto='WebInterfaceGotoPages', ) def __new__(cls): from flask import current_app if CFG_ACCESS_CONTROL_LEVEL_SITE > 0: for key in cls._mapping.keys(): setattr(cls, key, WebInterfaceDisabledPages()) else: webinterfaces_ = dict(webinterfaces) webinterfaces_['WebInterfaceAdminPages'] = WebInterfaceAdminPages for key, value in cls._mapping.items(): if value in webinterfaces_: setattr(cls, key, webinterfaces_[value]()) else: current_app.logger.error( "Can not load {name}.".format(name=value)) setattr(cls, key, WebInterfaceDeprecatedPages()) return super(WebInterfaceInvenio, cls).__new__(cls) # This creates the 'handler' function, which will be invoked directly # by mod_python. invenio_handler = create_handler(WebInterfaceInvenio())