{"html_url": "https://github.com/simonw/datasette/issues/575#issuecomment-716048199", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/575", "id": 716048199, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNjA0ODE5OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-24T20:05:44Z", "updated_at": "2020-10-24T20:05:44Z", "author_association": "OWNER", "body": "https://docs.datasette.io/en/latest/writing_plugins.html#static-assets", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 497162288, "label": "Plugin documentation should cover how to bundle static/templates in setup.py"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1033#issuecomment-716048564", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1033", "id": 716048564, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNjA0ODU2NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-24T20:08:31Z", "updated_at": "2020-10-24T20:08:31Z", "author_association": "OWNER", "body": "Documentation here: https://docs.datasette.io/en/latest/internals.html#datasette-urls", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725099777, "label": "datasette.urls.static_plugins(...) method"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1033#issuecomment-716066000", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1033", "id": 716066000, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNjA2NjAwMA==", "user": {"value": 82988, "label": "psychemedia"}, "created_at": "2020-10-24T22:58:33Z", "updated_at": "2020-10-24T22:58:33Z", "author_association": "CONTRIBUTOR", "body": "From [the docs](https://docs.datasette.io/en/latest/internals.html#datasette-urls), I note:\r\n\r\n```\r\ndatasette.urls.instance()\r\nReturns the URL to the Datasette instance root page. This is usually \"/\"\r\n```\r\n\r\nWhat about the proxy case? Eg if I am using jupyter-server-proxy on a MyBinder or local Jupyter notebook server site, `https://example.com:PORT/weirdpath/datasette`, what does `datasette.urls.instance()` refer to?\r\n\r\n- [ ] `https://example.com:PORT/weirdpath/datasette`\r\n- [ ] `https://example.com:PORT/weirdpath/`\r\n- [ ] `https://example.com:PORT/`\r\n- [ ] `https://example.com`\r\n- [ ] something else?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725099777, "label": "datasette.urls.static_plugins(...) method"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1040#issuecomment-713920562", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1040", "id": 713920562, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzkyMDU2Mg==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2020-10-21T22:44:12Z", "updated_at": "2020-10-24T23:08:14Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1040?src=pr&el=h1) Report\n> Merging [#1040](https://codecov.io/gh/simonw/datasette/pull/1040?src=pr&el=desc) into [main](https://codecov.io/gh/simonw/datasette/commit/bf82b3d6a605c9ddadd5fb739249dfe6defaf635?el=desc) will **increase** coverage by `0.10%`.\n> The diff coverage is `100.00%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1040/graphs/tree.svg?width=650&height=150&src=pr&token=eSahVY7kw1)](https://codecov.io/gh/simonw/datasette/pull/1040?src=pr&el=tree)\n\n```diff\n@@ Coverage Diff @@\n## main #1040 +/- ##\n==========================================\n+ Coverage 84.65% 84.76% +0.10% \n==========================================\n Files 28 28 \n Lines 3924 3938 +14 \n==========================================\n+ Hits 3322 3338 +16 \n+ Misses 602 600 -2 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1040?src=pr&el=tree) | Coverage \u0394 | |\n|---|---|---|\n| [datasette/views/index.py](https://codecov.io/gh/simonw/datasette/pull/1040/diff?src=pr&el=tree#diff-ZGF0YXNldHRlL3ZpZXdzL2luZGV4LnB5) | `98.18% <\u00f8> (+1.69%)` | :arrow_up: |\n| [datasette/views/special.py](https://codecov.io/gh/simonw/datasette/pull/1040/diff?src=pr&el=tree#diff-ZGF0YXNldHRlL3ZpZXdzL3NwZWNpYWwucHk=) | `92.70% <\u00f8> (-0.82%)` | :arrow_down: |\n| [datasette/app.py](https://codecov.io/gh/simonw/datasette/pull/1040/diff?src=pr&el=tree#diff-ZGF0YXNldHRlL2FwcC5weQ==) | `96.37% <100.00%> (+0.17%)` | :arrow_up: |\n| [datasette/views/base.py](https://codecov.io/gh/simonw/datasette/pull/1040/diff?src=pr&el=tree#diff-ZGF0YXNldHRlL3ZpZXdzL2Jhc2UucHk=) | `93.77% <100.00%> (\u00f8)` | |\n| [datasette/views/table.py](https://codecov.io/gh/simonw/datasette/pull/1040/diff?src=pr&el=tree#diff-ZGF0YXNldHRlL3ZpZXdzL3RhYmxlLnB5) | `96.07% <100.00%> (+0.22%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1040?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `\u0394 = absolute (impact)`, `\u00f8 = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/simonw/datasette/pull/1040?src=pr&el=footer). Last update [bf82b3d...4f3165f](https://codecov.io/gh/simonw/datasette/pull/1040?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 726910999, "label": "/db/table/-/blob/pk/column.blob download URL"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1042#issuecomment-715643646", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1042", "id": 715643646, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNTY0MzY0Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-24T00:33:46Z", "updated_at": "2020-10-24T00:33:46Z", "author_association": "OWNER", "body": "I'd like to do this all in the `datasette.render_template()` method to ensure it's available to plugins as well, not just core code that uses the `BaseView` class.\r\n\r\nThis code is the problem:\r\nhttps://github.com/simonw/datasette/blob/d3e9b0aecb6f8e9b2befd9c654ccb7ce852db3e7/datasette/views/base.py#L114-L133\r\n\r\nI think I'll fix this by moving the `select_templates` mechanism into `datasette.render_templates()`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 727802081, "label": "Plugin hook for loading templates"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1042#issuecomment-715643763", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1042", "id": 715643763, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNTY0Mzc2Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-24T00:34:31Z", "updated_at": "2020-10-24T00:34:52Z", "author_association": "OWNER", "body": "I'm going to rename that to template variable from `select_templates` to `templates_considered` too.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 727802081, "label": "Plugin hook for loading templates"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1045#issuecomment-715641183", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1045", "id": 715641183, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNTY0MTE4Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-24T00:19:29Z", "updated_at": "2020-10-24T00:19:29Z", "author_association": "OWNER", "body": "It turns out it already does that:\r\n\r\nhttps://github.com/simonw/datasette/blob/976e5f74aae1fa0d406df6691dc8b5feeebe8788/datasette/app.py#L710-L720\r\n\r\nBut the documentation doesn't reflect that:\r\n\r\n> `template` - string\r\n> \r\n> > The template file to be rendered, e.g. `my_plugin.html`. Datasette will search for this file first in the `--template-dir=` location, if it was specified - then in the plugin's bundled templates and finally in Datasette's set of default templates.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 728600048, "label": "Document that datasette.render_template(template, ...) also accepts a list of templates"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1046#issuecomment-716066342", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1046", "id": 716066342, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNjA2NjM0Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-24T23:02:07Z", "updated_at": "2020-10-24T23:02:25Z", "author_association": "OWNER", "body": "A download icon would be nice for the links in the table display. I like this one https://primer.style/octicons/download-24\r\n\r\n```svg\r\n\r\n \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": 728895193, "label": "Link to blob downloads in the right places"}, "performed_via_github_app": null}