home / docs / sections

sections

1 row where breadcrumbs = "["Plugin hooks", "Action hooks"]", page = "plugin_hooks" and title = "homepage_actions(datasette, actor, request)"

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: breadcrumbs (array)

id ▼ page ref title content breadcrumbs references
plugin_hooks:plugin-hook-homepage-actions plugin_hooks plugin-hook-homepage-actions homepage_actions(datasette, actor, request) datasette - Datasette class You can use this to access plugin configuration options via datasette.plugin_config(your_plugin_name) , or to execute SQL queries. actor - dictionary or None The currently authenticated actor . request - Request object The current HTTP request. Populates an actions menu on the top-level index homepage of the Datasette instance. This example adds a link an imagined tool for editing the homepage, only for signed in users: from datasette import hookimpl @hookimpl def homepage_actions(datasette, actor): if actor: return [ { "href": datasette.urls.path( "/-/customize-homepage" ), "label": "Customize homepage", } ] ["Plugin hooks", "Action hooks"] []

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [sections] (
   [id] TEXT PRIMARY KEY,
   [page] TEXT,
   [ref] TEXT,
   [title] TEXT,
   [content] TEXT,
   [breadcrumbs] TEXT,
   [references] TEXT
);
Powered by Datasette · Queries took 1.2ms