datasette/datasette
Simon Willison a743cdeafc
Canned query support + database/query template refactor
Named canned queries can now be defined in metadata.json like this:

    {
        "databases": {
            "timezones": {
                "queries": {
                    "timezone_for_point": "select tzid from timezones ..."
                }
            }
        }
    }

These will be shown in a new "Queries" section beneath "Views" on the database page.

As part of this, I refactored the logic for the database index page. It used
to combine the functionality for listing available tables and the
functionality for executing custom SQL queries in a single template and view.
I have split that template out into database.html and query.html and reworked
the view to more clearly separate the custom SQL executing code.

Refs #20
2017-12-05 08:17:02 -08:00
..
static Fix display of select boxes in Firefox 2017-12-02 12:53:08 -08:00
templates Canned query support + database/query template refactor 2017-12-05 08:17:02 -08:00
__init__.py Added __version__, bumped it to 0.12 2017-11-16 07:20:54 -08:00
app.py Canned query support + database/query template refactor 2017-12-05 08:17:02 -08:00
cli.py --static option for datasette serve 2017-12-03 08:33:36 -08:00
utils.py Allow WITH query (previously we required SELECT at start) 2017-12-03 20:51:31 -08:00
version.py Release version 0.13 2017-11-24 19:33:39 -08:00