mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Initial attempt at /db/table/row/-/delete, refs #1864
This commit is contained in:
parent
2865d3956f
commit
00632ded30
6 changed files with 144 additions and 4 deletions
|
|
@ -41,7 +41,7 @@ from .views.special import (
|
|||
MessagesDebugView,
|
||||
)
|
||||
from .views.table import TableView, TableInsertView, TableDropView
|
||||
from .views.row import RowView
|
||||
from .views.row import RowView, RowDeleteView
|
||||
from .renderer import json_renderer
|
||||
from .url_builder import Urls
|
||||
from .database import Database, QueryInterrupted
|
||||
|
|
@ -1280,6 +1280,10 @@ class Datasette:
|
|||
TableDropView.as_view(self),
|
||||
r"/(?P<database>[^\/\.]+)/(?P<table>[^\/\.]+)/-/drop$",
|
||||
)
|
||||
add_route(
|
||||
RowDeleteView.as_view(self),
|
||||
r"/(?P<database>[^\/\.]+)/(?P<table>[^/]+?)/(?P<pks>[^/]+?)/-/delete$",
|
||||
)
|
||||
return [
|
||||
# Compile any strings to regular expressions
|
||||
((re.compile(pattern) if isinstance(pattern, str) else pattern), view)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue