Commit graph

9 commits

Author SHA1 Message Date
Simon Willison
5c5e9b3657 Request.fake(... url_vars), plus .fake() is now documented
Also made 'from datasette import Request' shortcut work.

Closes #1697
2022-03-31 19:01:58 -07:00
Simon Willison
8a25ea9bca Implemented import shortcuts, closes #957 2022-02-05 22:34:33 -08:00
Simon Willison
35d6ee2790
Apply black to everything, enforce via unit tests (#449)
I've run the black code formatting tool against everything:

    black tests datasette setup.py

I also added a new unit test, in tests/test_black.py, which will fail if the code does not
conform to black's exacting standards.

This unit test only runs on Python 3.6 or higher, because black itself doesn't run on 3.5.
2019-05-03 22:15:14 -04:00
Robert Gieseke
49f317752c Move version info back to separate module 2018-05-22 12:35:21 -07:00
Robert Gieseke
fc47dacbbd Add __version_info__ derived from __version__
This might be tuple of more than two values (major and minor
version) if commits have been made after a release.
2018-05-22 12:35:21 -07:00
Robert Gieseke
a113c28ea1 Add version number support with Versioneer
Repo:
https://github.com/warner/python-versioneer

Versioneer Licence:
Public Domain (CC0-1.0)

Closes #273
2018-05-22 12:35:21 -07:00
Simon Willison
33c7c53ff8
Start of the plugin system, based on pluggy (#210)
Uses https://pluggy.readthedocs.io/ originally created for the py.test project

We're starting with two plugin hooks:

prepare_connection(conn)

This is called when a new SQLite connection is created. It can be used to register custom SQL functions.

prepare_jinja2_environment(env)

This is called with the Jinja2 environment. It can be used to register custom template tags and filters.

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`

Refs #14
2018-04-15 17:56:15 -07:00
Simon Willison
228bce83a3 Added __version__, bumped it to 0.12
Closes #108
2017-11-16 07:20:54 -08:00
Simon Willison
e7e50875d3 Renamed to 'datasette' 2017-11-10 10:38:35 -08:00
Renamed from immutabase/__init__.py (Browse further)