mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Ability to set custom table/view page size in metadata, closes #751
This commit is contained in:
parent
510c1989d4
commit
75cd432e5a
4 changed files with 27 additions and 3 deletions
|
|
@ -305,6 +305,7 @@ METADATA = {
|
|||
},
|
||||
"attraction_characteristic": {"sort_desc": "pk"},
|
||||
"facet_cities": {"sort": "name"},
|
||||
"paginated_view": {"size": 25},
|
||||
},
|
||||
"queries": {
|
||||
"𝐜𝐢𝐭𝐢𝐞𝐬": "select id, name from facet_cities order by id limit 1;",
|
||||
|
|
|
|||
|
|
@ -754,9 +754,9 @@ def test_table_with_reserved_word_name(app_client):
|
|||
"path,expected_rows,expected_pages",
|
||||
[
|
||||
("/fixtures/no_primary_key.json", 201, 5),
|
||||
("/fixtures/paginated_view.json", 201, 5),
|
||||
("/fixtures/paginated_view.json", 201, 9),
|
||||
("/fixtures/no_primary_key.json?_size=25", 201, 9),
|
||||
("/fixtures/paginated_view.json?_size=25", 201, 9),
|
||||
("/fixtures/paginated_view.json?_size=50", 201, 5),
|
||||
("/fixtures/paginated_view.json?_size=max", 201, 3),
|
||||
("/fixtures/123_starts_with_digits.json", 0, 1),
|
||||
# Ensure faceting doesn't break pagination:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue