sha,message,author_date,committer_date,raw_author,raw_author_label,raw_committer,raw_committer_label,repo,repo_label,author,author_label,committer,committer_label 1feb5735dad538312fac8b76705c05516250967b,Moved getting started into separate docs page,2017-11-30T18:27:00Z,2017-11-30T18:27:00Z,13ae486343ea6454a93114c6f558ffea2f2c6874,Simon Willison,13ae486343ea6454a93114c6f558ffea2f2c6874,Simon Willison,107914493,datasette,9599,simonw,9599,simonw 3cd06729f457d690603b6060dc552b535517ab09,"Ability to over-ride templates for individual tables/databases It is now possible to over-ride templates on a per-database / per-row or per- table basis. When you access e.g. /mydatabase/mytable Datasette will look for the following: - table-mydatabase-mytable.html - table.html If you provided a --template-dir argument to datasette serve it will look in that directory first. The lookup rules are as follows: Index page (/): index.html Database page (/mydatabase): database-mydatabase.html database.html Table page (/mydatabase/mytable): table-mydatabase-mytable.html table.html Row page (/mydatabase/mytable/id): row-mydatabase-mytable.html row.html If a table name has spaces or other unexpected characters in it, the template filename will follow the same rules as our custom CSS classes introduced in 8ab3a169d42d096f - for example, a table called ""Food Trucks"" will attempt to load the following templates: table-mydatabase-Food-Trucks-399138.html table.html It is possible to extend the default templates using Jinja template inheritance. If you want to customize EVERY row template with some additional content you can do so by creating a row.html template like this: {% extends ""default:row.html"" %} {% block content %}

EXTRA HTML AT THE TOP OF THE CONTENT BLOCK

This line renders the original block:

{{ super() }} {% endblock %} Closes #12, refs #153",2017-11-30T16:30:10Z,2017-11-30T16:38:16Z,13ae486343ea6454a93114c6f558ffea2f2c6874,Simon Willison,13ae486343ea6454a93114c6f558ffea2f2c6874,Simon Willison,107914493,datasette,9599,simonw,9599,simonw 601934936c9e6e0007aca13547b73c3b36343f7f,"Documentation for custom CSS/JavaScript/Templates Will go live at http://datasette.readthedocs.io/en/latest/custom_templates.html Closes #156",2017-11-30T17:09:48Z,2017-11-30T17:09:48Z,13ae486343ea6454a93114c6f558ffea2f2c6874,Simon Willison,13ae486343ea6454a93114c6f558ffea2f2c6874,Simon Willison,107914493,datasette,9599,simonw,9599,simonw 7ff51598c468deb1d2c0d4c23a808458c9b1e3a2,"git commit -m ""datasette --template-dir=mytemplates/"" argument You can now pass an additional argument specifying a directory to look for custom templates in. Datasette will fall back on the default templates if a template is not found in that directory. Refs #12, #153",2017-11-30T16:05:01Z,2017-11-30T16:05:01Z,13ae486343ea6454a93114c6f558ffea2f2c6874,Simon Willison,13ae486343ea6454a93114c6f558ffea2f2c6874,Simon Willison,107914493,datasette,9599,simonw,9599,simonw 8ab3a169d42d096f2c7979c6d3d7746618d30f0b,"CSS styling hooks as classes on the body Refs #153 Every template now gets CSS classes in the body designed to support custom styling. The index template (the top level page at /) gets this: The database template (/dbname/) gets this: The table template (/dbname/tablename) gets: The row template (/dbname/tablename/rowid) gets: The db-x and table-x classes use the database or table names themselves IF they are valid CSS identifiers. If they aren't, we strip any invalid characters out and append a 6 character md5 digest of the original name, in order to ensure that multiple tables which resolve to the same stripped character version still have different CSS classes. Some examples (extracted from the unit tests): ""simple"" => ""simple"" ""MixedCase"" => ""MixedCase"" ""-no-leading-hyphens"" => ""no-leading-hyphens-65bea6"" ""_no-leading-underscores"" => ""no-leading-underscores-b921bc"" ""no spaces"" => ""no-spaces-7088d7"" ""-"" => ""336d5e"" ""no $ characters"" => ""no--characters-59e024""",2017-11-30T07:09:54Z,2017-11-30T07:09:54Z,13ae486343ea6454a93114c6f558ffea2f2c6874,Simon Willison,13ae486343ea6454a93114c6f558ffea2f2c6874,Simon Willison,107914493,datasette,9599,simonw,9599,simonw cf46b86cf736aadd5147f85bfd6ff44c29655fde,Switch to sphinx_rtd_theme,2017-11-30T16:56:20Z,2017-11-30T16:56:20Z,13ae486343ea6454a93114c6f558ffea2f2c6874,Simon Willison,13ae486343ea6454a93114c6f558ffea2f2c6874,Simon Willison,107914493,datasette,9599,simonw,9599,simonw ffa77f62b46e1ddf2f848f5da10a1e958323a084,"Removed dependency on sanic-jinja2 I wasn't using any of the functionality it adds on top of raw Jinja2. Refs #12 and #153",2017-11-30T15:51:40Z,2017-11-30T15:51:40Z,13ae486343ea6454a93114c6f558ffea2f2c6874,Simon Willison,13ae486343ea6454a93114c6f558ffea2f2c6874,Simon Willison,107914493,datasette,9599,simonw,9599,simonw