Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to set custom default _size on a per-table basis #751

Closed
simonw opened this issue May 4, 2020 · 4 comments
Closed

Ability to set custom default _size on a per-table basis #751

simonw opened this issue May 4, 2020 · 4 comments

Comments

@simonw
Copy link
Owner

simonw commented May 4, 2020

I have some tables where I'd like the default page size to be 10, without affecting the rest of my Datasette instance.

@simonw
Copy link
Owner Author

simonw commented May 4, 2020

Relevant code:

# Handle ?_size=500
page_size = _size or request.raw_args.get("_size")

@simonw
Copy link
Owner Author

simonw commented May 4, 2020

Syntax suggestion:

{
    "databases": {
        "mydatabase": {
            "tables": {
                "example_table": {
                    "sort": "created",
                    "size": 10
                }
            }
        }
    }
}

@simonw
Copy link
Owner Author

simonw commented May 4, 2020

I'm calling it "size" for consistency with the querystring parameter _size=, even though "page_size" might be a more accurate name.

@simonw simonw added this to the Next planned release milestone May 27, 2020
@simonw simonw closed this as completed in 75cd432 May 28, 2020
@simonw
Copy link
Owner Author

simonw commented May 28, 2020

simonw added a commit that referenced this issue May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant