|
1 | 1 | Changelog
|
2 | 2 | =========
|
3 | 3 |
|
| 4 | +0.19 (2018-04-16) |
| 5 | +----------------- |
| 6 | + |
| 7 | +This is the first preview of the new Datasette plugins mechanism. Only two |
| 8 | +plugin hooks are available so far - for custom SQL functions and custom template |
| 9 | +filters. There's plenty more to come - read `the documentation |
| 10 | +<https://datasette.readthedocs.io/en/latest/plugins.html>`_ and get involved in |
| 11 | +`the tracking ticket <https://github.com/simonw/datasette/issues/14>`_ if you |
| 12 | +have feedback on the direction so far. |
| 13 | + |
| 14 | +- Fix for ``_sort_desc=sortable_with_nulls`` test, refs `#216 <https://github.com/simonw/datasette/issues/216>`_ |
| 15 | + |
| 16 | +- Fixed `#216 <https://github.com/simonw/datasette/issues/216>`_ - paginate correctly when sorting by nullable column |
| 17 | + |
| 18 | +- Initial documentation for plugins, closes `#213 <https://github.com/simonw/datasette/issues/213>`_ |
| 19 | + |
| 20 | + https://datasette.readthedocs.io/en/latest/plugins.html |
| 21 | + |
| 22 | +- New ``--plugins-dir=plugins/`` option (`#212 <https://github.com/simonw/datasette/issues/212>`_) |
| 23 | + |
| 24 | + New option causing Datasette to load and evaluate all of the Python files in |
| 25 | + the specified directory and register any plugins that are defined in those |
| 26 | + files. |
| 27 | + |
| 28 | + This new option is available for the following commands:: |
| 29 | + |
| 30 | + datasette serve mydb.db --plugins-dir=plugins/ |
| 31 | + datasette publish now/heroku mydb.db --plugins-dir=plugins/ |
| 32 | + datasette package mydb.db --plugins-dir=plugins/ |
| 33 | + |
| 34 | +- Start of the plugin system, based on pluggy (`#210 <https://github.com/simonw/datasette/issues/14>`_) |
| 35 | + |
| 36 | + Uses https://pluggy.readthedocs.io/ originally created for the py.test project |
| 37 | + |
| 38 | + We're starting with two plugin hooks: |
| 39 | + |
| 40 | + ``prepare_connection(conn)`` |
| 41 | + |
| 42 | + This is called when a new SQLite connection is created. It can be used to register custom SQL functions. |
| 43 | + |
| 44 | + ``prepare_jinja2_environment(env)`` |
| 45 | + |
| 46 | + This is called with the Jinja2 environment. It can be used to register custom template tags and filters. |
| 47 | + |
| 48 | + An example plugin which uses these two hooks can be found at https://github.com/simonw/datasette-plugin-demos or installed using ``pip install datasette-plugin-demos`` |
| 49 | + |
| 50 | + Refs `#14 <https://github.com/simonw/datasette/issues/14>`_ |
| 51 | + |
| 52 | +- Return HTTP 405 on InvalidUsage rather than 500. [Russ Garrett] |
| 53 | + |
| 54 | + This also stops it filling up the logs. This happens for HEAD requests |
| 55 | + at the moment - which perhaps should be handled better, but that's a |
| 56 | + different issue. |
| 57 | + |
| 58 | + |
4 | 59 | 0.18 (2018-04-14)
|
5 | 60 | -----------------
|
6 | 61 |
|
|
0 commit comments