Removed fallback parameter from get_metadata, refs #1384

pull/1386/head
Simon Willison 2021-06-26 17:02:42 -07:00
rodzic 0d339a4897
commit ea627baccf
3 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -434,7 +434,7 @@ class Datasette:
metadata = {}
for hook_dbs in pm.hook.get_metadata(
datasette=self, key=key, database=database, table=table, fallback=fallback
datasette=self, key=key, database=database, table=table
):
metadata = self._metadata_recursive_update(metadata, hook_dbs)

Wyświetl plik

@ -11,8 +11,8 @@ def startup(datasette):
@hookspec
def get_metadata(datasette, key, database, table, fallback):
"""Get configuration"""
def get_metadata(datasette, key, database, table):
"""Return metadata to be merged into Datasette's metadata dictionary"""
@hookspec

Wyświetl plik

@ -1130,8 +1130,8 @@ This example will disable CSRF protection for that specific URL path:
If any of the currently active ``skip_csrf()`` plugin hooks return ``True``, CSRF protection will be skipped for the request.
get_metadata(datasette, key, database, table, fallback)
-------------------------------------------------------
get_metadata(datasette, key, database, table)
---------------------------------------------
``datasette`` - :ref:`internals_datasette`
You can use this to access plugin configuration options via ``datasette.plugin_config(your_plugin_name)``.
@ -1153,7 +1153,7 @@ This hook is responsible for returning a dictionary corresponding to Datasette :
.. code-block:: python
@hookimpl
def get_metadata(datasette, key, database, table, fallback):
def get_metadata(datasette, key, database, table):
metadata = {
"title": "This will be the Datasette landing page title!",
"description": get_instance_description(datasette),