From ae99af25361c9248c721153922c623bd5f440159 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sat, 13 Jun 2020 10:59:35 -0700 Subject: [PATCH] Fixed rST code formatting, refs #834 --- docs/plugins.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/plugins.rst b/docs/plugins.rst index 289be649..8add7352 100644 --- a/docs/plugins.rst +++ b/docs/plugins.rst @@ -1011,6 +1011,8 @@ This hook fires when the Datasette application server first starts up. You can i Or you can return an async function which will be awaited on startup. Use this option if you need to make any database queries: +.. code-block:: python + @hookimpl def startup(datasette): async def inner(): @@ -1021,7 +1023,6 @@ Or you can return an async function which will be awaited on startup. Use this o """, block=True) return inner - Potential use-cases: * Run some initialization code for the plugin