hooks.rst 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. .. _hooks:
  2. Hooks
  3. =====
  4. In order to extend FlaskBB you will need to connect your callbacks with
  5. events.
  6. .. admonition:: Additional hooks
  7. If you miss a hook, feel free to open a new issue or create a pull
  8. request. The pull request should always contain a entry in this document
  9. with a small example.
  10. A hook needs a hook specification which are defined in
  11. :mod:`flaskbb.plugins.spec`. All hooks have to be prefixed with
  12. ``flaskbb_`` and template hooks with ``flaskbb_tpl_``.
  13. .. currentmodule:: flaskbb.plugins.spec
  14. .. autofunction:: flaskbb_extensions
  15. .. autofunction:: flaskbb_load_translations
  16. .. autofunction:: flaskbb_load_migrations
  17. .. autofunction:: flaskbb_load_blueprints
  18. .. autofunction:: flaskbb_request_processors
  19. .. autofunction:: flaskbb_errorhandlers
  20. .. autofunction:: flaskbb_jinja_directives
  21. .. autofunction:: flaskbb_additional_setup
  22. .. autofunction:: flaskbb_cli
  23. Template Hooks
  24. --------------
  25. .. note::
  26. Template events, which are used in forms, are usually rendered after the
  27. hidden CSRF token field and before an submit field.
  28. .. autofunction:: flaskbb_tpl_before_navigation
  29. .. autofunction:: flaskbb_tpl_after_navigation
  30. .. autofunction:: flaskbb_tpl_before_registration_form
  31. .. autofunction:: flaskbb_tpl_after_registration_form
  32. .. autofunction:: flaskbb_tpl_before_update_user_details
  33. .. autofunction:: flaskbb_tpl_after_update_user_details