kopia lustrzana https://github.com/simonw/datasette
Removed fallback parameter from get_metadata, refs #1384
rodzic
0d339a4897
commit
ea627baccf
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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),
|
||||
|
|
Ładowanie…
Reference in New Issue