Skip to content

Commit

Permalink
Applied blacken-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Sep 7, 2023
1 parent dbfad6d commit ab04047
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/plugin_hooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1450,13 +1450,18 @@ This example adds a new database action for creating a table, if the user has th
def database_actions(datasette, actor, database):
async def inner():
if not await datasette.permission_allowed(
actor, "edit-schema", resource=database, default=False
actor,
"edit-schema",
resource=database,
default=False,
):
return []
return [
{
"href": datasette.urls.path(
"/-/edit-schema/{}/-/create".format(database)
"/-/edit-schema/{}/-/create".format(
database
)
),
"label": "Create a table",
}
Expand Down

0 comments on commit ab04047

Please sign in to comment.