{"html_url": "https://github.com/simonw/datasette/issues/648#issuecomment-625321121", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/648", "id": 625321121, "node_id": "MDEyOklzc3VlQ29tbWVudDYyNTMyMTEyMQ==", "user": {"value": 28694175, "label": "chekos"}, "created_at": "2020-05-07T15:21:19Z", "updated_at": "2020-05-07T15:21:19Z", "author_association": "NONE", "body": "It seems that heroku wasn't updating to 0.41 on deployment. \r\n\r\nHad to add `--branch 0.41` and that solved it! Heroku caches dependencies \r\n\"Screen\r\n\r\nand (i think) because the `requirements.txt` doesn't specify the datasette version, it didn't update from 0.40 to 0.41 on heroku even though it was specified on my local requirements file as `datasette >= 0.41`\r\n\r\nThese are the lines that gave me an idea on how to solve it:\r\nhttps://github.com/simonw/datasette/blob/182e5c8745c94576718315f7596ccc81e5e2417b/datasette/publish/heroku.py#L164-L186", "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/648#issuecomment-625286519", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/648", "id": 625286519, "node_id": "MDEyOklzc3VlQ29tbWVudDYyNTI4NjUxOQ==", "user": {"value": 28694175, "label": "chekos"}, "created_at": "2020-05-07T14:23:22Z", "updated_at": "2020-05-07T14:28:33Z", "author_association": "NONE", "body": "Hi! I'm using datasette on this repository: https://github.com/chekos/RIPA-2018-datasette\r\n\r\nand on my local machine i can see an /about page i created but when i deploy to heroku i get a 404 (http://ripa-2018-db.herokuapp.com)\r\n\r\n\"Screen\r\n\r\n\r\nI bumped datasette in my requirements file to 0.41 so I'm 100% what the issue is \ud83e\udd14 \r\n\r\nDo you have any idea what could be the problem? \ud83d\udc40 \r\n\r\nEDIT: for context, I have a templates directory with a pages/about.html file in https://github.com/chekos/RIPA-2018-datasette/tree/master/datasette/templates", "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/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/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/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/issues/648#issuecomment-619263600", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/648", "id": 619263600, "node_id": "MDEyOklzc3VlQ29tbWVudDYxOTI2MzYwMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-24T22:23:13Z", "updated_at": "2020-04-24T22:23:13Z", "author_association": "OWNER", "body": "Idea: `handle_404` can hand certain not found errors off to `handle_500` so it can render them correctly;\r\n\r\nhttps://github.com/simonw/datasette/blob/227bb3e91fe34811a9374150798643a5af98ed79/datasette/app.py#L748-L765", "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/648#issuecomment-619259859", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/648", "id": 619259859, "node_id": "MDEyOklzc3VlQ29tbWVudDYxOTI1OTg1OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-24T22:10:34Z", "updated_at": "2020-04-24T22:10:34Z", "author_association": "OWNER", "body": "The trickiest part here is the 404 logic. It's spread out through a couple of places right now. It's in `datasette.utils.asgi.AsgiRouter`:\r\n\r\nhttps://github.com/simonw/datasette/blob/227bb3e91fe34811a9374150798643a5af98ed79/datasette/utils/asgi.py#L98-L134\r\n\r\nThen also in the `DatasetteRouter subclass of that:\r\n\r\nhttps://github.com/simonw/datasette/blob/227bb3e91fe34811a9374150798643a5af98ed79/datasette/app.py#L736-L757", "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/648#issuecomment-618775631", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/648", "id": 618775631, "node_id": "MDEyOklzc3VlQ29tbWVudDYxODc3NTYzMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-24T03:03:35Z", "updated_at": "2020-04-24T03:03:35Z", "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\nI 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.", "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/648#issuecomment-618775028", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/648", "id": 618775028, "node_id": "MDEyOklzc3VlQ29tbWVudDYxODc3NTAyOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-04-24T03:01:32Z", "updated_at": "2020-04-24T03:01:32Z", "author_association": "OWNER", "body": "Now that I've closed #577 this should be pretty easy to implement.", "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/648#issuecomment-563015290", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/648", "id": 563015290, "node_id": "MDEyOklzc3VlQ29tbWVudDU2MzAxNTI5MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-12-09T00:18:17Z", "updated_at": "2019-12-09T00:18:17Z", "author_association": "OWNER", "body": "The implementation in https://github.com/simonw/datasette/commit/c5e8cd84d3ef55ed86771ac0bde0ca91d6b0e07a acts as a proof of concept. It has a big flaw though: it doesn't reuse the regular render() mechanism, which means it doesn't register custom template tags from plugins.\r\n\r\nThis is bad because it means that pages rendered in this way cannot take advantage of things like [datasette-template-sql](https://github.com/simonw/datasette-template-sql).\r\n\r\nThis means this issue is likely dependent on #577 - a documented mechanism to allow plugins to render templates.", "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/648#issuecomment-563001064", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/648", "id": 563001064, "node_id": "MDEyOklzc3VlQ29tbWVudDU2MzAwMTA2NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-12-08T22:09:20Z", "updated_at": "2019-12-08T22:09:20Z", "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.", "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/648#issuecomment-563000942", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/648", "id": 563000942, "node_id": "MDEyOklzc3VlQ29tbWVudDU2MzAwMDk0Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-12-08T22:08:14Z", "updated_at": "2019-12-08T22:08:14Z", "author_association": "OWNER", "body": "Alternative idea: a new concept of \"pages\" which live inside `templates/pages/` and where the file name minus the `.html` extension defines the URL.\r\n\r\n`templates/about/me.html` would be served at `/about/me` - but only if no matching database and table were found.\r\n\r\nThis only takes effect on 404 errors from core Datasette.", "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/648#issuecomment-562913040", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/648", "id": 562913040, "node_id": "MDEyOklzc3VlQ29tbWVudDU2MjkxMzA0MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-12-08T04:56:43Z", "updated_at": "2019-12-08T04:56:43Z", "author_association": "OWNER", "body": "Idea: do this with a simple template naming convention.\r\n\r\nIf you hit `/about` and there is no matching database, check for a template file called `about-page.html`. If it exists, render it. Otherwise return a 404 database not found.", "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}