{"database": "github", "table": "issue_comments", "rows": [["https://github.com/simonw/datasette/issues/153#issuecomment-348245843", "https://api.github.com/repos/simonw/datasette/issues/153", 348245843, "MDEyOklzc3VlQ29tbWVudDM0ODI0NTg0Mw==", 9599, "2017-11-30T16:40:02Z", "2017-11-30T16:40:02Z", "OWNER", "It is now possible to over-ride templates on a per-database / per-row or per-\r\ntable basis.\r\n\r\nWhen you access e.g. `/mydatabase/mytable` Datasette will look for the following:\r\n\r\n - table-mydatabase-mytable.html\r\n - table.html\r\n\r\nIf you provided a `--template-dir` argument to datasette serve it will look in\r\nthat directory first.\r\n\r\nThe lookup rules are as follows:\r\n\r\n Index page (/):\r\n index.html\r\n\r\n Database page (/mydatabase):\r\n database-mydatabase.html\r\n database.html\r\n\r\n Table page (/mydatabase/mytable):\r\n table-mydatabase-mytable.html\r\n table.html\r\n\r\n Row page (/mydatabase/mytable/id):\r\n row-mydatabase-mytable.html\r\n row.html\r\n\r\nIf a table name has spaces or other unexpected characters in it, the template\r\nfilename will follow the same rules as our custom `
` CSS classes\r\nintroduced in 8ab3a16 - for example, a table called \"Food Trucks\"\r\nwill attempt to load the following templates:\r\n\r\n table-mydatabase-Food-Trucks-399138.html\r\n table.html\r\n\r\nIt is possible to extend the default templates using Jinja template\r\ninheritance. If you want to customize EVERY row template with some additional\r\ncontent you can do so by creating a `row.html` template like this:\r\n\r\n {% extends \"default:row.html\" %}\r\n\r\n {% block content %}\r\nThis line renders the original block:
\r\n {{ super() }}\r\n {% endblock %}\r\n", "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", 276842536, null]], "columns": ["html_url", "issue_url", "id", "node_id", "user", "created_at", "updated_at", "author_association", "body", "reactions", "issue", "performed_via_github_app"], "primary_keys": ["id"], "primary_key_values": ["348245843"], "units": {}, "query_ms": 0.9167399839498103}