mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
_sort and _sort_desc parameters for table views
Allows for paginated sorted results based on a specified column. Refs #189
This commit is contained in:
parent
29f9a29250
commit
f3a3820ff5
5 changed files with 146 additions and 24 deletions
|
|
@ -29,9 +29,10 @@ reserved_words = set((
|
|||
).split())
|
||||
|
||||
|
||||
def compound_pks_from_path(path):
|
||||
def urlsafe_components(token):
|
||||
"Splits token on commas and URL decodes each component"
|
||||
return [
|
||||
urllib.parse.unquote_plus(b) for b in path.split(',')
|
||||
urllib.parse.unquote_plus(b) for b in token.split(',')
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue