{"html_url": "https://github.com/simonw/datasette/issues/1179#issuecomment-766484435", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1179", "id": 766484435, "node_id": "MDEyOklzc3VlQ29tbWVudDc2NjQ4NDQzNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-25T01:31:36Z", "updated_at": "2021-01-25T01:31:36Z", "author_association": "OWNER", "body": "Relevant existing tests: https://github.com/simonw/datasette/blob/461670a0b87efa953141b449a9a261919864ceb3/tests/test_utils.py#L365-L398", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 780278550, "label": "Make original path available to render hooks"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1179#issuecomment-766484257", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1179", "id": 766484257, "node_id": "MDEyOklzc3VlQ29tbWVudDc2NjQ4NDI1Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-25T01:30:57Z", "updated_at": "2021-01-25T01:30:57Z", "author_association": "OWNER", "body": "The challenge here is figuring out what the original path, without the `.format`, actually was - while taking into account that Datasette has a special case for tables that themselves end in a `.something`.\r\n\r\nThe `path_with_format()` function nearly does what we need here:\r\n\r\nhttps://github.com/simonw/datasette/blob/b6a7b58fa01af0cd5a5e94bd17d686d283a46819/datasette/utils/__init__.py#L710-L729\r\n\r\nIt can be called with `replace_format=\"csv\"` to REMOVE the `.csv` format and replace it with something else.\r\n\r\nProblem is, we want to use it to get rid of the format entirely.\r\n\r\nWe could update `path_with_format()` to accept `format=''` to mean \"remove the format entirely\", but it's a bit messy. It may be better to reconsider the design of `path_with_format()` and related utility functions entirely.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 780278550, "label": "Make original path available to render hooks"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1179#issuecomment-766434629", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1179", "id": 766434629, "node_id": "MDEyOklzc3VlQ29tbWVudDc2NjQzNDYyOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-24T21:23:47Z", "updated_at": "2021-01-24T21:23:47Z", "author_association": "OWNER", "body": "I'm just going to do `path` and `full_path` (which includes the querystring)`. The `datasette.absolute_url()` method can be used by plugins that need the full URL.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 780278550, "label": "Make original path available to render hooks"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1179#issuecomment-755495387", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1179", "id": 755495387, "node_id": "MDEyOklzc3VlQ29tbWVudDc1NTQ5NTM4Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-06T18:39:23Z", "updated_at": "2021-01-06T18:39:23Z", "author_association": "OWNER", "body": "In that case maybe there are three new arguments: `path`, `full_path` and `url`.\r\n\r\nI'll also add `request.full_path` for consistency with these: https://github.com/simonw/datasette/blob/97fb10c17dd007a275ab743742e93e932335ad67/datasette/utils/asgi.py#L77-L90", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 780278550, "label": "Make original path available to render hooks"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1179#issuecomment-755492945", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1179", "id": 755492945, "node_id": "MDEyOklzc3VlQ29tbWVudDc1NTQ5Mjk0NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-06T18:37:39Z", "updated_at": "2021-01-06T18:37:39Z", "author_association": "OWNER", "body": "I think I'll call this `full_path` for consistency with Django.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 780278550, "label": "Make original path available to render hooks"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1179#issuecomment-755489974", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1179", "id": 755489974, "node_id": "MDEyOklzc3VlQ29tbWVudDc1NTQ4OTk3NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-06T18:35:24Z", "updated_at": "2021-01-06T18:35:24Z", "author_association": "OWNER", "body": "Django calls this ` HttpRequest.get_full_path()` - for the path plus the querystring.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 780278550, "label": "Make original path available to render hooks"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1179#issuecomment-755486103", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1179", "id": 755486103, "node_id": "MDEyOklzc3VlQ29tbWVudDc1NTQ4NjEwMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-06T18:32:41Z", "updated_at": "2021-01-06T18:34:11Z", "author_association": "OWNER", "body": "This parameter will return the URL path, with querystring arguments, to the HTML version of the page - e.g. `/github/issue_comments` or `/github/issue_comments?_sort_desc=created_at`\r\n\r\nOpen questions:\r\n\r\n- What should it be called? `path` could be misleading since it also includes the querystring.\r\n- Should I provide a `url` or `full_url` version which includes `https://blah.com/...`?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 780278550, "label": "Make original path available to render hooks"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1179#issuecomment-755161574", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1179", "id": 755161574, "node_id": "MDEyOklzc3VlQ29tbWVudDc1NTE2MTU3NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-06T08:32:31Z", "updated_at": "2021-01-06T08:32:31Z", "author_association": "OWNER", "body": "An optional `path` argument to https://docs.datasette.io/en/stable/plugin_hooks.html#register-output-renderer-datasette which shows the path WITHOUT the `.Notebook` extension would be useful here.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 780278550, "label": "Make original path available to render hooks"}, "performed_via_github_app": null}