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

_sort= and _sort_desc= parameters to table view #196

Merged
merged 9 commits into from
Apr 9, 2018
Merged

_sort= and _sort_desc= parameters to table view #196

merged 9 commits into from
Apr 9, 2018

Conversation

simonw
Copy link
Owner

@simonw simonw commented Apr 9, 2018

See #189

Allows for paginated sorted results based on a specified column.

Refs #189
Plus renamed human_description to human_description_en

Refs #189
Verifies that they match an existing column, and only one or the other option
is provided - refs #189

Eses a new DatasetteError exception that closes #193
You can now explicitly set which columns in a table can be used for sorting
using the _sort and _sort_desc arguments using metadata.json:

    {
        "databases": {
            "database1": {
                "tables": {
                    "example_table": {
                        "sortable_columns": [
                            "height",
                            "weight"
                        ]
                    }
                }
            }
        }
    }

Refs #189
We were showing this:

    201 rows where sorted by sortable_with_nulls

We now show this:

    201 rows sorted by sortable_with_nulls
@simonw simonw merged commit c1d37fd into master Apr 9, 2018
@simonw simonw deleted the sort branch April 9, 2018 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant