manager.rst 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. .. _plugin_management:
  2. Plugin Management
  3. =================
  4. FlaskBB provides a couple of helpers for helping with plugin management.
  5. Plugin Registry
  6. ---------------
  7. The plugin registry holds all available plugins. It shows the plugin's status
  8. whether it is enabled or disabled, installable or installed. The registry also
  9. holds a reference to the plugin's instance, provides an interface to access
  10. the plugins metadata and stores its settings.
  11. You can query it like any SQLAlchemy Model::
  12. plugin = PluginRegistry.query.filter_by(name="portal").first()
  13. .. autoclass:: flaskbb.plugins.models.PluginRegistry
  14. :members:
  15. Plugin Manager
  16. --------------
  17. FlaskBB overrides the PluginManager from pluggy to provide some additional
  18. functionality like accessing the information stored in a setup.py file. The
  19. plugin manager will only list the currently enabled plugins and can be used to
  20. directly access the plugins instance by its name.
  21. Accessing a plugins instance is as easy as::
  22. plugin_instance = current_app.pluggy.get_plugin(name)
  23. .. autoclass:: flaskbb.plugins.manager.FlaskBBPluginManager
  24. :members:
  25. :inherited-members: