Skip to content

Commit

Permalink
Changelog for jinja2_environment_from_request and plugin_hook_slots
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Feb 5, 2024
1 parent dfcefb2 commit 59a471b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ Changelog
Previously these lived in ``metadata.yaml``, which was confusing as plugin settings were unrelated to database and table metadata.

Plugin hooks
~~~~~~~~~~~~

- New :ref:`plugin_hook_jinja2_environment_from_request` plugin hook, which can be used to customize the current Jinja environment based on the incoming request. This can be used to modify the template lookup path based on the incoming request hostname, among other things. (:issue:`2225`)
- New :ref:`family of template slot plugin hooks <plugin_hook_slots>`: ``top_homepage``, ``top_database``, ``top_table``, ``top_row``, ``top_query``, ``top_canned_query``. Plugins can use these to provide additional HTML to be injected at the top of the corresponding pages. (:issue:`1191`)
- New internal function for plugin authors: :ref:`database_execute_isolated_fn`, for creating a new SQLite connection, executing code and then closing that connection, all while preventing other code from writing to that particular database. This connection will not have the :ref:`prepare_connection() <plugin_hook_prepare_connection>` plugin hook executed against it, allowing plugins to perform actions that might otherwise be blocked by existing connection configuration. (:issue:`2218`)

Documentation
Expand Down

0 comments on commit 59a471b

Please sign in to comment.