mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Fix for redirects ignoring base_url, refs #1883
This commit is contained in:
parent
26262d08f3
commit
fa9cc9efaf
2 changed files with 20 additions and 8 deletions
|
|
@ -286,7 +286,7 @@ class TableView(DataView):
|
|||
if redirect_params:
|
||||
return self.redirect(
|
||||
request,
|
||||
path_with_added_args(request, redirect_params),
|
||||
self.ds.urls.path(path_with_added_args(request, redirect_params)),
|
||||
forward_querystring=False,
|
||||
)
|
||||
|
||||
|
|
@ -294,13 +294,15 @@ class TableView(DataView):
|
|||
if "_sort_by_desc" in request.args:
|
||||
return self.redirect(
|
||||
request,
|
||||
path_with_added_args(
|
||||
request,
|
||||
{
|
||||
"_sort_desc": request.args.get("_sort"),
|
||||
"_sort_by_desc": None,
|
||||
"_sort": None,
|
||||
},
|
||||
self.ds.urls.path(
|
||||
path_with_added_args(
|
||||
request,
|
||||
{
|
||||
"_sort_desc": request.args.get("_sort"),
|
||||
"_sort_by_desc": None,
|
||||
"_sort": None,
|
||||
},
|
||||
)
|
||||
),
|
||||
forward_querystring=False,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue