mirror of
https://github.com/simonw/datasette.git
synced 2026-06-12 03:57:00 +02:00
Remove _get_extras() shim in favor of extra_names_from_request()
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
f4b4506035
commit
d825d8c4f3
2 changed files with 4 additions and 7 deletions
|
|
@ -14,7 +14,8 @@ from datasette.plugins import pm
|
|||
import json
|
||||
import markupsafe
|
||||
import sqlite_utils
|
||||
from .table import display_columns_and_rows, _get_extras
|
||||
from datasette.extras import extra_names_from_request
|
||||
from .table import display_columns_and_rows
|
||||
from .table_extras import RowExtraContext, resolve_row_extras, table_extra_registry
|
||||
|
||||
|
||||
|
|
@ -165,7 +166,7 @@ class RowView(DataView):
|
|||
"primary_key_values": pk_values,
|
||||
}
|
||||
|
||||
extras = _get_extras(request)
|
||||
extras = extra_names_from_request(request)
|
||||
|
||||
# Process extras
|
||||
row_extra_context = RowExtraContext(
|
||||
|
|
|
|||
|
|
@ -854,10 +854,6 @@ class TableDropView(BaseView):
|
|||
return Response.json({"ok": True}, status=200)
|
||||
|
||||
|
||||
def _get_extras(request):
|
||||
return extra_names_from_request(request)
|
||||
|
||||
|
||||
async def _columns_to_select(table_columns, pks, request):
|
||||
columns = list(table_columns)
|
||||
if "_col" in request.args:
|
||||
|
|
@ -1461,7 +1457,7 @@ async def table_view_data(
|
|||
rows = rows[:page_size]
|
||||
|
||||
# Resolve extras
|
||||
extras = _get_extras(request)
|
||||
extras = extra_names_from_request(request)
|
||||
if any(k for k in request.args.keys() if k == "_facet" or k.startswith("_facet_")):
|
||||
extras.add("facet_results")
|
||||
if request.args.get("_shape") == "object":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue