Wykres commitów

510 Commity (load-template-plugin-hook)

Autor SHA1 Wiadomość Data
Simon Willison 52c4387c7d Redesigned register_output_renderer plugin hook, closes #581 2020-05-27 19:21:41 -07:00
Simon Willison 4b96857f17 Link to request object documentation, refs #706 2020-05-27 15:35:25 -07:00
Simon Willison 50652f474b Stop using .raw_args, deprecate and undocument it - refs #706 2020-05-27 15:29:42 -07:00
Simon Willison 6d7cb02f00 Documentation for request object, refs #706 2020-05-27 15:17:53 -07:00
Simon Willison ad88c9b3f3 Mechanism for adding a default URL fragment to a canned query
Closes #767
2020-05-27 14:52:03 -07:00
Simon Willison af5702220c Added datasette-media plugin to the docs 2020-05-27 13:34:12 -07:00
Simon Willison 9e6075d21f rST fixes for register_output_renderer docs 2020-05-27 11:35:31 -07:00
Simon Willison af6c6c5d6f Release 0.42, refs #685 2020-05-08 10:38:27 -07:00
Simon Willison 2694ddcf14 Test for .execute_fn(), refs #685 2020-05-08 10:29:17 -07:00
Simon Willison 5ab848f0b8
RST fix 2020-05-08 10:04:47 -07:00
Simon Willison 545c71b604
Small cleanup 2020-05-08 09:57:01 -07:00
Simon Willison ec9cdc3ffa
Documentation for .execute_fn(), refs #685 2020-05-08 09:52:53 -07:00
Simon Willison 4433306c18
Improvements + docs for db.execute() and Results class
* Including new results.first() and results.single_value() methods. Closes #685
2020-05-08 09:05:46 -07:00
Simon Willison 182e5c8745 Release Datasette 0.41
Refs #648 #731 #750 #151 #761 #752 #719 #756 #748
2020-05-06 11:20:58 -07:00
Simon Willison 9212f0c9c3
Removed note about virtual environments
Simplifies things now that we also talk about pipx.
2020-05-04 12:35:28 -07:00
Simon Willison 0cdf111ae6
Move pip/pipx to top of installation instructions
Less intimidating than Docker, hopefully.
2020-05-04 12:31:13 -07:00
Simon Willison 7e2bb31464
Documented installation using pipx, closes #756 2020-05-04 12:10:31 -07:00
Simon Willison 9424687e9e Consistently return charset utf-8, closes #752 2020-05-04 10:42:10 -07:00
Simon Willison d996d4122b
Add badges to documentation index 2020-05-03 08:46:49 -07:00
Simon Willison b3aa5f4313 Added 'not like' table filter, refs #750 2020-05-02 12:04:54 -07:00
Simon Willison 4df1b4d8b0 Re-arranged full-text search docs
Also documented ?_searchmode=raw - closes #748
2020-04-30 14:06:00 -07:00
Simon Willison cf2d547ffc Documentation for #747 2020-04-30 12:02:28 -07:00
Simon Willison 25014ca25e
Configuration directory mode, closes #731 2020-04-27 09:30:24 -07:00
Simon Willison 304e7b1d9f
Mechanism for creating custom pages using templates
Closes #648
2020-04-26 11:46:43 -07:00
Simon Willison 227bb3e91f
Added more example plugins 2020-04-22 06:47:20 -07:00
Simon Willison 8da108193b Fixed a couple of spelling errors 2020-04-21 21:06:39 -07:00
Simon Willison edb39c91f7 Release Datasette 0.40 2020-04-21 21:00:34 -07:00
Simon Willison 15e2321804 Extra body CSS class for canned queries, closes #727 2020-04-15 14:07:28 -07:00
Simon Willison e0e7a0facf Removed Zeit Now v1 support, closes #710 2020-04-04 16:04:33 -07:00
Simon Willison 6717c719dd
--metadata accepts YAML as well as JSON - closes #713 2020-04-02 12:30:53 -07:00
Simon Willison 2aaad72789 Refactor template setup into Datasette constructor
Closes #707
2020-03-26 18:12:43 -07:00
Simon Willison 99b1e91965 Fixed RST bug 2020-03-24 21:46:52 -07:00
Simon Willison dedd775512 Release 0.39 2020-03-24 21:02:37 -07:00
Simon Willison 7656fd64d8
base_url configuration setting, closes #394
* base_url configuration setting
* base_url works for static assets as well
2020-03-24 17:18:43 -07:00
Simon Willison 5f4aeb1f19 Removed documentation for Zeit Now v1, refs #710 2020-03-24 15:45:24 -07:00
Simon Willison c0aa929cdd Added datasette-publish-fly plugin to docs, closes #704 2020-03-24 15:38:58 -07:00
Simon Willison 3b3cb3e8df Added example plugins to plugin hooks docs, closes #709 2020-03-24 15:29:34 -07:00
Simon Willison 236aa065b2 "sort" and "sort_desc" metadata properties, closes #702 2020-03-21 19:28:35 -07:00
Simon Willison 3d656f4b31 Updated documentation formatting 2020-03-21 18:31:54 -07:00
Simon Willison fd2a74dc09
Updated publish_subcommand example 2020-03-18 17:47:53 -07:00
Simon Willison 7e357abbc3 Release 0.38 2020-03-08 16:26:50 -07:00
Simon Willison af9cd4ca64 Fixes for new --memory option, refs #694 2020-03-05 17:44:15 -06:00
Simon Willison be20e6991e Changelog for 0.37.1 2020-03-02 19:43:08 -08:00
Simon Willison 4933035b75
RST fix 2020-03-02 08:10:16 -08:00
Simon Willison 613f6fad72
Improved extra_template_vars documentation 2020-03-02 07:12:34 -08:00
Simon Willison 0f8e91c68f
Documentation fix 2020-02-25 23:13:39 -08:00
Simon Willison 1a77f30d3c
Fixed typo 2020-02-25 23:11:19 -08:00
Simon Willison c9e6841482 News and release notes for 0.37 2020-02-25 17:22:02 -08:00
Simon Willison 78198df668 Fixed incorrect target name 2020-02-25 17:10:30 -08:00
Simon Willison 6cb65555f4
?_searchmode=raw option (#686) 2020-02-24 21:56:03 -08:00
Simon Willison a093c5f79f
.execute_write() and .execute_write_fn() methods on Database (#683)
Closes #682.
2020-02-24 20:45:07 -08:00
Simon Willison 962a7e16e5 Release notes for 0.36, refs #679 2020-02-21 19:01:57 -08:00
Simon Willison d6335f1f31 Added shapefile-to-sqlite, datasette-mask-columns, datasette-auth-existing-cookies, datasette-auth-existing-cookies
Refs #679
2020-02-21 18:53:35 -08:00
Adrien Di Pasquale be2265b0e8
Fix db-to-sqlite command in ecosystem doc page (#669)
Thanks, @adipasquale
2020-02-21 18:32:17 -08:00
Simon Willison 6303ea5048 prepare_connection() now takes datasette and database args, refs #678 2020-02-21 17:32:40 -08:00
Simon Willison efa54b439f Docs for .render_template(), refs #577
Also improved parameter documentation for other methods, refs #576
2020-02-13 17:58:32 -08:00
Simon Willison 3ffb8f3b98 .add_database() and .remove_database() methods, refs #671
Also made a start on the Datasette class documentation, refs #576
2020-02-13 17:27:57 -08:00
Simon Willison b38a792ef0 Apply Black, update copyright to be 2017-2020 2020-02-13 15:01:14 -08:00
Simon Willison 30b6f71b30 Updated release notes with #653 2020-02-04 18:17:47 -08:00
Simon Willison ce12244037 Release notes for 0.35 2020-02-04 18:02:32 -08:00
Simon Willison 4d7dae9eb7
Added a bunch more plugins to the Ecosystem page 2020-02-04 12:49:41 -08:00
Simon Willison 286ed286b6
geojson-to-sqlite 2020-01-30 23:09:56 -08:00
Simon Willison e7f60d2a9b Release notes for Datasette 0.34, plus news updates 2020-01-29 16:09:01 -08:00
Simon Willison 67fc9c5720
--port argument for datasette package, plus tests - closes #661
From pull request #663
2020-01-29 14:46:43 -08:00
Katie McLaughlin 34d77d780f gcloud run is now GA, s/beta// (#660)
Thanks, @glasnt
2020-01-21 15:28:11 -08:00
Simon Willison 59e7014c8a Release 0.33 2019-12-22 16:27:04 +00:00
Simon Willison d54318fc7f Added template_debug setting, closes #654 2019-12-22 16:04:45 +00:00
Simon Willison ceef5ce684 Documentation for --port=0 2019-12-22 15:42:30 +00:00
Simon Willison d6b6c9171f Include asyncio task information in /-/threads debug page 2019-12-04 22:47:17 -08:00
Simon Willison a562f29655 Examples of things you can do with plugins 2019-11-27 11:19:11 -08:00
Simon Willison f9d0ce4233
Added datasette-haversine to plugins list 2019-11-27 06:04:32 -08:00
Simon Willison df2879ee2a Better documentation for --static, closes #641
https://datasette.readthedocs.io/en/stable/custom_templates.html#serving-static-files
2019-11-25 18:31:42 -08:00
Simon Willison aca41618f8 index view is also important for plugin hooks 2019-11-25 09:04:39 -08:00
Simon Willison c16be14517
How to upgrade using Docker 2019-11-20 10:02:07 -08:00
Simon Willison a95bedb9c4 Release notes for 0.32 2019-11-14 15:20:21 -08:00
Simon Willison 8c642f04e0
Render templates using Jinja async mode
Closes #628
2019-11-14 15:14:22 -08:00
Simon Willison b51f258d00 Release notes for 0.31.2 2019-11-13 08:48:36 -08:00
Simon Willison a22c7761b6 Fixed typo in release notes 2019-11-12 18:18:39 -08:00
Simon Willison 16265f6a1a Release notes for 0.31.1 2019-11-12 18:18:04 -08:00
Simon Willison f554be39fc
ReST fix 2019-11-11 22:00:13 -08:00
Simon Willison 1c518680e9
Final steps: build stable branch of Read The Docs 2019-11-11 21:57:48 -08:00
Simon Willison 76fc6a9c73 Release notes for 0.31 2019-11-11 21:18:17 -08:00
Simon Willison cf7776d36f
Support Python 3.8, stop supporting Python 3.5 (#627)
* Upgrade to uvicorn 0.10.4
* Drop support for Python 3.5
* Bump all dependencies to latest releases
* Update docs to reflect we no longer support 3.5
* Removed code that skipped black unit test on 3.5

Closes #622
2019-11-11 21:09:11 -08:00
Simon Willison 10b9d85eda
datasette-csvs on Glitch now uses sqlite-utils
It previously used csvs-to-sqlite but that had heavy dependencies.

See https://support.glitch.com/t/can-you-upgrade-python-to-latest-version/7980/33
2019-11-08 18:15:13 -08:00
Simon Willison 9f5d19c254
Improved documentation for "publish cloudrun" 2019-11-08 18:12:20 -08:00
Simon Willison c30f07c58e Removed _group_count=col feature, closes #504 2019-11-05 21:12:55 -08:00
Simon Willison 9db22cdf18 pk__notin= filter, closes #614 2019-11-03 20:11:55 -08:00
Simon Willison c3181d9a84 Release notes for 0.30.2 2019-11-02 15:47:20 -07:00
Simon Willison ed57e4f990 Plugin static assets support both hyphens and underscores in names
Closes #611
2019-11-01 15:15:10 -07:00
Simon Willison ffae2f0ecd Better documentation of --host, closes #574 2019-11-01 14:57:49 -07:00
Simon Willison f5f6cbe03c Release 0.30.1 2019-10-30 11:56:04 -07:00
Simon Willison debea4f971 Release 0.30 2019-10-18 18:06:37 -07:00
Simon Willison a314b76186 Added /-/threads debugging page 2019-10-02 08:35:25 -07:00
Simon Willison 0fc8afde0e Changelog for 0.29.3 release 2019-09-02 17:40:53 -07:00
Min ho Kim 27cb29365c Fix numerous typos (#561)
Thanks, @minho42!
2019-07-26 13:25:44 +03:00
Simon Willison 6abe6faff6 Release 0.9.2 2019-07-13 20:04:05 -07:00
Simon Willison f2006cca80 Updated release notes 2019-07-11 09:27:28 -07:00
Simon Willison 2a94f3719f Release 0.29.1 2019-07-11 09:17:55 -07:00
Simon Willison fb7ee8e0ad Changelog for 0.29 release 2019-07-07 20:14:27 -07:00
Simon Willison 973f8f139d
--plugin-secret option for datasette publish
Closes #543

Also added new --show-files option to publish now and publish cloudrun - handy for debugging.
2019-07-07 19:06:31 -07:00
Simon Willison 2d04986c44 Added datasette-auth-github and datasette-cors plugins to Ecosystem
Closes #548
2019-07-07 19:02:27 -07:00
Simon Willison aa4cc99c02 Removed facet-by-m2m from docs, refs #550
Will bring this back in #551
2019-07-07 18:22:05 -07:00
Simon Willison 9998f92cc0 Updated custom facet docs, closes #482 2019-07-07 16:19:02 -07:00
Simon Willison fcfcae21e6
extra_template_vars plugin hook (#542)
* extra_template_vars plugin hook

Closes #541

* Workaround for cwd bug

Based on https://github.com/pytest-dev/pytest/issues/1235#issuecomment-175295691
2019-07-05 17:05:56 -07:00
Simon Willison a2d4593193
Secret plugin configuration options (#539)
Closes #538
2019-07-03 22:36:44 -07:00
Simon Willison 4d2fdafe39 Added asgi_wrapper plugin hook, closes #520 2019-07-02 21:06:25 -07:00
Simon Willison b9ede4c189 Updated custom template docs, refs #521 2019-07-02 20:23:05 -07:00
Simon Willison e7120d91f6 Rename _rows_and_columns.html to _table.html, refs #521 2019-07-02 20:23:05 -07:00
Simon Willison 7688283054
Typo 2019-06-25 08:36:39 -07:00
Simon Willison 9e97b725f1 pip install -e .[docs] for docs dependencies 2019-06-25 05:08:04 -07:00
Simon Willison 6341f8cbc7 Better coverage of sqlite-utils in FTS docs, closes #525 2019-06-24 09:28:42 -07:00
Simon Willison cdd24f3eaa
Added datasette-doublemetaphone to list of plugins 2019-06-23 21:23:24 -07:00
Tom MacWright aa911122fe Fix typo in install step: should be install -e (#500) 2019-06-11 11:48:40 -07:00
Simon Willison 6ccfcefb78
Added datasette-render-binary plugin to ecosystem 2019-06-09 09:49:06 -07:00
Simon Willison 0c756b8cd9
Added datasette-bplist plugin to ecosystem 2019-06-08 19:11:59 -07:00
Simon Willison 803f750309
Added datasette-jq plugin to ecosystem 2019-05-29 18:51:10 -07:00
Simon Willison bd4dbc8519 Rename InterruptedError => QueryInterrupted, closes #490 2019-05-27 17:16:36 -07:00
Simon Willison d923d84754 Facet by many-to-many, closes #365 2019-05-25 09:06:32 -07:00
Simon Willison 172da009d8 Added ?_through= table argument, closes #355
Also added much more interesting many-to-many fixtures - roadside attractions!
2019-05-22 22:45:12 -07:00
Simon Willison 967230c90e Facet by date, closes #481 2019-05-20 23:09:22 -07:00
Thomas Wood 70d2858067 Doc typo fix (#479) 2019-05-20 09:42:28 -07:00
Simon Willison 4246e138f9
Typo fix 2019-05-19 16:14:09 -07:00
Simon Willison 17243fc355 Release notes for 0.28 - closes #463 2019-05-19 14:24:12 -07:00
Simon Willison a9d138702c Docs for facet-by-JSON-array, closes #477 2019-05-19 14:19:35 -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 2600858388 Fixed some links 2019-05-19 11:17:35 -07:00
Simon Willison 870f6dd55f Replaced a straggling 'datasette publish now' reference 2019-05-19 11:12:53 -07:00
Simon Willison 7d8573d672 Rename "datasette publish now" to "datasette publish nowv1"
Also added an alias so "datasette publish now" continues to work.

Closes #472
2019-05-19 11:06:51 -07:00
Simon Willison 81ba98a509 New performance documentation, closes #421 2019-05-18 22:31:03 -07:00
Simon Willison 0dad111d24 New introspection endpoint: /-/databases - closes #470
Refs #419 and #465
2019-05-16 07:49:34 -07:00
Simon Willison 1937026766
Removed accidental R 2019-05-16 06:27:08 -07:00
Simon Willison f31b9fe5ca
Another link to Glitch 2019-05-16 06:26:46 -07:00
Simon Willison 7c79eb974b
It's 2019 now 2019-05-16 03:20:08 -07:00
Simon Willison a464594475
Added inline contents for installation page 2019-05-16 03:15:03 -07:00
Simon Willison a88b599cce Improved introduction copy on Plugins docs page 2019-05-15 22:18:02 -07:00
Simon Willison 725b5b6a69 Re-ordered documentation index page 2019-05-15 22:14:33 -07:00
Simon Willison 12350e8b8a Fixed broken link to global-power-plants demo 2019-05-15 22:12:36 -07:00
Simon Willison 8461b930d5 Wording tweaks 2019-05-15 22:09:06 -07:00
Simon Willison 8d639dd096 Docs on how to use sphinx-autobuild 2019-05-15 22:03:37 -07:00
Simon Willison 623c552ff4 'Try Datasette without installing anything using Glitch'
Also new 'Play with a live demo' section, both at the top of the Getting
Started documentation page.

https://datasette.readthedocs.io/en/latest/getting_started.html

Closes #464
2019-05-15 21:57:36 -07:00
Simon Willison c0d1b4c322 "datasette inspect foo.db" now just calculates table counts
Refs #462

* inspect command now just outputs table counts
* test_inspect.py is now only tests for that CLI command
* Updated some relevant documentation
* Removed docs for /-/inspect since that is about to change
2019-05-11 14:36:57 -07:00
Simon Willison 37adf32290 Changelog for 0.27.1 2019-05-11 11:34:13 -07:00
Simon Willison f825e20121 Run black and update docs for #457 2019-05-09 09:48:13 -07:00
Jaap Roes f853d5592e "python3 -m pip" is clearer (thanks @jaap3) (#368) 2019-05-03 14:18:42 -04:00
Simon Willison bade9daeb2 Docs for 'datasette publish cloudrun', refs #434 2019-05-03 12:16:58 -04:00
Russ Garrett bf229c9bd8 Pass view_name to extra_body_script hook (#443)
At the moment it's not easy to tell whether the hook is being called
in (for example) the row or table view, as in both cases the
`database` and `table` parameters are provided.

This passes the `view_name` added in #441 to the `extra_body_script`
hook.
2019-05-03 09:12:19 -04:00
Simon Willison ea66c45df9
Extract facet code out into a new plugin hook, closes #427 (#445)
Datasette previously only supported one type of faceting: exact column value counting.

With this change, faceting logic is extracted out into one or more separate classes which can implement other patterns of faceting - this is discussed in #427, but potential upcoming facet types include facet-by-date, facet-by-JSON-array, facet-by-many-2-many and more.

A new plugin hook, register_facet_classes, can be used by plugins to add in additional facet classes.

Each class must implement two methods: suggest(), which scans columns in the table to decide if they might be worth suggesting for faceting, and facet_results(), which executes the facet operation and returns results ready to be displayed in the UI.
2019-05-02 17:11:26 -07:00
Simon Willison efc93b8ab5 Entirely removed table_rows_count table property
We were not displaying this anywhere, and it is now expensive to calculate.

Refs #419, #420
2019-05-01 22:29:47 -07:00
Russ Garrett cf406c0754 New plugin hook: register_output_renderer hook (#441)
Thanks @russss!

* Add register_output_renderer hook

This changeset refactors out the JSON renderer and then adds a hook and
dispatcher system to allow custom output renderers to be registered.

The CSV output renderer is untouched because supporting streaming
renderers through this system would be significantly more complex, and
probably not worthwhile.

We can't simply allow hooks to be called at request time because we need
a list of supported file extensions when the request is being routed in
order to resolve ambiguous database/table names. So, renderers need to
be registered at startup.

I've tried to make this API independent of Sanic's request/response
objects so that this can remain stable during the switch to ASGI. I'm
using dictionaries to keep it simple and to make adding additional
options in the future easy.

Fixes #440
2019-05-01 16:01:56 -07:00
Simon Willison 9d73e3c8bd Note that trace data format is very likely to change, refs #435 2019-04-21 10:53:28 -07:00
Simon Willison 58a862cee4 ?_trace=1 now adds SQL trace info to JSON/HTML response
Also added documentation for it. Refs #435
2019-04-21 10:41:16 -07:00
Simon Willison 31f36e1b97
Added some guidelines
Mainly to remind me that master needs to be releasable at all times!
2019-04-20 11:32:40 -07:00
Simon Willison 583b22aa28 New ?column__date=yyyy-mm-dd filter 2019-04-15 15:54:54 -07:00
Simon Willison 1c6649b19b New colname__in=x,y,z filter, closes #433 2019-04-15 15:43:22 -07:00
Simon Willison 2c19a27d15 Documentation for filters, plus new documentation unit test
https://simonwillison.net/2018/Jul/28/documentation-unit-tests/
2019-04-15 15:41:11 -07:00
Simon Willison 9dc7a1824b
Slightly more interesting example link 2019-04-13 15:49:07 -07:00
Simon Willison f2c767c222 Fixed broken link in documentation 2019-04-12 18:57:43 -07:00
Simon Willison bc6a9b4564
?_where= parameter on table views, closes #429
From pull request #430
2019-04-12 18:37:22 -07:00
Simon Willison db74cf0144 ?_fts_table= and ?_fts_pk= arguments, closes #428 2019-04-11 21:21:17 -07:00
Simon Willison 53bf875483 expand_foreign_keys() no longer uses inspect, refs #420 2019-04-06 19:56:07 -07:00
Simon Willison 47032636b5 'datasette serve -i immutable.db' option, refs #419 2019-03-17 16:25:15 -07:00
Simon Willison 6f6d0ff2b4
URL hashing is now off by default - closes #418
Prior to this commit Datasette would calculate the content hash of every
database and redirect to a URL containing that hash, like so:

    https://v0-27.datasette.io/fixtures => https://v0-27.datasette.io/fixtures-dd88475

This assumed that all databases were opened in immutable mode and were not
expected to change.

This will be changing as a result of #419 - so this commit takes the first step
in implementing that change by changing this default behaviour. Datasette will
now only redirect hash-free URLs under two circumstances:

* The new `hash_urls` config option is set to true (it defaults to false).
* The user passes `?_hash=1` in the URL
2019-03-17 15:55:04 -07:00
joelondon 9e8c36793b Update spatialite.rst (#413)
a line of sql added to create the idx_<table_name> in the python recipe
2019-03-14 22:06:45 -07:00
Simon Willison 9743e1d91b Support for :memory: databases
If you start Datasette with no files, it will connect to :memory: instead.

When starting it with files you can add --memory to also get a :memory: database.
2019-03-14 20:54:42 -07:00
Simon Willison bf6b0f918d about and about_url metadata options 2019-03-14 20:54:42 -07:00
Simon Willison 41744d7690
Added datasette-jellyfish 2019-03-09 10:43:12 -08:00
Simon Willison 4147c388cb
Link to sqlite-utils blog entry 2019-03-07 20:30:21 -08:00
Simon Willison 1f91065b20
Added socrata2sql to the ecosystem page
A fantastic new tool created by @achavez at the Dallas Morning News.
2019-02-08 08:06:10 -08:00
Simon Willison d5d39da12b
Expanded section on db-to-sqlite 2019-02-07 22:23:27 -08:00
Simon Willison 436b8bc1d1 Datasette 0.27 2019-01-31 19:47:05 -08:00
Simon Willison b944bcd0f0 Added documentation on the Datasette Ecosystem
https://datasette.readthedocs.io/en/latest/ecosystem.html
2019-01-31 19:36:07 -08:00
Simon Willison b5dd83981a Export option: _shape=array&_nl=on for newline-delimited JSON 2019-01-27 17:40:23 -08:00
Simon Willison 909cc8fbdf New 'datasette plugins' command to list installed plugins 2019-01-26 12:01:16 -08:00
Simon Willison 4722acc73c Release 0.26.1 2019-01-10 16:51:38 -08:00
Simon Willison 8ce7866312 compile_options output in /-/versions, closes #396 2019-01-10 16:44:50 -08:00
Simon Willison 5b02611512
Corrected import path in plugin docs 2019-01-08 16:25:29 -08:00
Simon Willison 424e146697 Datasette 0.26 release notes 2019-01-02 18:53:59 -08:00
Simon Willison d95b46b09b datasette publish now --alias option
You can now use --alias to attempt to alias after you deploy.

Also updated now.json to use version: 1
2019-01-01 21:15:54 -08:00
Simon Willison eac08f0dfc
--reload now also reloads if databases change on disk 2018-12-20 07:51:08 -08:00
Simon Willison 74ad06e128
Updated notes on FTS5 v.s. FTS4 2018-12-18 13:49:51 -08:00
Simon Willison 595da9054e
Better example commit
This one updates the README news section as well
2018-12-16 14:56:56 -08:00
Simon Willison 1e2db8547b
Improved release process documentation 2018-12-16 13:47:39 -08:00
Jay Graves ed78922ae3 Tiny typo in customization docs (#390)
Thanks, @jaywgraves
2018-12-16 13:32:55 -08:00
Simon Willison b5128fc53f
Release 0.25.2 2018-12-16 13:26:37 -08:00
Simon Willison c5f90dd1b2
Added docs on updating docs + the release process 2018-12-16 13:14:50 -08:00
Simon Willison 5e3a432a0c
How to activate your virtual environment 2018-11-14 16:54:54 -08:00
Simon Willison 3dc0b3fa8c
Release 0.25.1 2018-11-04 22:31:41 -08:00
Simon Willison 5debabd3fb
More human friendly 'what is Datasette' intro text 2018-11-04 22:04:23 -08:00
Simon Willison 6b398c2971
Link to dev environment instructions from installation guide 2018-10-27 10:34:31 -07:00
Simon Willison 7dda8898c1
Started contributing docs: setting up a dev environment
https://datasette.readthedocs.io/en/latest/contributing.html
2018-10-27 10:13:08 -07:00
Simon Willison 57a71377c9
Releasing Datasette 0.25 2018-09-19 19:48:12 +02:00
Jay Graves 1bcd54a834 Fix small doc typo - thanks @jaywgraves (#365) 2018-09-19 18:15:42 +01:00
Simon Willison 1f54e09230
Better docs for publish_subcommand() plugin hook 2018-08-28 11:59:50 +01:00
Simon Willison b7c6a9f9bd
extra_css_urls(template, database, table, datasette)
The extra_css_urls and extra_js_urls hooks now take additional optional
parameters.

Also refactored them out of the Datasette class and into RenderMixin.

Plus improved plugin documentation to explicitly list parameters.
2018-08-28 11:56:57 +01:00
Simon Willison 2e836f72d9
render_cell(value, column, table, database, datasette)
The render_cell plugin hook previously was only passed value.

It is now passed (value, column, table, database, datasette).
2018-08-28 03:03:01 -07:00
Simon Willison 9e1fca4b01
Corrected indentation in metadata.rst 2018-08-28 02:56:34 -07:00
Simon Willison 5cf0c6c91c
New plugin hook: extra_body_script 2018-08-28 02:02:49 -07:00
Simon Willison 0a14a4846b
Added plugin_config() method 2018-08-28 01:35:21 -07:00
Simon Willison 7d0299edd4
fts_table and fts_pk metadata configs, available for both tables and views 2018-08-05 17:44:47 -07:00
Simon Willison 5629aaca67
sortable_columns also now works with views 2018-08-05 17:29:23 -07:00
Simon Willison 4ac9132240
render_cell(value) plugin hook, closes #352
New plugin hook for customizing the way cells values are rendered in HTML.

The first full example of this hook in use is https://github.com/simonw/datasette-json-html
2018-08-04 17:14:56 -07:00
Simon Willison 788a542d3c
Docs for IndexView, TableView, RowView, closes #299
Also removed xfail from test_view_classes_are_documented, so any future *View
classes that are added without documentation will cause the tests to fail.
2018-07-27 21:21:42 -07:00
Simon Willison 8da6b0d542
Added labels so unit tests can detect docs, refs #299 2018-07-27 20:26:18 -07:00
Simon Willison dbbe707841
publish_subcommand hook + default plugins mechanism, used for publish heroku/now (#349)
This change introduces a new plugin hook, publish_subcommand, which can be
used to implement new subcommands for the "datasette publish" command family.

I've used this new hook to refactor out the "publish now" and "publish heroku"
implementations into separate modules. I've also added unit tests for these
two publishers, mocking the subprocess.call and subprocess.check_output
functions.

As part of this, I introduced a mechanism for loading default plugins. These
are defined in the new "default_plugins" list inside datasette/app.py

Closes #217 (Plugin support for datasette publish)
Closes #348 (Unit tests for "datasette publish")
Refs #14, #59, #102, #103, #146, #236, #347
2018-07-25 22:15:59 -07:00
Simon Willison bd1db56936
'Usage: datasette', not 'Usage: cli' - refs #336 2018-07-24 09:03:07 -07:00
Simon Willison 74ad3ff4af
Ensure --help examples in docs are always up to date, closes #336
Unit tests now check that docs/*.txt help examples are all up-to-date.

I ran into a problem here in that the terminal_width needed to be more
accurately defined - so I replaced update-docs-help.sh with update-docs-
help.py which hard-codes the terminal width.
2018-07-24 09:01:23 -07:00
Simon Willison 28872a1fa7
Release notes for 0.24 release 2018-07-23 21:34:38 -07:00
Simon Willison 700d83d8ad
?_json_infinity=1 for handling Infinity/-Infinity - fixes #332 2018-07-23 20:07:57 -07:00
Simon Willison f24b49a1a8
New force_https_urls option, refs #333 2018-07-23 08:58:29 -07:00
Simon Willison 6e37f091ed
Support title/description for canned queries, closes #342
Demo here: https://latest.datasette.io/fixtures/neighborhood_search
2018-07-15 19:33:30 -07:00
Russ Garrett 58fec99ab0 Allow app names for `datasette publish heroku`
Lets you supply the `-n` parameter for Heroku deploys, which also lets
you update existing Heroku deployments.
2018-07-14 07:04:42 -07:00
Simon Willison aec3ae5323
Docs for datasette publish and package, closes #337
Also introduced a new mechanism for ensuring the --help examples in the
documentation reflect the current output of the --help commands, via a new
update-docs-help.sh script. Closes #336
2018-07-10 19:05:46 -07:00
Simon Willison 9281a4a804
New tagline: 'A tool for exploring and publishing data' 2018-07-10 19:05:41 -07:00
Simon Willison fc9b1cc136
New truncate_cells_html config for truncating cells, closes #330 2018-07-10 09:20:41 -07:00
Simon Willison 6df6f712b3
Release notes for 0.23.2 2018-07-07 22:28:45 -07:00
Simon Willison 29bd606514
Documentation typo 2018-06-28 00:09:03 -05:00
Simon Willison 7d9bcdd307
Documentation tweaks 2018-06-28 00:07:53 -05:00
Simon Willison ad66c0da2b
Installation instructions, including docker image - closes #328 2018-06-27 22:59:58 -05:00
Simon Willison dea86b9fba
Changelog for 0.23.1 2018-06-21 08:37:13 -07:00
Simon Willison 3683a6b626
Docs + example of canned SQL query using || concatenation
Closes #321
2018-06-20 21:54:36 -07:00
Simon Willison e04f5b0d34
Release notes for 0.23 2018-06-18 08:11:57 -07:00
Simon Willison 04c896160a
Renamed 'stream all records' to 'stream all rows', refs #266 2018-06-18 07:25:44 -07:00
Simon Willison bb4a9fbf36
Docs for CSV export, refs #266 2018-06-18 07:12:21 -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 b252bdb740
Documented how to set multiple --config at once 2018-06-04 18:45:47 -07:00
Simon Willison 29edbe90ff
New cache_size_kb config for SQLite, closes #304 2018-06-04 09:02:07 -07:00
Simon Willison 16398641d9
SQL syntax highlighting in docs 2018-05-31 06:17:53 -07:00
Simon Willison d69ebce533
Fixed broken :ref: 2018-05-29 20:11:24 -07:00
Simon Willison 27eff1809c
Expanded SpatiaLite docs to cover GeoJSON plus lat-lon spatial indexes 2018-05-29 19:32:30 -07:00
Simon Willison 76d11eb768
New ?_json=colname argument for returning unescaped JSON
Also extracted docs for special JSON arguments into a new section.

Closes #31
2018-05-28 11:08:39 -07:00
Simon Willison c972d79b5a
Added docs on Importing shapefiles into SpatiaLite 2018-05-26 18:39:26 -07:00
Simon Willison 7944a8b0de
Added num_sql_threads config option, closes #285 2018-05-26 17:43:22 -07:00
Simon Willison 276913b748
?_shape=arrayfirst, closes #287 2018-05-26 17:32:15 -07:00
Simon Willison b463f60158
?_ttl= parameter and default_cache_ttl config
Refs #285, Closes #289
2018-05-26 15:17:33 -07:00
Simon Willison 08029a2f8f
Hyperlink to www.srihash.org 2018-05-26 12:46:24 -07:00
Simon Willison df71e8cea8
Fixed documentation typo 2018-05-26 11:04:43 -07:00
Simon Willison 37f8361c6f
Initial documentation on using SpatiaLite
https://datasette.readthedocs.io/en/latest/spatialite.html
2018-05-26 11:04:09 -07:00
Simon Willison f722b0a730
allow_sql config option to disable custom SQL, closes #284 2018-05-24 22:50:50 -07:00
Simon Willison 50920cfe3d
allow_facet, allow_download, suggest_facets boolean --config
Refs #284
2018-05-24 18:12:27 -07:00
Simon Willison 5d62527882
0.22.1 bugfix release 2018-05-23 07:00:01 -07:00
Simon Willison d59366d36e
Link to /-/plugins example 2018-05-20 21:07:26 -07:00
Simon Willison 558d9d7bfe
Datasette 0.22: Datasette Facets 2018-05-20 16:41:47 -07:00
Simon Willison 0b8e5981a3
Typo fix 2018-05-20 14:30:48 -07:00
Simon Willison bd3353a31f
Added docs for introspection endpoints
https://datasette.readthedocs.io/en/latest/introspection.html
2018-05-20 14:28:53 -07:00
Simon Willison f6183ff5fa
Renamed --limit to --config, added --help-config, closes #274
Removed the --page_size= argument to datasette serve in favour of:

    datasette serve --config default_page_size:50 mydb.db

Added new help section:

    $ datasette --help-config
    Config options:
      default_page_size            Default page size for the table view
                                   (default=100)
      max_returned_rows            Maximum rows that can be returned from a table
                                   or custom query (default=1000)
      sql_time_limit_ms            Time limit for a SQL query in milliseconds
                                   (default=1000)
      default_facet_size           Number of values to return for requested facets
                                   (default=30)
      facet_time_limit_ms          Time limit for calculating a requested facet
                                   (default=200)
      facet_suggest_time_limit_ms  Time limit for calculating a suggested facet
                                   (default=50)
2018-05-20 10:01:49 -07:00
Simon Willison 2c2e67b9bb
Updated default facet limits in docs 2018-05-18 08:50:37 -07:00
Simon Willison cef9a9a870
--limit= mechanism plus new limits for facets
Replaced the --max_returned_rows and --sql_time_limit_ms options to
"datasette serve" with a new --limit option, which supports a larger
list of limits.

Example usage:

	datasette serve --limit max_returned_rows:1000 \
		--limit sql_time_limit_ms:2500 \
		--limit default_facet_size:50 \
		--limit facet_time_limit_ms:1000 \
		--limit facet_suggest_time_limit_ms:500

New docs: https://datasette.readthedocs.io/en/latest/limits.html

Closes #270
Closes #264
2018-05-17 22:08:26 -07:00
Simon Willison 5e78d11c24
Docs: Speeding up facets with indexes 2018-05-16 21:08:50 -07:00