_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:
Simon Willison 2018-04-08 17:06:10 -07:00
commit 3704db669f
No known key found for this signature in database
GPG key ID: 17E2DEA2588B7F52
5 changed files with 146 additions and 24 deletions

View file

@ -18,8 +18,8 @@ from unittest.mock import patch
('123%2C433,112', ['123,433', '112']),
('123%2F433%2F112', ['123/433/112']),
])
def test_compound_pks_from_path(path, expected):
assert expected == utils.compound_pks_from_path(path)
def test_urlsafe_components(path, expected):
assert expected == utils.urlsafe_components(path)
@pytest.mark.parametrize('row,pks,expected_path', [