datasette/datasite
Simon Willison 1fc75809a6 Refactored everything into a factory function
I now call a factory function to construct the Sanic app:

    app = app_factory(files)

This allows me to pass additional arguments to it, e.g. the files to serve.

Also refactored my class-based views to accept jinja as an argument, e.g:

    app.add_route(
        TableView.as_view(jinja),
        '/<db_name:[^/]+>/<table:[^/]+?><as_json:(.jsono?)?$>'
    )
2017-11-04 19:13:44 -07:00
..
templates Started work on cli, which also meant adding setup.py 2017-10-27 00:08:24 -07:00
__init__.py Started work on cli, which also meant adding setup.py 2017-10-27 00:08:24 -07:00
app.py Refactored everything into a factory function 2017-11-04 19:13:44 -07:00
cli.py Refactored everything into a factory function 2017-11-04 19:13:44 -07:00