{"html_url": "https://github.com/simonw/datasette/issues/1#issuecomment-338523957", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1", "id": 338523957, "node_id": "MDEyOklzc3VlQ29tbWVudDMzODUyMzk1Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-10-23T01:09:05Z", "updated_at": "2017-10-24T02:42:12Z", "author_association": "OWNER", "body": "I also need to solve for weird primary keys. If it\u2019s a single integer or a single char field that\u2019s easy. But what if it is a compound key with more than one chat field? What delimiter can I use that will definitely be safe?\r\n\r\nLet\u2019s say I use hyphen. Now I need to find a durable encoding for any hyphens that might exist in the key fields themselves.\r\n\r\nHow about I use URLencoding for every non-alpha-numeric character? That will turn hyphens into (I think) %2D. It should also solve for unicode characters, but it means the vast majority of keys (integers) will display neatly, including a compound key of eg 5678-345\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": 267513424, "label": "Addressable pages for every row in a table"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1#issuecomment-338524454", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1", "id": 338524454, "node_id": "MDEyOklzc3VlQ29tbWVudDMzODUyNDQ1NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-10-23T01:15:24Z", "updated_at": "2017-10-23T01:15:24Z", "author_association": "OWNER", "body": "Table rendering logic needs to detect the primary key field and turn it into a hyperlink. If there is a compound primary key it should add an extra column at the start of the table which displays the compound key as a link", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 267513424, "label": "Addressable pages for every row in a table"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1#issuecomment-338857568", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1", "id": 338857568, "node_id": "MDEyOklzc3VlQ29tbWVudDMzODg1NzU2OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-10-24T02:57:12Z", "updated_at": "2017-10-24T02:57:12Z", "author_association": "OWNER", "body": "I can find the primary keys using:\r\n\r\n PRAGMA table_info(myTable)\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 267513424, "label": "Addressable pages for every row in a table"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1#issuecomment-338861511", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1", "id": 338861511, "node_id": "MDEyOklzc3VlQ29tbWVudDMzODg2MTUxMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-10-24T03:24:17Z", "updated_at": "2017-10-24T03:24:17Z", "author_association": "OWNER", "body": "Some tables won't have primary keys, in which case I won't generate pages for individual records.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 267513424, "label": "Addressable pages for every row in a table"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1#issuecomment-338872286", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1", "id": 338872286, "node_id": "MDEyOklzc3VlQ29tbWVudDMzODg3MjI4Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-10-24T04:46:06Z", "updated_at": "2017-10-24T04:46:06Z", "author_association": "OWNER", "body": "I'm going to use `,` as the separator between elements of a compound primary key. If those elements themselves include a comma I will use `%2C` in its place.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 267513424, "label": "Addressable pages for every row in a table"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1#issuecomment-338882207", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1", "id": 338882207, "node_id": "MDEyOklzc3VlQ29tbWVudDMzODg4MjIwNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-10-24T05:56:04Z", "updated_at": "2017-10-24T05:56:04Z", "author_association": "OWNER", "body": "Next step: generate links to these.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 267513424, "label": "Addressable pages for every row in a table"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/10#issuecomment-341938424", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/10", "id": 341938424, "node_id": "MDEyOklzc3VlQ29tbWVudDM0MTkzODQyNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-04T23:48:57Z", "updated_at": "2017-11-04T23:48:57Z", "author_association": "OWNER", "body": "Done: https://github.com/simonw/stateless-datasets/commit/edaa10587e60946e0c1935333f6b79553db33798", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 267517381, "label": "Set up Travis"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/100#issuecomment-344771130", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/100", "id": 344771130, "node_id": "MDEyOklzc3VlQ29tbWVudDM0NDc3MTEzMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-16T00:06:00Z", "updated_at": "2017-11-16T00:06:00Z", "author_association": "OWNER", "body": "Aha... it looks like this is a Jinja version problem: https://github.com/ansible/ansible/issues/25381#issuecomment-306492389\r\n\r\nDatasette depends on sanic-jinja2 - and that doesn't depend on a particular jinja2 version: https://github.com/lixxu/sanic-jinja2/blob/7e9520850d8c6bb66faf43b7f252593d7efe3452/setup.py#L22\r\n\r\nSo if you have an older version of Jinja installed, stuff breaks.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274160723, "label": "TemplateAssertionError: no filter named 'tojson'"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1001#issuecomment-705904566", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1001", "id": 705904566, "node_id": "MDEyOklzc3VlQ29tbWVudDcwNTkwNDU2Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-09T00:58:08Z", "updated_at": "2020-10-09T00:58:08Z", "author_association": "OWNER", "body": "To get a traceback:\r\n```\r\ndatasette . -p 8009 --pdb\r\n```\r\nAnd then:\r\n```\r\ncurl -XOPTIONS http://127.0.0.1:8009\r\n```\r\nThis causes the server to open a debugging prompt:\r\n```\r\nINFO: 127.0.0.1:59514 - \"OPTIONS / HTTP/1.1\" 500 Internal Server Error\r\n> /Users/simon/Dropbox/Development/datasette/datasette/views/base.py(115)dispatch_request()\r\n-> return await handler(request, *args, **kwargs)\r\n(Pdb) list\r\n110 \t def database_color(self, database):\r\n111 \t return \"ff0000\"\r\n112 \t\r\n113 \t async def dispatch_request(self, request, *args, **kwargs):\r\n114 \t handler = getattr(self, request.method.lower(), None)\r\n115 ->\t return await handler(request, *args, **kwargs)\r\n116 \t\r\n117 \t async def render(self, templates, request, context=None):\r\n118 \t context = context or {}\r\n119 \t template = self.ds.jinja_env.select_template(templates)\r\n120 \t template_context = {\r\n(Pdb) \r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 717768441, "label": "OPTIONS requests return a 500 error"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1001#issuecomment-705904679", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1001", "id": 705904679, "node_id": "MDEyOklzc3VlQ29tbWVudDcwNTkwNDY3OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-09T00:58:32Z", "updated_at": "2020-10-09T00:58:32Z", "author_association": "OWNER", "body": "So the bug is in this code here: https://github.com/simonw/datasette/blob/703439bdc37e724b01bc6d7a1fc1d955795132f2/datasette/views/base.py#L113-L115", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 717768441, "label": "OPTIONS requests return a 500 error"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1001#issuecomment-705904759", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1001", "id": 705904759, "node_id": "MDEyOklzc3VlQ29tbWVudDcwNTkwNDc1OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-09T00:58:47Z", "updated_at": "2020-10-09T00:58:47Z", "author_association": "OWNER", "body": "What should an OPTIONS request return, anyway?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 717768441, "label": "OPTIONS requests return a 500 error"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1001#issuecomment-705904917", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1001", "id": 705904917, "node_id": "MDEyOklzc3VlQ29tbWVudDcwNTkwNDkxNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-10-09T00:59:25Z", "updated_at": "2020-10-09T00:59:25Z", "author_association": "OWNER", "body": "```\r\n~ % curl -XOPTIONS https://www.google.com/\r\n\r\n\r\n \r\n \r\n