Invenio-Admin Flask extension.

class ext._AdminState

State for Invenio-Admin.

__init__(app, admin, permission_factory, view_class_factory)

Initialize state.

  • app – The Flask application.
  • admin – The Flask-Admin application.
  • permission_factory – The permission factory to restrict access.
  • view_class_factory – The view class factory to initialize them.
register_view(view_class, *args, **kwargs)

Register an admin view on this admin instance.

  • view_class – The view class name passed to the view factory.
  • args – Positional arugments for view class.
  • kwargs – Keyword arguments to view class.

Load administration interface from entry point group.

Parameters:entry_point_group (str) – Name of the entry point group.
class ext.InvenioAdmin

Invenio-Admin extension.

__init__(app=None, **kwargs)

Invenio-Admin extension initialization.

  • app – The Flask application. (Default: None)
  • kwargs – Passed to init_app().
init_app(app, entry_point_group="invenio_admin.views", permission_factory=None, view_class_factory=protected_adminview_factory, index_view_class=AdminIndexView)

Flask application initialization.

  • app – The Flask application.
  • entry_point_group – Name of entry point group to load views/models from. (Default: 'invenio_admin.views')
  • permission_factory – Default permission factory to use when protecting an admin view. (Default: admin_permission_factory())
  • view_class_factory – Factory for creating admin view classes on the fly. Used to protect admin views with authentication and authorization. (Default: protected_adminview_factory())
  • index_view_class – Specify administrative interface index page. (Default: flask_admin.base.AdminIndexView)
  • kwargs – Passed to flask_admin.base.Admin.

Extension state.


Initialize configuration.

Parameters:app – The Flask application.

Proxy to state object.

Parameters:name – Attribute name of the state.