{"html_url": "https://github.com/simonw/datasette/pull/725#issuecomment-619489720", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/725", "id": 619489720, "node_id": "MDEyOklzc3VlQ29tbWVudDYxOTQ4OTcyMA==", "user": {"value": 4312421, "label": "stonebig"}, "created_at": "2020-04-26T06:09:59Z", "updated_at": "2020-04-26T06:10:13Z", "author_association": "NONE", "body": "as a complementary remark: the versioning of datasette dependancies will become a problem when the new pip \"dependancy resolver\" will be activated. for now, it's just warnings via pip checks, later it will be a \"no\":\r\n\r\n````\r\ndatasette 0.40 has requirement aiofiles~=0.4.0, but you have aiofiles 0.5.0.\r\ndatasette 0.40 has requirement Jinja2~=2.10.3, but you have jinja2 2.11.2.\r\n````", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 598891570, "label": "Update aiofiles requirement from ~=0.4.0 to >=0.4,<0.6"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/648#issuecomment-619591380", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/648", "id": 619591380, "node_id": "MDEyOklzc3VlQ29tbWVudDYxOTU5MTM4MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-26T17:33:04Z", "updated_at": "2020-04-26T17:33:04Z", "author_association": "OWNER", "body": "> > Stretch goal: it would be neat if these pages could return custom HTTP headers (eg content-type) and maybe even status codes (eg for redirects) somehow.\r\n> \r\n> I think I could do that with a custom template function - if that function is called during the render then we follow those instructions instead of returning the rendered HTML.\r\n\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 534492501, "label": "Mechanism for adding arbitrary pages like /about"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/737#issuecomment-619591533", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/737", "id": 619591533, "node_id": "MDEyOklzc3VlQ29tbWVudDYxOTU5MTUzMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-26T17:33:48Z", "updated_at": "2020-04-26T17:33:48Z", "author_association": "OWNER", "body": "> > Stretch goal: it would be neat if these pages could return custom HTTP headers (eg content-type) and maybe even status codes (eg for redirects) somehow.\r\n> \r\n> I think I could do that with a custom template function - if that function is called during the render then we follow those instructions instead of returning the rendered HTML.\r\nhttps://github.com/simonw/datasette/issues/648#issuecomment-619591380", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 607067303, "label": "Custom pages mechanism, refs #648"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/737#issuecomment-619593811", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/737", "id": 619593811, "node_id": "MDEyOklzc3VlQ29tbWVudDYxOTU5MzgxMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-26T17:48:31Z", "updated_at": "2020-04-26T17:48:31Z", "author_association": "OWNER", "body": "Design challenge: the function that can be called in the custom template to return a custom status code and/or headers.\r\n\r\nProposed design:\r\n```\r\n{{ custom_headers({\"x-foo\": \"bar\"}) }}\r\n{{ custom_status_code(404) }}\r\n```\r\nOr should I combine them into one function?\r\n```\r\n{{ custom_headers({\"x-foo\": \"bar\"}, status=404) }}\r\n```\r\nA common use-case here would be a redirect. How should that look?\r\n```\r\n{{ custom_redirect(\"/foo\") }} - defaults to 301\r\n{{ custom_redirect(\"/foo\", status=302) }}\r\n```\r\nMaybe avoid dictionary syntax entirely:\r\n```\r\n{{ custom_header(\"x-foo\", \"bar\") }}\r\n```\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 607067303, "label": "Custom pages mechanism, refs #648"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/737#issuecomment-619593899", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/737", "id": 619593899, "node_id": "MDEyOklzc3VlQ29tbWVudDYxOTU5Mzg5OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-26T17:49:06Z", "updated_at": "2020-04-26T17:49:06Z", "author_association": "OWNER", "body": "I'm going with `custom_header(name, value)`, `custom_status(numeric_code)`, `custom_redirect(\"URL\")`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 607067303, "label": "Custom pages mechanism, refs #648"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/737#issuecomment-619599904", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/737", "id": 619599904, "node_id": "MDEyOklzc3VlQ29tbWVudDYxOTU5OTkwNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-26T18:21:06Z", "updated_at": "2020-04-26T18:21:06Z", "author_association": "OWNER", "body": "Just needs documentation now.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 607067303, "label": "Custom pages mechanism, refs #648"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/648#issuecomment-619604720", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/648", "id": 619604720, "node_id": "MDEyOklzc3VlQ29tbWVudDYxOTYwNDcyMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-26T18:50:30Z", "updated_at": "2020-04-26T18:50:30Z", "author_association": "OWNER", "body": "Documentation: https://datasette.readthedocs.io/en/latest/custom_templates.html#custom-pages", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 534492501, "label": "Mechanism for adding arbitrary pages like /about"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/738#issuecomment-619605811", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/738", "id": 619605811, "node_id": "MDEyOklzc3VlQ29tbWVudDYxOTYwNTgxMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-26T18:58:56Z", "updated_at": "2020-04-26T18:58:56Z", "author_association": "OWNER", "body": "https://github.com/simonw/datasette/blob/304e7b1d9fd904ae1c35600bc03662eb90eeeae0/datasette/app.py#L781-L789\r\n\r\n`request` is an optional argument here:\r\n\r\nhttps://github.com/simonw/datasette/blob/304e7b1d9fd904ae1c35600bc03662eb90eeeae0/datasette/app.py#L556-L558", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 607086780, "label": "Pass a request object to custom page templates"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/731#issuecomment-619611417", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/731", "id": 619611417, "node_id": "MDEyOklzc3VlQ29tbWVudDYxOTYxMTQxNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-26T19:28:12Z", "updated_at": "2020-04-26T19:28:12Z", "author_association": "OWNER", "body": "I've shipped #648 now, so no reason not to go with the `static/` folder as the thing that gets detected and mounted as `/static`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 605110015, "label": "Option to automatically configure based on directory layout"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/648#issuecomment-619612675", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/648", "id": 619612675, "node_id": "MDEyOklzc3VlQ29tbWVudDYxOTYxMjY3NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-26T19:35:09Z", "updated_at": "2020-04-26T19:35:09Z", "author_association": "OWNER", "body": "https://www.niche-museums.com/about now uses this mechanism. It used to be an empty `about.db` database but you can see from https://www.niche-museums.com/-/databases that it's now using the new mechanism.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 534492501, "label": "Mechanism for adding arbitrary pages like /about"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/731#issuecomment-619621388", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/731", "id": 619621388, "node_id": "MDEyOklzc3VlQ29tbWVudDYxOTYyMTM4OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-26T20:38:09Z", "updated_at": "2020-04-26T20:38:30Z", "author_association": "OWNER", "body": "Work now happening in the pull request: https://github.com/simonw/datasette/issues/739", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 605110015, "label": "Option to automatically configure based on directory layout"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/739#issuecomment-619622311", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/739", "id": 619622311, "node_id": "MDEyOklzc3VlQ29tbWVudDYxOTYyMjMxMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-26T20:45:07Z", "updated_at": "2020-04-26T20:45:07Z", "author_association": "OWNER", "body": "I think ALL explicit options should over-ride options that were detected in the directory structure. This means my current implementation isn't quite right - using a class method makes it hard to merge the details with the explicit options passed to the CLI function.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 607107849, "label": "Configuration directory mode"}, "performed_via_github_app": null}