mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Applied blacken-docs
This commit is contained in:
parent
dbfad6d220
commit
ab040470e2
1 changed files with 7 additions and 2 deletions
|
|
@ -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",
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue