Wykres commitów

33 Commity (main)

Autor SHA1 Wiadomość Data
Simon Willison efc7357554 Remove Using YAML for metadata section
No longer necessary now we show YAML and JSON examples everywhere.
2024-02-05 13:01:03 -08:00
Simon Willison 11f7fd38a4 Fixed some rST header warnings 2023-10-12 15:05:02 -07:00
Alex Garcia 35deaabcb1
Move non-metadata configuration from metadata.yaml to datasette.yaml
* Allow and permission blocks moved to datasette.yaml
* Documentation updates, initial framework for configuration reference
2023-10-12 09:16:37 -07:00
Simon Willison 0183e1a72d Preserve JSON key order in YAML, refs #1153 2023-07-08 10:27:36 -07:00
Simon Willison 38fcc96e67 Removed duplicate imports, refs #1153 2023-07-08 10:09:26 -07:00
Simon Willison d7b21a8623 metadata.yaml now treated as default in docs
Added sphinx-inline-tabs to provide JSON and YAML tabs to show examples.

Refs #1153
2023-07-08 09:37:01 -07:00
Simon Willison 99ba051188 Fixed spelling error, refs #2089
Also ensure codespell runs as part of just lint
2023-06-29 07:46:22 -07:00
Simon Willison e837095ef3
Column metadata, closes #942 2021-08-12 16:53:23 -07:00
Simon Willison ef2ecc1b89 Standardize on 'query string', not 'querystring', in docs
The request property is request.query_string so this is more consistent.
2021-01-11 13:33:54 -08:00
Simon Willison 5eb8e9bf25 Removed words that minimize involved difficulty, closes #1089 2020-11-12 12:07:19 -08:00
Simon Willison c4fbe50676 Documentation for Database introspection methods, closes #684
Refs #576
2020-05-30 11:40:30 -07:00
Simon Willison 7ccd55a163 Views do support sorting now, refs #508 2020-05-29 15:44:22 -07:00
Simon Willison 3c1a60589e Consistent capitalization of SpatiaLite in the docs 2020-05-28 11:27:44 -07:00
Simon Willison 75cd432e5a Ability to set custom table/view page size in metadata, closes #751 2020-05-27 22:00:04 -07:00
Simon Willison 6717c719dd
--metadata accepts YAML as well as JSON - closes #713 2020-04-02 12:30:53 -07:00
Simon Willison 236aa065b2 "sort" and "sort_desc" metadata properties, closes #702 2020-03-21 19:28:35 -07:00
Min ho Kim 27cb29365c Fix numerous typos (#561)
Thanks, @minho42!
2019-07-26 13:25:44 +03:00
Simon Willison 17243fc355 Release notes for 0.28 - closes #463 2019-05-19 14:24:12 -07:00
Simon Willison 88976d6cd6 Source, license and about docs - closes #475 2019-05-19 13:13:27 -07:00
Simon Willison 503fee891b Removed 'datasette skeleton', closes #476 2019-05-19 13:05:38 -07:00
Simon Willison 57a71377c9
Releasing Datasette 0.25 2018-09-19 19:48:12 +02:00
Simon Willison 9e1fca4b01
Corrected indentation in metadata.rst 2018-08-28 02:56:34 -07:00
Simon Willison 5629aaca67
sortable_columns also now works with views 2018-08-05 17:29:23 -07:00
Simon Willison fc3660cfad
Streaming mode for downloading all rows as a CSV (#315)
* table.csv?_stream=1 to download all rows - refs #266

This option causes Datasette to serve ALL rows in the table, by internally
following the _next= pagination links and serving everything out as a stream.

Also added new config option, allow_csv_stream, which can be used to disable
this feature.

* New config option max_csv_mb limiting size of CSV export
2018-06-17 20:21:02 -07:00
Simon Willison ed631e690b
?_labels= and ?_label=COL to expand foreign keys in JSON/CSV
These new querystring arguments can be used to request expanded foreign keys
in both JSON and CSV formats.

?_labels=on turns on expansions for ALL foreign key columns

?_label=COLUMN1&_label=COLUMN2 can be used to pick specific columns to expand

e.g. `Street_Tree_List.json?_label=qSpecies&_label=qLegalStatus`

    {
        "rowid": 233,
        "TreeID": 121240,
        "qLegalStatus": {
            "value" 2,
            "label": "Private"
        }
        "qSpecies": {
            "value": 16,
            "label": "Sycamore"
        }
        "qAddress": "91 Commonwealth Ave",
        ...
    }

The labels option also works for the HTML and CSV views.

HTML defaults to `?_labels=on`, so if you pass `?_labels=off` you can disable
foreign key expansion entirely - or you can use `?_label=COLUMN` to request
just specific columns.

If you expand labels on CSV you get additional columns in the output:

`/Street_Tree_List.csv?_label=qLegalStatus`

    rowid,TreeID,qLegalStatus,qLegalStatus_label...
    1,141565,1,Permitted Site...
    2,232565,2,Undocumented...

I also refactored the existing foreign key expansion code.

Closes #233. Refs #266.
2018-06-16 15:18:57 -07:00
Simon Willison eaaa3ea149
Initial implementation of facets, plus tests and docs
Refs #255
2018-05-12 19:29:41 -03:00
Simon Willison 02ee31c8b4
New hidden: True option for table metadat, closes #239 2018-04-25 20:42:57 -07:00
Simon Willison f27cabbaf3
label_column option in metadata.json - closes #234 2018-04-22 10:53:16 -07:00
Russ Garrett 7d5f25dfb3
Add link to pint custom units page to docs 2018-04-14 15:08:20 +01:00
Russ Garrett 3c985ec271
Allow custom units to be registered with Pint 2018-04-14 12:27:06 +01:00
Russ Garrett 8bfeb98478
Tidy up units support
* Add units to exported JSON
* Units key in metadata skeleton
* Docs
2018-04-14 11:43:34 +01:00
Simon Willison b13f0986f2 New sortable_columns option in metadata.json to control sort options
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
2018-04-08 22:10:22 -07:00
Simon Willison 9af2964f6f
Documentation for metadata.json and "datasette skeleton" command
http://datasette.readthedocs.io/en/latest/metadata.html

Closes #166
2017-12-07 09:19:35 -08:00