{"html_url": "https://github.com/simonw/datasette/issues/1027#issuecomment-709646865", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1027", "id": 709646865, "node_id": "MDEyOklzc3VlQ29tbWVudDcwOTY0Njg2NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-15T23:47:08Z", "updated_at": "2020-10-15T23:47:08Z", "author_association": "OWNER", "body": "It should cover both nginx and Apache. nginx config is here: https://github.com/simonw/datasette/issues/1024#issuecomment-709598324", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722758132, "label": "Add documentation on serving Datasette behind a proxy using base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1027#issuecomment-709647525", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1027", "id": 709647525, "node_id": "MDEyOklzc3VlQ29tbWVudDcwOTY0NzUyNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-15T23:49:51Z", "updated_at": "2020-10-15T23:51:39Z", "author_association": "OWNER", "body": "I'll install Apache on macOS to figure this out using https://formulae.brew.sh/formula/httpd\r\n\r\n`brew install httpd` output this at the end:\r\n\r\n```\r\n==> httpd\r\nDocumentRoot is /usr/local/var/www.\r\n\r\nThe default ports have been set in /usr/local/etc/httpd/httpd.conf to 8080 and in\r\n/usr/local/etc/httpd/extra/httpd-ssl.conf to 8443 so that httpd can run without sudo.\r\n\r\nTo have launchd start httpd now and restart at login:\r\n brew services start httpd\r\nOr, if you don't want/need a background service you can just run:\r\n apachectl start\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722758132, "label": "Add documentation on serving Datasette behind a proxy using base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1027#issuecomment-710750038", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1027", "id": 710750038, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMDc1MDAzOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-17T05:00:19Z", "updated_at": "2020-10-17T05:00:19Z", "author_association": "OWNER", "body": "Running `apachectl -X` appears to run Apache in the foreground so I can hit Ctrl+C to quit it again, using the config file at `/usr/local/etc/httpd/httpd.conf` and serving the `index.html` file from `/usr/local/var/www` (which confusingly says \"Welcome to nginx\", presumably because I installed nginx via Homebrew earlier).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722758132, "label": "Add documentation on serving Datasette behind a proxy using base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1027#issuecomment-712320103", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1027", "id": 712320103, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjMyMDEwMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-19T17:35:04Z", "updated_at": "2020-10-19T17:35:04Z", "author_association": "OWNER", "body": "Still need to configure proxying though. https://www.netnea.com/cms/apache-tutorial-9_setting-up-a-reverse-proxy/", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722758132, "label": "Add documentation on serving Datasette behind a proxy using base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1027#issuecomment-719988113", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1027", "id": 719988113, "node_id": "MDEyOklzc3VlQ29tbWVudDcxOTk4ODExMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-31T21:03:37Z", "updated_at": "2020-10-31T21:03:37Z", "author_association": "OWNER", "body": "On my Mac, I run:\r\n\r\n datasette . -p 8009 --config base_url:/datasette-prefix/\r\n\r\nThen I edited `/usr/local/etc/httpd/httpd.conf` and add this section:\r\n```\r\nLoadModule proxy_module lib/httpd/modules/mod_proxy.so\r\nLoadModule proxy_http_module lib/httpd/modules/mod_proxy_http.so\r\nProxyPass /datasette-prefix/ http://localhost:8009/datasette-prefix/\r\n```\r\nI ran Apache in the foreground like so:\r\n\r\n apachectl -X\r\n\r\nNow hitting http://localhost:8081/datasette-prefix/fixtures/compound_three_primary_keys worked!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 722758132, "label": "Add documentation on serving Datasette behind a proxy using base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1028#issuecomment-712480866", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1028", "id": 712480866, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjQ4MDg2Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-19T22:39:51Z", "updated_at": "2020-10-19T22:39:51Z", "author_association": "OWNER", "body": "Documentation: https://docs.datasette.io/en/latest/spatialite.html", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 723803777, "label": "--load-extension=spatialite shortcut"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1029#issuecomment-711072903", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1029", "id": 711072903, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMTA3MjkwMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-17T20:04:31Z", "updated_at": "2020-10-17T20:04:31Z", "author_association": "OWNER", "body": "Thanks!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 723837704, "label": "fix(docs): broken link"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/103#issuecomment-754188099", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/103", "id": 754188099, "node_id": "MDEyOklzc3VlQ29tbWVudDc1NDE4ODA5OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-04T20:05:14Z", "updated_at": "2021-01-04T20:05:14Z", "author_association": "OWNER", "body": "Wontfix, Cloud Run is already implemented and is a better fit for Datasette.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274265878, "label": "datasette publish appengine"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1031#issuecomment-714206875", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1031", "id": 714206875, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNDIwNjg3NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-22T04:01:19Z", "updated_at": "2020-10-22T04:01:19Z", "author_association": "OWNER", "body": "I don't fully understand the bug you're fixing here. Could you provide a bit more explanation?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 724369025, "label": "Fallback to databases in inspect-data.json when no -i options are passed"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1031#issuecomment-808989067", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1031", "id": 808989067, "node_id": "MDEyOklzc3VlQ29tbWVudDgwODk4OTA2Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T00:23:41Z", "updated_at": "2021-03-29T00:23:41Z", "author_association": "OWNER", "body": "This bug should have been fixed in #1229 - let me know if that's not the case!\r\n\r\nThanks", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 724369025, "label": "Fallback to databases in inspect-data.json when no -i options are passed"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1031#issuecomment-809010713", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1031", "id": 809010713, "node_id": "MDEyOklzc3VlQ29tbWVudDgwOTAxMDcxMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-29T01:46:45Z", "updated_at": "2021-03-29T01:46:45Z", "author_association": "OWNER", "body": "Sorry I didn't get to this PR sooner. I've joint-credited you in the release notes for this fix: https://docs.datasette.io/en/stable/changelog.html#v0-56", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 724369025, "label": "Fallback to databases in inspect-data.json when no -i options are passed"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1032#issuecomment-712363344", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1032", "id": 712363344, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjM2MzM0NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-19T18:31:46Z", "updated_at": "2020-10-19T18:31:46Z", "author_association": "OWNER", "body": "As always with dates, the challenge is America. `mm/dd/yy` is indistinguishable from the more sensible `dd/mm/yy`. It's crucially important to visibly tell people which format you assumed, otherwise all kinds of weird invisible bugs can manifest.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 724878151, "label": "Bring date parsing into Datasette core"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1032#issuecomment-712363825", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1032", "id": 712363825, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjM2MzgyNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-19T18:32:43Z", "updated_at": "2020-10-19T18:32:43Z", "author_association": "OWNER", "body": "Horrible thought: I bet there is data out there that uses more than one date format in the same table! So this needs to be exposed as a visible per-column setting.\r\n\r\nColumn action menu can help here, although it's not yet the full solution because it isn't yet visible on mobile.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 724878151, "label": "Bring date parsing into Datasette core"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1032#issuecomment-712364317", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1032", "id": 712364317, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjM2NDMxNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-19T18:33:42Z", "updated_at": "2020-10-19T18:33:42Z", "author_association": "OWNER", "body": "Related challenge: timezones. I think I'll punt on those for the moment and just concentrate on dates, but I should keep them in mind.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 724878151, "label": "Bring date parsing into Datasette core"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1032#issuecomment-712364532", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1032", "id": 712364532, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjM2NDUzMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-19T18:34:10Z", "updated_at": "2020-10-19T18:34:10Z", "author_association": "OWNER", "body": "Lots of great example date data in https://biglocal.datasettes.com/COVID_WARN_Notices", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 724878151, "label": "Bring date parsing into Datasette core"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1032#issuecomment-712365236", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1032", "id": 712365236, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjM2NTIzNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-19T18:35:25Z", "updated_at": "2020-10-19T18:35:25Z", "author_association": "OWNER", "body": "Since I'm dealing with tables of data I usually have a whole column of examples, so heuristics that check for numbers-greater-than-12 could actually work well for many cases.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 724878151, "label": "Bring date parsing into Datasette core"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1032#issuecomment-712365439", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1032", "id": 712365439, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjM2NTQzOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-19T18:35:50Z", "updated_at": "2020-10-19T18:37:57Z", "author_association": "OWNER", "body": "Maybe I don't need to add `dateutil` as a dependency here?\r\n\r\n`pendulum` and `arrow` both depend on it so it's pretty deeply embedded in the Python date ecosystem. Adding it as a dependency seems reasonable.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 724878151, "label": "Bring date parsing into Datasette core"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1032#issuecomment-712367285", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1032", "id": 712367285, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjM2NzI4NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-19T18:39:32Z", "updated_at": "2020-10-19T18:39:32Z", "author_association": "OWNER", "body": "https://github.com/digital-land/brownfield-land-collection/blob/a09ddf9960a6af59e72dc02448f7b645e59bf227/bin/harmonise.py#L217-L247 is a beautiful example of this problem.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 724878151, "label": "Bring date parsing into Datasette core"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1033#issuecomment-712529413", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1033", "id": 712529413, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjUyOTQxMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T01:21:12Z", "updated_at": "2020-10-20T01:21:12Z", "author_association": "OWNER", "body": "Also refs #1023", "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/issues/1033#issuecomment-714681365", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1033", "id": 714681365, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNDY4MTM2NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-22T18:33:48Z", "updated_at": "2020-10-22T18:33:48Z", "author_association": "OWNER", "body": "That's a good question - I hadn't considered that. I'm going to open a new issue to have `extra_js_urls` respect the `base_url` setting, since the static files will be served from a different location.", "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/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/1034#issuecomment-712580976", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 712580976, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjU4MDk3Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T04:29:23Z", "updated_at": "2020-10-20T04:29:23Z", "author_association": "OWNER", "body": "Most obvious option is base64. Any other potential solutions I'm missing?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-712581994", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 712581994, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjU4MTk5NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T04:33:28Z", "updated_at": "2020-10-20T04:33:28Z", "author_association": "OWNER", "body": "The [datasette-render-binary](https://github.com/simonw/datasette-render-binary) plugin does this, which I really like - but without the different coloured fonts I'm not sure how readable it would be as just plain text:\r\n\r\n![image](https://user-images.githubusercontent.com/9599/96540435-9c125f00-1252-11eb-85aa-5fc8d0e63728.png)\r\n\r\nReally the goal here is to find the most human-friendly option, so that people looking at the output have a vague idea what's going on. That's why I'm not leaping at the chance to use base64.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-712582699", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 712582699, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjU4MjY5OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T04:36:04Z", "updated_at": "2020-10-20T04:36:14Z", "author_association": "OWNER", "body": "Asked for ideas on Twitter: https://twitter.com/simonw/status/1318409558805467136", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-713172901", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 713172901, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE3MjkwMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:19:10Z", "updated_at": "2020-10-20T22:20:28Z", "author_association": "OWNER", "body": "I could go with the same format as `datasette-render-binary` but using `0x00` as the format for the hex bytes.\r\n\r\n 0x15 0x1C 0x02 0xC7 JFIF 0x00 0x01\r\n\r\nProblem with this is that it's ambiguous: if the ASCII characters `0x15` occur in the text they will be indistinguishable from those hex bytes.\r\n\r\nBut since representing binary data in CSV fundamentally doesn't make sense I'm not sure if that really matters.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-713174341", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 713174341, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE3NDM0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:22:53Z", "updated_at": "2020-10-20T22:23:14Z", "author_association": "OWNER", "body": "An even easier option: do what the Datasette UI does and output `` for that CSV cell, as seen on https://latest.datasette.io/fixtures/binary_data", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-713174690", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 713174690, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE3NDY5MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:23:50Z", "updated_at": "2020-10-20T22:23:50Z", "author_association": "OWNER", "body": "Or... default to `` and support a `?_base64=1` option which outputs in base64 instead.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-713175741", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 713175741, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE3NTc0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:26:45Z", "updated_at": "2020-10-20T22:26:45Z", "author_association": "OWNER", "body": "> New idea: since binary in CSV doesn't make sense anyway, emulate Datasette's HTML UI default and output this:\r\n> \r\n> id,title,data\r\n> 1,Some title,\r\n> 2,Other title,\r\n> \r\n> Then allow users to add ?_base64=1 to the URL to get base64 instead\r\n> https://twitter.com/simonw/status/1318679950635888641", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-713176082", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 713176082, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE3NjA4Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:27:33Z", "updated_at": "2020-10-20T22:27:33Z", "author_association": "OWNER", "body": "This feels good to me - it's consistent with how other features in Datasette work, and it means users who need the binary data in CSV (for whatever reason) can get it if they want to.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-713191819", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 713191819, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE5MTgxOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T23:12:58Z", "updated_at": "2020-10-20T23:12:58Z", "author_association": "OWNER", "body": "Enzo has a great solution here: https://twitter.com/enzo_mdd/status/1318685442976436226\r\n\r\n> Or maybe an option for a url. This keeps the CSV small but allows scripts to download binary data as needed.\r\n\r\nIn #1036 I'm planning on adding a way for users to access BLOB data. I can include that URL in the CSV output.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-713277810", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 713277810, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzI3NzgxMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-21T03:40:50Z", "updated_at": "2020-10-25T01:01:23Z", "author_association": "OWNER", "body": "Blocked awaiting #1036 (update: now unblocked)", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-716077436", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 716077436, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNjA3NzQzNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-25T01:08:35Z", "updated_at": "2020-10-25T01:08:42Z", "author_association": "OWNER", "body": "This is actually a bit tricky to implement, for a few reasons:\r\n\r\n- Need to generate a full URL, including the `https://host/` bit. I've done this for `next_url` in the JSON output before, thankfully.\r\n- This only makes sense for CSV output for tables. If it's the CSV output of an arbitrary query there's no `/db/table/-/blob/pk/column.blob` page for me to link to.\r\n- Need to generate those `/.../-/blob/...` URLs for the data that is being output as CSV.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-716077508", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 716077508, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNjA3NzUwOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-25T01:09:17Z", "updated_at": "2020-10-25T01:09:17Z", "author_association": "OWNER", "body": "Here's how those absolute `next_url` values are generated: https://github.com/simonw/datasette/blob/5db7ae3ce165ded57c7fb1cfbdb3258b1cf06c10/datasette/views/table.py#L774-L776", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-716077541", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 716077541, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNjA3NzU0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-25T01:09:38Z", "updated_at": "2020-10-25T01:10:04Z", "author_association": "OWNER", "body": "I should turn `datasette.absolute_url(...)` into a documented internal API on https://docs.datasette.io/en/stable/internals.html#datasette-class", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-716078420", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 716078420, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNjA3ODQyMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-25T01:20:00Z", "updated_at": "2020-10-25T01:20:00Z", "author_association": "OWNER", "body": "That documentation: https://docs.datasette.io/en/latest/internals.html#absolute-url-request-path", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-716078512", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 716078512, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNjA3ODUxMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-25T01:21:11Z", "updated_at": "2020-10-25T01:21:11Z", "author_association": "OWNER", "body": "What should happen for CSV export of arbitrary SQL queries, where there's no obvious BLOB to link to?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-716078605", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 716078605, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNjA3ODYwNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-25T01:22:22Z", "updated_at": "2020-10-25T01:22:22Z", "author_association": "OWNER", "body": "For arbitrary CSV the only solution I can think of is to embed the base64 value.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-716078777", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 716078777, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNjA3ODc3Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-25T01:25:11Z", "updated_at": "2020-10-25T01:25:11Z", "author_association": "OWNER", "body": "SQLite actually has APIs that could help here: https://www.sqlite.org/c3ref/column_database_name.html - for any given SQL query they identify the origin/table/column that is the source of each resulting column.\r\n\r\nThose aren't exposed in the Python `sqlite3` module though, so using them could be extremely tricky.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-719050754", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 719050754, "node_id": "MDEyOklzc3VlQ29tbWVudDcxOTA1MDc1NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-29T22:04:52Z", "updated_at": "2020-10-29T22:04:52Z", "author_association": "OWNER", "body": "I'm going to link to. the new `.blob` representation using the new `?_blob_hash=xxx` argument to ensure that the content served is the expected binary blob.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1034#issuecomment-719094027", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1034", "id": 719094027, "node_id": "MDEyOklzc3VlQ29tbWVudDcxOTA5NDAyNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-30T00:11:17Z", "updated_at": "2020-10-30T00:11:17Z", "author_association": "OWNER", "body": "Demos:\r\n\r\nhttps://latest.datasette.io/fixtures/binary_data.csv?_size=max\r\n\r\n```csv\r\nrowid,data\r\n1,http://latest.datasette.io/fixtures/binary_data/1.blob?_blob_column=data\r\n2,http://latest.datasette.io/fixtures/binary_data/2.blob?_blob_column=data\r\n3,\r\n```\r\n\r\nhttps://latest.datasette.io/fixtures.csv?sql=select+rowid%2C+data+from+binary_data+order+by+rowid+limit+1001&_size=max\r\n\r\n```csv\r\nrowid,data\r\n1,http://latest.datasette.io/fixtures.blob?sql=select+rowid%2C+data+from+binary_data+order+by+rowid+limit+1001&_size=max&_blob_column=data&_blob_hash=f3088978da8f9aea479ffc7f631370b968d2e855eeb172bea7f6c7a04262bb6d\r\n2,http://latest.datasette.io/fixtures.blob?sql=select+rowid%2C+data+from+binary_data+order+by+rowid+limit+1001&_size=max&_blob_column=data&_blob_hash=b835b0483cedb86130b9a2c280880bf5fadc5318ddf8c18d0df5204d40df1724\r\n3,\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725184645, "label": "Better way of representing binary data in .csv output"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1035#issuecomment-712963959", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1035", "id": 712963959, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjk2Mzk1OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T16:11:25Z", "updated_at": "2020-10-20T16:11:25Z", "author_association": "OWNER", "body": "Relevant code:\r\n\r\nhttps://github.com/simonw/datasette/blob/091441a4449beae559a8c0d007376dc85d3aa624/datasette/utils/__init__.py#L681-L696\r\n\r\nOnly used here:\r\n\r\nhttps://github.com/simonw/datasette/blob/091441a4449beae559a8c0d007376dc85d3aa624/datasette/views/base.py#L498-L502", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725743755, "label": "datasette.urls.table(..., format=\"json\") argument"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1035#issuecomment-712965574", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1035", "id": 712965574, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjk2NTU3NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T16:13:57Z", "updated_at": "2020-10-20T16:13:57Z", "author_association": "OWNER", "body": "That `renderers[key] = path_with_format(` is in a base class which can be used for both arbitrary queries, canned queries and the table view. I think that's OK, but it means that the `format=\"json\"` argument on `datasette.urls.table()` won't be used by Datasette internally, it will just be available for plugins.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725743755, "label": "datasette.urls.table(..., format=\"json\") argument"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1035#issuecomment-712976314", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1035", "id": 712976314, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMjk3NjMxNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T16:21:42Z", "updated_at": "2020-10-20T16:21:42Z", "author_association": "OWNER", "body": "Makes me question if `datasette.urls` should grow functionality equivalent to the other path and querystring manipulation methods in `datasette.utils`:\r\n\r\nhttps://github.com/simonw/datasette/blob/66120a7a1cb592e8a21164cf537f62a4d7ab1dfc/datasette/utils/__init__.py#L216-L279", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725743755, "label": "datasette.urls.table(..., format=\"json\") argument"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713183306", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713183306, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE4MzMwNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:48:10Z", "updated_at": "2020-10-20T22:48:10Z", "author_association": "OWNER", "body": "Twitter thread: https://twitter.com/dancow/status/1318681053347840005", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713184374", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713184374, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE4NDM3NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:51:22Z", "updated_at": "2020-10-20T22:51:22Z", "author_association": "OWNER", "body": "From https://hackerone.com/reports/126197:\r\n\r\n> archive.uber.com mirrors pypi. When downloading `.tar.gz` files from archive.uber.com, the MIME type is `application/octet-stream`. Injecting `` into the start of the `.tar.gz` causes an XSS in Internet Explorer due to MIME sniffing.\r\n\r\nSo you do have to be careful not to open accidental XSS holes with `application/octet-stream` thanks to (presumably older) versions of IE.\r\n\r\nFrom that thread it looks like the solution is to add a `X-Content-Type-Options: nosniff` header.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713185173", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713185173, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE4NTE3Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:53:41Z", "updated_at": "2020-10-20T22:53:41Z", "author_association": "OWNER", "body": "https://security.stackexchange.com/questions/12896/does-x-content-type-options-really-prevent-content-sniffing-attacks says:\r\n\r\n> In Tangled Web Michal Zalewski says:\r\n> \r\n> > Refrain from using Content-Type: application/octet-stream and use application/binary instead, especially for unknown document types. Refrain from returning Content-Type: text/plain.\r\n> > \r\n> > For example, any code-hosting platform must exercise caution when returning executables or source archives as application/octet-stream, because there is a risk they may be misinterpreted as HTML and displayed inline.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713185871", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713185871, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE4NTg3MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:55:36Z", "updated_at": "2020-10-20T22:55:36Z", "author_association": "OWNER", "body": "I can also use a `Content-Disposition` header to force a download. I'm reasonably confident that the combination of `Content-Disposition` and `X-Content-Type-Options: nosniff` and `application/binary` will let me allow users to download the contents of arbitrary BLOB columns without any XSS risk.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713186189", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713186189, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzE4NjE4OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-20T22:56:33Z", "updated_at": "2020-10-20T22:56:33Z", "author_association": "OWNER", "body": "I think this plus the binary-CSV stuff in #1034 will justify a dedicated section of the documentation to talk about how Datasette handles binary BLOB columns.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713226726", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713226726, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzIyNjcyNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-21T01:04:25Z", "updated_at": "2020-10-21T01:04:25Z", "author_association": "OWNER", "body": "Extra security idea: a `blob_download_host` setting which can be used to indicate a host that should be used for downloads - for example `datasettestatic.com`. If this setting is populated then binary downloads are served from paths on that host only, and no other Datasette URLs from that host will be served.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713278349", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713278349, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzI3ODM0OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-21T03:42:29Z", "updated_at": "2020-10-21T03:42:29Z", "author_association": "OWNER", "body": "Possible URL for this: `/db/table/-/blob/primary-keys` - this would use the `/db/table/-/` namespace proposed in #296.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713818178", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713818178, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzgxODE3OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-21T19:15:38Z", "updated_at": "2020-10-21T19:16:34Z", "author_association": "OWNER", "body": "What should the suggested filename be?\r\n\r\nI think something that includes the table name, primary key and the name of the column would work.\r\n\r\nHow about a file extension? I guess `.binary`, then let the user rename it? Or `.raw`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713818817", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713818817, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzgxODgxNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-21T19:17:01Z", "updated_at": "2020-10-21T19:17:01Z", "author_association": "OWNER", "body": "Actually I like `.blob`", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713821656", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713821656, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzgyMTY1Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-21T19:22:45Z", "updated_at": "2020-10-21T19:41:48Z", "author_association": "OWNER", "body": "So for https://latest.datasette.io/fixtures/binary_data the BLOB download URLs would be:\r\n\r\n`https://latest.datasette.io/fixtures/-/blob/binary_data/1/data.blob` - that last bit after the primary key is to indicate the `data` column\r\n\r\nWith these headers:\r\n\r\n- `Content-Disposition: attachment; filename=\"binary_data-1-data.blob\"`\r\n- `X-Content-Type-Options: nosniff`\r\n- `Content-Type: application/binary`", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713829629", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713829629, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzgyOTYyOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-21T19:38:43Z", "updated_at": "2020-10-21T19:38:43Z", "author_association": "OWNER", "body": "Should this work just for BLOB columns, or should it work for other columns too?\r\n\r\nFor the moment I'm going to restrict it to BLOBs, since data from other columns is available through the UI whereas BLOB columns are not.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713830842", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713830842, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzgzMDg0Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-21T19:41:20Z", "updated_at": "2020-10-21T19:41:20Z", "author_association": "OWNER", "body": "Another useful demo database: https://datasette-render-images-demo.datasette.io/favicons/favicons - see https://datasette-render-images-demo.datasette.io/favicons/favicons.csv", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-713899530", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 713899530, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzg5OTUzMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-21T21:55:00Z", "updated_at": "2020-10-21T21:55:00Z", "author_association": "OWNER", "body": "This code needs these permission checks:\r\nhttps://github.com/simonw/datasette/blob/bf82b3d6a605c9ddadd5fb739249dfe6defaf635/datasette/views/table.py#L911-L913", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1036#issuecomment-762387875", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1036", "id": 762387875, "node_id": "MDEyOklzc3VlQ29tbWVudDc2MjM4Nzg3NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-18T17:36:36Z", "updated_at": "2021-01-18T17:36:36Z", "author_association": "OWNER", "body": "As you can see, I'm pretty paranoid about serving content with `Content-Type` HTTP headers because I'm so worried about execution vulnerabilities. I'm much more comfortable exploring that kind of thing in plugins, since that way people can opt-in to riskier features.\r\n\r\nYou found `datasette-media` which is my most comprehensive exploration of that idea so far - but there's definitely lots of room for more plugins along those lines.\r\n\r\nMaybe even an output plugin? `.jpg` as an export format which returns the `BLOB` column for a row as a JPEG image with the correct `content-type` header (but first verifies that the binary content does indeed look like a real JPEG) could be interesting.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 725996507, "label": "Make it possible to download BLOB data from the Datasette UI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1037#issuecomment-713267989", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1037", "id": 713267989, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzI2Nzk4OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-21T03:14:34Z", "updated_at": "2020-10-21T03:14:34Z", "author_association": "OWNER", "body": "This is particularly relevant to the `datasette-cluster-map` plugin - the map is much nicer to use if the table itself can be scrolled.\r\n\r\nThat plugin also makes this harder to build, because the plugin inserts the map as the direct predecessor of the `` element and hence breaks if you try to wrap that in a `
`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 726094754, "label": "Add horizontal scrollbar to tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1037#issuecomment-713268498", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1037", "id": 713268498, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzI2ODQ5OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-21T03:15:44Z", "updated_at": "2020-10-21T03:15:44Z", "author_association": "OWNER", "body": "This may require updates to the column action menu JavaScript too, since it was not built with scrolling sideways in mind.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 726094754, "label": "Add horizontal scrollbar to tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1037#issuecomment-713268905", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1037", "id": 713268905, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzI2ODkwNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-21T03:16:36Z", "updated_at": "2020-10-21T03:16:36Z", "author_association": "OWNER", "body": "Dupe of #998.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 726094754, "label": "Add horizontal scrollbar to tables"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1038#issuecomment-713920461", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1038", "id": 713920461, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzkyMDQ2MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-21T22:43:51Z", "updated_at": "2020-10-21T22:43:51Z", "author_association": "OWNER", "body": "Thanks for spotting this!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 726154220, "label": "DOC: Fix syntax error"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1039#issuecomment-713754844", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1039", "id": 713754844, "node_id": "MDEyOklzc3VlQ29tbWVudDcxMzc1NDg0NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-21T17:58:27Z", "updated_at": "2020-10-21T17:58:27Z", "author_association": "OWNER", "body": "Now live: https://latest.datasette.io/fixtures/roadside_attraction_characteristics\r\n\r\n![anim](https://user-images.githubusercontent.com/9599/96759016-55288480-138c-11eb-8ba0-d8e0f6dd8b1f.gif)\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 726687572, "label": "Add an animation to the column actions menu"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/104#issuecomment-345447161", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/104", "id": 345447161, "node_id": "MDEyOklzc3VlQ29tbWVudDM0NTQ0NzE2MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-18T14:53:17Z", "updated_at": "2017-11-18T14:53:17Z", "author_association": "OWNER", "body": "any reason I shouldn't land this?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274284246, "label": "[WIP] Add publish to heroku support"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1040#issuecomment-714206533", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1040", "id": 714206533, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNDIwNjUzMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-22T04:00:25Z", "updated_at": "2020-10-22T04:00:25Z", "author_association": "OWNER", "body": "I've decided not to offer a configuration option to turn this off. I'll reconsider if someone asks for it.", "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/pull/1040#issuecomment-715587715", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1040", "id": 715587715, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNTU4NzcxNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-23T21:01:07Z", "updated_at": "2020-10-23T21:03:10Z", "author_association": "OWNER", "body": "A download icon would be nice for the links in the table display.\r\n\r\nI like this one https://primer.style/octicons/download-24", "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/1041#issuecomment-714682288", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1041", "id": 714682288, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNDY4MjI4OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-22T18:35:15Z", "updated_at": "2020-10-22T18:35:15Z", "author_association": "OWNER", "body": "@psychemedia said: https://github.com/simonw/datasette/issues/1033#issuecomment-714657366\r\n\r\n> How does `/-/static` relate to [current guidance docs around `static`](https://docs.datasette.io/en/latest/custom_templates.html?highlight=static#serving-static-files) regarding the `--static option` and metadata formulations such as `\"extra_js_urls\": [ \"/static/app.js\"]` (I've not managed to get this to work in a Jupyter server proxied set up; the [datasette / jupyter server proxy repo](https://github.com/simonw/jupyterserverproxy-datasette-demo) may provide a useful test example, eg via MyBinder, for folk to crib from?)", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 727627923, "label": "extra_js_urls and extra_css_urls should respect base_url setting"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1041#issuecomment-714682825", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1041", "id": 714682825, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNDY4MjgyNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-22T18:36:10Z", "updated_at": "2020-10-22T18:36:10Z", "author_association": "OWNER", "body": "I'll need to update these docs once there's a solution for this in place: https://docs.datasette.io/en/latest/custom_templates.html#serving-static-files", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 727627923, "label": "extra_js_urls and extra_css_urls should respect base_url setting"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1041#issuecomment-714683801", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1041", "id": 714683801, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNDY4MzgwMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-22T18:37:47Z", "updated_at": "2020-10-22T18:37:47Z", "author_association": "OWNER", "body": "I think I'll do this by looking for URLs that start with `/` - since it's also possible to have full `https://...` URLs in that setting.\r\n```json\r\n{\r\n \"extra_css_urls\": [\r\n \"/static/styles.css\"\r\n ],\r\n \"extra_js_urls\": [\r\n \"/static/app.js\"\r\n ]\r\n}\r\n```\r\nI need to think about the `extra_css_urls` and `extra_js_urls` plugin hooks too: https://docs.datasette.io/en/stable/plugin_hooks.html#extra-css-urls-template-database-table-columns-view-name-request-datasette", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 727627923, "label": "extra_js_urls and extra_css_urls should respect base_url setting"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1041#issuecomment-719986800", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1041", "id": 719986800, "node_id": "MDEyOklzc3VlQ29tbWVudDcxOTk4NjgwMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-31T20:49:28Z", "updated_at": "2020-10-31T20:49:28Z", "author_association": "OWNER", "body": "Implemented in a4ca26a2659d21779adf625183061d8879954c15", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 727627923, "label": "extra_js_urls and extra_css_urls should respect base_url setting"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1042#issuecomment-714868207", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1042", "id": 714868207, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNDg2ODIwNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-23T02:29:12Z", "updated_at": "2020-10-23T02:29:12Z", "author_association": "OWNER", "body": "Relevant code: https://github.com/simonw/datasette/blob/d0cc6f4c32e1f89238ddec782086b3122f445bd4/datasette/app.py#L288-L311", "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-714868624", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1042", "id": 714868624, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNDg2ODYyNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-23T02:30:27Z", "updated_at": "2020-10-23T02:30:37Z", "author_association": "OWNER", "body": "Maybe `register_template_loader(datasette)` which returns an object which is added in at the beginning of the list passed to `ChoiceLoader` here.", "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-714868867", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1042", "id": 714868867, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNDg2ODg2Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-23T02:31:17Z", "updated_at": "2020-10-23T02:31:17Z", "author_association": "OWNER", "body": "I'll build this in conjunction with a plugin that supports editing templates stored in SQLite.", "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-715490532", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1042", "id": 715490532, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNTQ5MDUzMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-23T17:57:34Z", "updated_at": "2020-10-23T17:57:34Z", "author_association": "OWNER", "body": "A better version of this hook would be passed the database, table and query name depending on what was being rendered.\r\n\r\nThis would require some re-thinking of how core templates are loaded, especially since I would want the templates considered comment to continue working.", "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-715496859", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1042", "id": 715496859, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNTQ5Njg1OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-23T18:11:27Z", "updated_at": "2020-10-23T18:11:27Z", "author_association": "OWNER", "body": "When loading a template the filename is required, but you can optionally also send a set of extra arguments which the template loader can take into consideration.", "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-715497419", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1042", "id": 715497419, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNTQ5NzQxOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-23T18:12:40Z", "updated_at": "2020-10-23T18:12:40Z", "author_association": "OWNER", "body": "Maybe the template loader can optionally return some extra context to pass to the template. That could be used to solve the templates considered comment.", "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-715614971", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1042", "id": 715614971, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNTYxNDk3MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-23T22:20:14Z", "updated_at": "2020-10-23T22:23:51Z", "author_association": "OWNER", "body": "Alternative plugin hook idea:\r\n```python\r\n@hookspec\r\ndef load_template(template, database, table, columns, view_name, request, datasette):\r\n \"Load the specified template, returning the template code as a string\"\r\n```\r\nImitating the existing `extra_template_vars` family of hooks: https://docs.datasette.io/en/stable/plugin_hooks.html#extra-template-vars-template-database-table-columns-view-name-request-datasette", "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-715616757", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1042", "id": 715616757, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNTYxNjc1Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-23T22:27:28Z", "updated_at": "2020-10-23T22:27:28Z", "author_association": "OWNER", "body": "Almost all of the core template loading happens in the `BaseView.render` method: https://github.com/simonw/datasette/blob/976e5f74aae1fa0d406df6691dc8b5feeebe8788/datasette/views/base.py#L114-L133\r\n\r\nThe one exception is the 404 handling code here: https://github.com/simonw/datasette/blob/976e5f74aae1fa0d406df6691dc8b5feeebe8788/datasette/app.py#L1034-L1042", "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-715617405", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1042", "id": 715617405, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNTYxNzQwNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-23T22:29:53Z", "updated_at": "2020-10-23T22:29:53Z", "author_association": "OWNER", "body": "Also consider that `DatasetteRouter` uses `.list_templates()` to gather together `{slug}.html` style templates for the custom page templates mechanism: https://github.com/simonw/datasette/blob/976e5f74aae1fa0d406df6691dc8b5feeebe8788/datasette/app.py#L949-L967\r\n\r\nFor that to work with the new plugin hook, custom template providing plugins will need a way to provide a list of templates that they know about.", "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-715617830", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1042", "id": 715617830, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNTYxNzgzMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-23T22:31:26Z", "updated_at": "2020-10-23T22:31:26Z", "author_association": "OWNER", "body": "So maybe this should be a `register_template_loader` mechanism that returns a Jinja loader after all? That would mean that only the template filename could be used as the input to the plugin, which doesn't seem as useful as emulating the `extra_template_vars()` interface.", "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-715618077", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1042", "id": 715618077, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNTYxODA3Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-23T22:32:24Z", "updated_at": "2020-10-23T22:32:24Z", "author_association": "OWNER", "body": "Another option: the first version of the plugin hook could accept only the template filename. Subsequent releases could add more arguments, since Pluggy allows new arguments to be added without breaking backwards compatibility.", "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-715618333", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1042", "id": 715618333, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNTYxODMzMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-23T22:33:24Z", "updated_at": "2020-10-23T22:33:24Z", "author_association": "OWNER", "body": "It wouldn't be a disaster if template-loading plugins were unable to hook into the `/{slug1}/{slug2}.html` custom page mechanism, since plugins can define their own pages already using `register_routes()`.", "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-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/pull/1043#issuecomment-715585140", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1043", "id": 715585140, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNTU4NTE0MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-23T20:54:29Z", "updated_at": "2020-10-23T20:54:29Z", "author_association": "OWNER", "body": "Thanks. I'll push a source release of `asgi-csrf`.", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 727915394, "label": "Include LICENSE in sdist"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1043#issuecomment-715586711", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1043", "id": 715586711, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNTU4NjcxMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-23T20:58:26Z", "updated_at": "2020-10-23T20:58:26Z", "author_association": "OWNER", "body": "I misunderstood - `asgi-csrf` already has an sdist.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 727915394, "label": "Include LICENSE in sdist"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1044#issuecomment-715584579", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1044", "id": 715584579, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNTU4NDU3OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-23T20:53:01Z", "updated_at": "2020-10-23T20:53:01Z", "author_association": "OWNER", "body": "Thanks for this!", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 727916744, "label": "Add minimum supported python"}, "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} {"html_url": "https://github.com/simonw/datasette/issues/1046#issuecomment-716071507", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1046", "id": 716071507, "node_id": "MDEyOklzc3VlQ29tbWVudDcxNjA3MTUwNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-25T00:06:47Z", "updated_at": "2020-10-25T00:06:47Z", "author_association": "OWNER", "body": "I used https://primer.style/octicons/download-16 instead.\r\n\r\n\"favicons__favicons__71_rows\"\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} {"html_url": "https://github.com/simonw/datasette/issues/1047#issuecomment-719994676", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1047", "id": 719994676, "node_id": "MDEyOklzc3VlQ29tbWVudDcxOTk5NDY3Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-31T22:11:25Z", "updated_at": "2020-10-31T22:11:25Z", "author_association": "OWNER", "body": "https://docs.datasette.io/en/latest/binary_data.html", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 728895233, "label": "A new section in the docs about how Datasette handles BLOB columns"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1048#issuecomment-719996693", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1048", "id": 719996693, "node_id": "MDEyOklzc3VlQ29tbWVudDcxOTk5NjY5Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-31T22:32:09Z", "updated_at": "2022-07-10T16:22:48Z", "author_association": "OWNER", "body": "The `row_path` part of these really isn't very user friendly, since you need to properly URL-encode the values. The safest way to do so is by calling this obscure, undocumented utility function: https://github.com/simonw/datasette/blob/f0bd2d05f5f7832df4879822afb99d2096c00d48/datasette/utils/__init__.py#L84-L98\r\n\r\nThis feels like it should be improved before I turn it into a documented API.\r\n\r\n(Note that this API deals with a `row` that is a potentially-nested dictionary - not with a `sqlite3.Row` object.)", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 728905098, "label": "Documentation and unit tests for urls.row() urls.row_blob() methods"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1048#issuecomment-1179756391", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1048", "id": 1179756391, "node_id": "IC_kwDOBm6k_c5GUadn", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-07-10T16:12:23Z", "updated_at": "2022-07-10T16:12:23Z", "author_association": "OWNER", "body": "Also related: `row` is now available to `render_cell()` hook as-of this issue:\r\n- https://github.com/simonw/datasette/issues/1300", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 728905098, "label": "Documentation and unit tests for urls.row() urls.row_blob() methods"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1048#issuecomment-1179756689", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1048", "id": 1179756689, "node_id": "IC_kwDOBm6k_c5GUaiR", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-07-10T16:14:03Z", "updated_at": "2022-07-10T16:14:03Z", "author_association": "OWNER", "body": "I'm considering changing these functions to accept the `row` object itself:\r\n\r\n```python\r\n def row(self, database, table, row): \r\n ...\r\n \r\n def row_blob(self, database, table, row, column): \r\n ... \r\n```\r\nJust one catch: in order to generate the correct `row_path` we need to know the primary keys for that table. We can look those up based on having access to `database` and `table`, but doing so requires an `await ...` operation - and these functions are not `async`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 728905098, "label": "Documentation and unit tests for urls.row() urls.row_blob() methods"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1048#issuecomment-1179757067", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1048", "id": 1179757067, "node_id": "IC_kwDOBm6k_c5GUaoL", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-07-10T16:16:19Z", "updated_at": "2022-07-10T16:16:19Z", "author_association": "OWNER", "body": "None of the potential solutions for that problem are particularly appealing:\r\n\r\n- Make these URL generation methods `async` - should the other ones be `async` too for consistency?\r\n- Have some kind of mechanism that calculates and caches the `pks` for each table somewhere which can then be accessed here without an `async` call\r\n- Require `pks` is passed to these methods, having been looked up elsewhere. This is a bit gross but may end up being the best solution", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 728905098, "label": "Documentation and unit tests for urls.row() urls.row_blob() methods"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1048#issuecomment-1179757605", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1048", "id": 1179757605, "node_id": "IC_kwDOBm6k_c5GUawl", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-07-10T16:19:42Z", "updated_at": "2022-07-10T16:21:03Z", "author_association": "OWNER", "body": "If I do require `pks` to be passed here, maybe I could make those available to the `render_cell()` plugin hook to at least make this a bit more pleasant for plugin authors to use?\r\n\r\nCurrent hook: https://docs.datasette.io/en/latest/plugin_hooks.html#render-cell-row-value-column-table-database-datasette\r\n\r\nhttps://github.com/simonw/datasette/blob/035dc5e7b95142d4a700819a8cc4ff64aefe4efe/datasette/hookspecs.py#L62-L64\r\n\r\nThe hook is called in two places in the codebase - when rendering a table (`pks` variable is already in scope here):\r\n\r\nhttps://github.com/simonw/datasette/blob/6373bb341457e5becfd5b67792ac2c8b9ed7c384/datasette/views/table.py#L897-L904\r\n\r\nAnd when rendering an arbitrary query:\r\n\r\nhttps://github.com/simonw/datasette/blob/6373bb341457e5becfd5b67792ac2c8b9ed7c384/datasette/views/database.py#L377-L384\r\n\r\nNote that in that second one `table` is `None` (which is also called out in the documentation) - `pks` would be `None` here too.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 728905098, "label": "Documentation and unit tests for urls.row() urls.row_blob() methods"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1048#issuecomment-1179757912", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1048", "id": 1179757912, "node_id": "IC_kwDOBm6k_c5GUa1Y", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-07-10T16:21:38Z", "updated_at": "2022-07-10T16:21:38Z", "author_association": "OWNER", "body": "I think the best way to do this is to change the method signatures to:\r\n```python\r\n def row(self, database, table, row, pks): \r\n ...\r\n \r\n def row_blob(self, database, table, row, pks, column): \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": 728905098, "label": "Documentation and unit tests for urls.row() urls.row_blob() methods"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1048#issuecomment-1179758180", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1048", "id": 1179758180, "node_id": "IC_kwDOBm6k_c5GUa5k", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-07-10T16:23:34Z", "updated_at": "2022-07-10T16:23:57Z", "author_association": "OWNER", "body": "But do I need to pass the `use_rowid` boolean here as well, as used by `def path_from_row_pks(row, pks, use_rowid, quote=True)`? Or can I derive that from the fact that `pks` is an empty tuple?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 728905098, "label": "Documentation and unit tests for urls.row() urls.row_blob() methods"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1049#issuecomment-718340847", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1049", "id": 718340847, "node_id": "MDEyOklzc3VlQ29tbWVudDcxODM0MDg0Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-29T03:45:47Z", "updated_at": "2020-10-29T03:48:26Z", "author_association": "OWNER", "body": "[thebe](https://thebelab.readthedocs.io/en/latest/examples/minimal_example.html) is the first time I've seen a library that requires you to set up some global JavaScript configuration before loading the script itself.\r\n\r\nI'm hesitant to add an extra template block just to cover that one case since it's such a rare pattern. But it's important that `thebelab` can be used with Datasette.\r\n\r\nWould this pattern work for you instead?\r\n\r\n```html+jinja\r\n{% block extra_head %}\r\n\r\n\r\n{% endblock %}\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": 729017519, "label": "Add template block prior to extra URL loaders"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1049#issuecomment-718341542", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1049", "id": 718341542, "node_id": "MDEyOklzc3VlQ29tbWVudDcxODM0MTU0Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-29T03:48:12Z", "updated_at": "2020-10-29T03:48:12Z", "author_association": "OWNER", "body": "You could use Datasette's new `{{ urls.static_plugins(...) }}` template option - see https://docs.datasette.io/en/latest/internals.html#internals-datasette-urls - to generate a link to code that was bundled with the plugin:\r\n\r\n```html+jinja\r\n{% block extra_head %}\r\n\r\n\r\n{% endblock %}\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 729017519, "label": "Add template block prior to extra URL loaders"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/105#issuecomment-345493344", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/105", "id": 345493344, "node_id": "MDEyOklzc3VlQ29tbWVudDM0NTQ5MzM0NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-19T05:28:49Z", "updated_at": "2017-11-19T05:28:49Z", "author_association": "OWNER", "body": "Looks like there are a ton of interesting datasets packaged in this way at http://datahub.io/docs/core-data - see also https://github.com/datasets", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274314940, "label": "Consider data-package as a format for metadata"}, "performed_via_github_app": null}