github
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/sqlite-utils/issues/230#issuecomment-778812684 | https://api.github.com/repos/simonw/sqlite-utils/issues/230 | 778812684 | MDEyOklzc3VlQ29tbWVudDc3ODgxMjY4NA== | 9599 | 2021-02-14T17:45:16Z | 2021-02-14T17:45:16Z | OWNER | Running this could take any CSV (or TSV) file and automatically detect the delimiter. If no header row is detected it could add `unknown1,unknown2` headers: sqlite-utils insert db.db data file.csv --sniff (Using `--sniff` would imply `--csv`) This could be called `--sniffer` instead but I like `--sniff` better. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
808008305 | |
https://github.com/simonw/sqlite-utils/issues/228#issuecomment-778812050 | https://api.github.com/repos/simonw/sqlite-utils/issues/228 | 778812050 | MDEyOklzc3VlQ29tbWVudDc3ODgxMjA1MA== | 9599 | 2021-02-14T17:41:30Z | 2021-02-14T17:41:30Z | OWNER | I just spotted that `csv.Sniffer` in the Python standard library has a `.has_header(sample)` method which detects if the first row appears to be a header or not, which is interesting. https://docs.python.org/3/library/csv.html#csv.Sniffer | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
807437089 | |
https://github.com/simonw/sqlite-utils/issues/228#issuecomment-778811934 | https://api.github.com/repos/simonw/sqlite-utils/issues/228 | 778811934 | MDEyOklzc3VlQ29tbWVudDc3ODgxMTkzNA== | 9599 | 2021-02-14T17:40:48Z | 2021-02-14T17:40:48Z | OWNER | Another pattern that might be useful is to generate a header that is just "unknown1,unknown2,unknown3" for each of the columns in the rest of the file. This makes it easy to e.g. facet-explore within Datasette to figure out the correct names, then use `sqlite-utils transform --rename` to rename the columns. I needed to do that for the https://bl.iro.bl.uk/work/ns/3037474a-761c-456d-a00c-9ef3c6773f4c example. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
807437089 | |
https://github.com/simonw/sqlite-utils/issues/228#issuecomment-778511347 | https://api.github.com/repos/simonw/sqlite-utils/issues/228 | 778511347 | MDEyOklzc3VlQ29tbWVudDc3ODUxMTM0Nw== | 9599 | 2021-02-12T23:27:50Z | 2021-02-12T23:27:50Z | OWNER | For the moment, a workaround can be to `cat` an additional row onto the start of the file. echo "name,url,description" | cat - missing_headings.csv | sqlite-utils insert blah.db table - --csv | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
807437089 | |
https://github.com/simonw/sqlite-utils/issues/131#issuecomment-778510528 | https://api.github.com/repos/simonw/sqlite-utils/issues/131 | 778510528 | MDEyOklzc3VlQ29tbWVudDc3ODUxMDUyOA== | 9599 | 2021-02-12T23:25:06Z | 2021-02-12T23:25:06Z | OWNER | If `-c` isn't available, maybe `-t` or `--type` would work for specifying column types: ``` sqlite-utils insert db.db images images.tsv \ --tsv \ --type id int \ --type score float ``` or ``` sqlite-utils insert db.db images images.tsv \ --tsv \ -t id int \ -t score float ``` | { "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
675753042 | |
https://github.com/simonw/sqlite-utils/issues/131#issuecomment-778508887 | https://api.github.com/repos/simonw/sqlite-utils/issues/131 | 778508887 | MDEyOklzc3VlQ29tbWVudDc3ODUwODg4Nw== | 9599 | 2021-02-12T23:20:11Z | 2021-02-12T23:20:11Z | OWNER | Annoyingly `-c` is currently a shortcut for `--csv` - so I'd have to do a major version bump to use that. https://github.com/simonw/sqlite-utils/blob/726219c3503e77440975cd15b74d006639feb0f8/sqlite_utils/cli.py#L601-L603 Particularly annoying because I attempted to remove the `-c` shortcut in https://github.com/simonw/sqlite-utils/commit/2c00567aac6d9c79087cfff0d054f64922b1473d#diff-76294b3d4afeb27e74e738daa01c26dd4dc9ccb6f4477451483a2ece1095902eL48 but forgot to remove it from the input options (I removed it from the output options). | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
675753042 | |
https://github.com/simonw/sqlite-utils/issues/228#issuecomment-778349672 | https://api.github.com/repos/simonw/sqlite-utils/issues/228 | 778349672 | MDEyOklzc3VlQ29tbWVudDc3ODM0OTY3Mg== | 9599 | 2021-02-12T18:00:43Z | 2021-02-12T18:00:43Z | OWNER | I could combine this with #131 to allow types to be specified in addition to column names. Probably need an option that means "ignore the existing heading row and use this one instead". | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
807437089 | |
https://github.com/simonw/sqlite-utils/issues/227#issuecomment-778349142 | https://api.github.com/repos/simonw/sqlite-utils/issues/227 | 778349142 | MDEyOklzc3VlQ29tbWVudDc3ODM0OTE0Mg== | 9599 | 2021-02-12T17:59:35Z | 2021-02-12T17:59:35Z | OWNER | It looks like I can at least bump this size limit up to the maximum allowed by Python - I'll take a look at that. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
807174161 | |
https://github.com/simonw/datasette/issues/1221#issuecomment-777901052 | https://api.github.com/repos/simonw/datasette/issues/1221 | 777901052 | MDEyOklzc3VlQ29tbWVudDc3NzkwMTA1Mg== | 9599 | 2021-02-12T01:09:54Z | 2021-02-12T01:09:54Z | OWNER | I also tested this manually. I generated certificate files like so: cd /tmp python -m trustme This created `/tmp/server.pem`, `/tmp/client.pem` and `/tmp/server.key` Then I started Datasette like this: datasette --memory --ssl-keyfile=/tmp/server.key --ssl-certfile=/tmp/server.pem And exercise it using `curl` like so: /tmp % curl --cacert /tmp/client.pem 'https://localhost:8001/_memory.json' {"database": "_memory", "path": "/_memory", "size": 0, "tables": [], "hidden_count": 0, "views": [], "queries": [], "private": false, "allow_execute_sql": true, "query_ms": 0.8843200000114848} Note that without the `--cacert` option I get an error: ``` /tmp % curl 'https://localhost:8001/_memory.json' curl: (60) SSL certificate problem: Invalid certificate chain More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
806849424 | |
https://github.com/simonw/datasette/issues/1221#issuecomment-777887190 | https://api.github.com/repos/simonw/datasette/issues/1221 | 777887190 | MDEyOklzc3VlQ29tbWVudDc3Nzg4NzE5MA== | 9599 | 2021-02-12T00:29:18Z | 2021-02-12T00:29:18Z | OWNER | I can use this recipe to start a `datasette` server in a sub-process during the pytest run and exercise it with real HTTP requests: https://til.simonwillison.net/pytest/subprocess-server | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
806849424 | |
https://github.com/simonw/datasette/issues/1221#issuecomment-777883452 | https://api.github.com/repos/simonw/datasette/issues/1221 | 777883452 | MDEyOklzc3VlQ29tbWVudDc3Nzg4MzQ1Mg== | 9599 | 2021-02-12T00:19:30Z | 2021-02-12T00:19:40Z | OWNER | Uvicorn supports these options: https://www.uvicorn.org/#command-line-options ``` --ssl-keyfile TEXT SSL key file --ssl-certfile TEXT SSL certificate file --ssl-keyfile-password TEXT SSL keyfile password --ssl-version INTEGER SSL version to use (see stdlib ssl module's) [default: 2] --ssl-cert-reqs INTEGER Whether client certificate is required (see stdlib ssl module's) [default: 0] --ssl-ca-certs TEXT CA certificates file --ssl-ciphers TEXT Ciphers to use (see stdlib ssl module's) [default: TLSv1] ``` For the moment I'm going to support just `--ssl-keyfile` and `--ssl-certfile` as arguments to `datasette serve`. I'll add other options if people ask for them. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
806849424 | |
https://github.com/simonw/datasette/issues/1200#issuecomment-777178728 | https://api.github.com/repos/simonw/datasette/issues/1200 | 777178728 | MDEyOklzc3VlQ29tbWVudDc3NzE3ODcyOA== | 9599 | 2021-02-11T03:13:59Z | 2021-02-11T03:13:59Z | OWNER | I came up with the need for this while playing with this tool: https://calands.datasettes.com/calands?sql=select%0D%0A++AsGeoJSON(geometry)%2C+*%0D%0Afrom%0D%0A++CPAD_2020a_SuperUnits%0D%0Awhere%0D%0A++PARK_NAME+like+'%25mini%25'+and%0D%0A++Intersects(GeomFromGeoJSON(%3Afreedraw)%2C+geometry)+%3D+1%0D%0A++and+CPAD_2020a_SuperUnits.rowid+in+(%0D%0A++++select%0D%0A++++++rowid%0D%0A++++from%0D%0A++++++SpatialIndex%0D%0A++++where%0D%0A++++++f_table_name+%3D+'CPAD_2020a_SuperUnits'%0D%0A++++++and+search_frame+%3D+GeomFromGeoJSON(%3Afreedraw)%0D%0A++)&freedraw={"type"%3A"MultiPolygon"%2C"coordinates"%3A[[[[-122.42202758789064%2C37.82280243352759]%2C[-122.39868164062501%2C37.823887203271454]%2C[-122.38220214843751%2C37.81846319511331]%2C[-122.35061645507814%2C37.77071473849611]%2C[-122.34924316406251%2C37.74465712069939]%2C[-122.37258911132814%2C37.703380457832374]%2C[-122.39044189453125%2C37.690340943717715]%2C[-122.41241455078126%2C37.680559803205135]%2C[-122.44262695312501%2C37.67295135774715]%2C[-122.47283935546876%2C37.67295135774715]%2C[-122.52502441406251%2C37.68382032669382]%2C[-122.53463745117189%2C37.6892542140253]%2C[-122.54699707031251%2C37.690340943717715]%2C[-122.55798339843751%2C37.72945260537781]%2C[-122.54287719726564%2C37.77831314799672]%2C[-122.49893188476564%2C37.81303878836991]%2C[-122.46185302734376%2C37.82822612280363]%2C[-122.42889404296876%2C37.82822612280363]%2C[-122.42202758789064%2C37.82280243352759]]]]} - before I fixed https://github.com/simonw/datasette-leaflet-geojson/issues/16 it was loading a LOT of maps, which felt bad. I wanted to be able to link people to that page with a hard limit on the number of rows displayed on that page. It's mainly to guard against unexpected behaviour from limit-less queries though. It's not a very high priority feature! | { "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
792890765 | |
https://github.com/simonw/datasette/issues/1219#issuecomment-775442039 | https://api.github.com/repos/simonw/datasette/issues/1219 | 775442039 | MDEyOklzc3VlQ29tbWVudDc3NTQ0MjAzOQ== | 9599 | 2021-02-08T20:39:52Z | 2021-02-08T22:13:00Z | OWNER | This comment helped me find a pattern for running Scalene against the Datasette test suite: https://github.com/emeryberger/scalene/issues/70#issuecomment-755245858 ``` pip install scalene ``` Then I created a file called `run_tests.py` with the following contents: ```python if __name__ == "__main__": import sys, pytest pytest.main(sys.argv) ``` Then I ran this: ``` scalene --profile-all run_tests.py -sv -x . ``` But... it quit with a segmentation fault! ``` (datasette) datasette % scalene --profile-all run_tests.py -sv -x . ======================================================================== test session starts ======================================================================== platform darwin -- Python 3.8.6, pytest-6.0.1, py-1.9.0, pluggy-0.13.1 -- python cachedir: .pytest_cache rootdir: /Users/simon/Dropbox/Development/datasette, configfile: pytest.ini plugins: asyncio-0.14.0, timeout-1.4.2 collecting ... Fatal Python error: Segmentation fault Current thread 0x0000000110c1edc0 (most recent call first): File "/Users/simon/Dropbox/Development/datasette/datasette/utils/__init__.py", line 553 in detect_json1 File "/Users/simon/Dropbox/Development/datasette/datasette/filters.py", line 168 in Filters File "/Users/simon/Dropbox/Development/datasette/datasette/filters.py", line 94 in <module> File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed File "<frozen importlib._bootstrap_external>", line 783 in exec_module File "<frozen importlib._bootstrap>", line 671 in _load_unlocked File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 991 in _find_and_load File "/Users/simon/Dropbox/Development/datasette/datasette/views/table.py", line 27 in <module> File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed File "<frozen importlib._bootstrap_external>", line 783 in exec_module File "<frozen importlib._bootstrap>", line 671 in _load_unlocked … | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
803929694 | |
https://github.com/simonw/datasette/issues/1219#issuecomment-775497449 | https://api.github.com/repos/simonw/datasette/issues/1219 | 775497449 | MDEyOklzc3VlQ29tbWVudDc3NTQ5NzQ0OQ== | 9599 | 2021-02-08T22:11:34Z | 2021-02-08T22:11:34Z | OWNER | https://github.com/emeryberger/scalene/issues/110 reports a "received signal SIGSEGV" error that was fixed by upgrading to the latest Scalene version, but I'm running that already. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
803929694 | |
https://github.com/simonw/sqlite-utils/issues/223#issuecomment-774373829 | https://api.github.com/repos/simonw/sqlite-utils/issues/223 | 774373829 | MDEyOklzc3VlQ29tbWVudDc3NDM3MzgyOQ== | 9599 | 2021-02-06T01:39:47Z | 2021-02-06T01:39:47Z | OWNER | Documentation: https://sqlite-utils.datasette.io/en/stable/cli.html#cli-insert-csv-tsv-delimiter | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
788527932 | |
https://github.com/simonw/datasette/issues/1216#issuecomment-772796111 | https://api.github.com/repos/simonw/datasette/issues/1216 | 772796111 | MDEyOklzc3VlQ29tbWVudDc3Mjc5NjExMQ== | 9599 | 2021-02-03T20:20:48Z | 2021-02-03T20:20:48Z | OWNER | Relevant code: https://github.com/simonw/datasette/blob/1600d2a3ec3ada1f6fb5b1eb73bdaeccb5f80530/datasette/app.py#L620-L632 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
800669347 | |
https://github.com/simonw/datasette/issues/1214#issuecomment-772001787 | https://api.github.com/repos/simonw/datasette/issues/1214 | 772001787 | MDEyOklzc3VlQ29tbWVudDc3MjAwMTc4Nw== | 9599 | 2021-02-02T21:28:53Z | 2021-02-02T21:28:53Z | OWNER | Fix is now live on https://latest.datasette.io/fixtures/searchable?_search=terry - clearing "terry" and re-submitting the form now works as expected. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
799693777 | |
https://github.com/simonw/datasette/issues/1214#issuecomment-771992628 | https://api.github.com/repos/simonw/datasette/issues/1214 | 771992628 | MDEyOklzc3VlQ29tbWVudDc3MTk5MjYyOA== | 9599 | 2021-02-02T21:15:18Z | 2021-02-02T21:15:18Z | OWNER | The cause of this bug is form fields which begin with `_` but ARE displayed as form inputs on the page - hence should not be duplicated in an `<input type="hidden">` element. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
799693777 | |
https://github.com/simonw/datasette/issues/1214#issuecomment-771992025 | https://api.github.com/repos/simonw/datasette/issues/1214 | 771992025 | MDEyOklzc3VlQ29tbWVudDc3MTk5MjAyNQ== | 9599 | 2021-02-02T21:14:16Z | 2021-02-02T21:14:16Z | OWNER | As a result, navigating to https://github-to-sqlite.dogsheep.net/github/labels?_search=help and clearing out the `_search` field then submitting the form does NOT clear the search term. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
799693777 | |
https://github.com/simonw/datasette/issues/1212#issuecomment-771976561 | https://api.github.com/repos/simonw/datasette/issues/1212 | 771976561 | MDEyOklzc3VlQ29tbWVudDc3MTk3NjU2MQ== | 9599 | 2021-02-02T20:53:27Z | 2021-02-02T20:53:27Z | OWNER | It would be great if we could get `python-xdist` to run too - I tried it in the past and gave up when I ran into those race conditions, but I've not done any further digging to see if there's a way to fix that. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
797651831 | |
https://github.com/simonw/datasette/issues/1212#issuecomment-771975941 | https://api.github.com/repos/simonw/datasette/issues/1212 | 771975941 | MDEyOklzc3VlQ29tbWVudDc3MTk3NTk0MQ== | 9599 | 2021-02-02T20:52:36Z | 2021-02-02T20:52:36Z | OWNER | 37 minutes, wow! They're a little slow for me (4-5 minutes perhaps) but not nearly that bad. Thanks for running that profile. I think you're right: figuring out how to use more session scopes would definitely help. The `:memory:` idea is interesting too. The new `memory_name=` feature added in #1151 (released in Datasette 0.54) could help a lot here, since it allows Datasette instances to share the same in-memory database across multiple HTTP requests and connections. Note that `memory_name=` also persists within test runs themselves, independently of any `scope=` options on the fixtures. That might actually help us here! I'd be delighted if you explored this issue further, especially the option of using `memory_name=` for the fixtures databases used by the tests. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
797651831 | |
https://github.com/simonw/datasette/issues/1213#issuecomment-771968675 | https://api.github.com/repos/simonw/datasette/issues/1213 | 771968675 | MDEyOklzc3VlQ29tbWVudDc3MTk2ODY3NQ== | 9599 | 2021-02-02T20:41:55Z | 2021-02-02T20:41:55Z | OWNER | So maybe I could a special response header which ASGI middleware can pick up that means "Don't attempt to gzip this, just stream it through". | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
799663959 | |
https://github.com/simonw/datasette/issues/1213#issuecomment-771968177 | https://api.github.com/repos/simonw/datasette/issues/1213 | 771968177 | MDEyOklzc3VlQ29tbWVudDc3MTk2ODE3Nw== | 9599 | 2021-02-02T20:41:13Z | 2021-02-02T20:41:13Z | OWNER | Starlette accumulates the full response body in a `body` variable and then does this: ```python elif message_type == "http.response.body": # Remaining body in streaming GZip response. body = message.get("body", b"") more_body = message.get("more_body", False) self.gzip_file.write(body) if not more_body: self.gzip_file.close() message["body"] = self.gzip_buffer.getvalue() self.gzip_buffer.seek(0) self.gzip_buffer.truncate() await self.send(message) ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
799663959 | |
https://github.com/simonw/datasette/issues/1213#issuecomment-771965281 | https://api.github.com/repos/simonw/datasette/issues/1213 | 771965281 | MDEyOklzc3VlQ29tbWVudDc3MTk2NTI4MQ== | 9599 | 2021-02-02T20:37:08Z | 2021-02-02T20:39:24Z | OWNER | Starlette's gzip middleware implementation is here: https://github.com/encode/starlette/blob/0.14.2/starlette/middleware/gzip.py | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
799663959 | |
https://github.com/simonw/datasette/issues/1207#issuecomment-769534187 | https://api.github.com/repos/simonw/datasette/issues/1207 | 769534187 | MDEyOklzc3VlQ29tbWVudDc2OTUzNDE4Nw== | 9599 | 2021-01-29T02:37:19Z | 2021-01-29T02:37:19Z | OWNER | https://docs.datasette.io/en/latest/testing_plugins.html#using-pdb-for-errors-thrown-inside-datasette | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
793881756 | |
https://github.com/simonw/datasette/issues/1209#issuecomment-769455370 | https://api.github.com/repos/simonw/datasette/issues/1209 | 769455370 | MDEyOklzc3VlQ29tbWVudDc2OTQ1NTM3MA== | 9599 | 2021-01-28T23:00:21Z | 2021-01-28T23:00:21Z | OWNER | Good catch on the workaround here. The root problem is that `datasette-template-sql` looks for the first available databsae if you don't provide it with a `database=` argument, and in Datasette 0.54 the first available database changed to being the new `_internal` database. Is this a bug? I think it is - because the documented behaviour on https://docs.datasette.io/en/stable/internals.html#get-database-name is this: > `name` - string, optional > > The name to be used for this database - this will be used in the URL path, e.g. `/dbname`. If not specified Datasette will pick one based on the filename or memory name. Since the new behaviour differs from what was in the documentation I'm going to treat this as a bug and fix it. | { "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
795367402 | |
https://github.com/simonw/datasette/issues/1205#issuecomment-769453074 | https://api.github.com/repos/simonw/datasette/issues/1205 | 769453074 | MDEyOklzc3VlQ29tbWVudDc2OTQ1MzA3NA== | 9599 | 2021-01-28T22:54:49Z | 2021-01-28T22:55:02Z | OWNER | I also checked that the following works: echo '{"foo": "bar"}' | sqlite-utils insert _memory.db demo - datasette _memory.db --memory Sure enough, it results in the following Datasette homepage - thanks to #509 <img width="274" alt="Datasette___memory___memory_2" src="https://user-images.githubusercontent.com/9599/106208790-c8564980-6178-11eb-8b8b-053a9f1d0193.png"> | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
793027837 | |
https://github.com/simonw/datasette/issues/1205#issuecomment-769452084 | https://api.github.com/repos/simonw/datasette/issues/1205 | 769452084 | MDEyOklzc3VlQ29tbWVudDc2OTQ1MjA4NA== | 9599 | 2021-01-28T22:52:23Z | 2021-01-28T22:52:23Z | OWNER | Here are the redirect tests: https://github.com/simonw/datasette/blob/1600d2a3ec3ada1f6fb5b1eb73bdaeccb5f80530/tests/test_api.py#L635-L648 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
793027837 | |
https://github.com/simonw/datasette/issues/1205#issuecomment-769442165 | https://api.github.com/repos/simonw/datasette/issues/1205 | 769442165 | MDEyOklzc3VlQ29tbWVudDc2OTQ0MjE2NQ== | 9599 | 2021-01-28T22:30:16Z | 2021-01-28T22:30:27Z | OWNER | I'm going to do this, with redirects from `/:memory:*`. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
793027837 | |
https://github.com/simonw/datasette/issues/1210#issuecomment-769274591 | https://api.github.com/repos/simonw/datasette/issues/1210 | 769274591 | MDEyOklzc3VlQ29tbWVudDc2OTI3NDU5MQ== | 9599 | 2021-01-28T18:10:02Z | 2021-01-28T18:10:02Z | OWNER | That definitely sounds like a bug! Can you provide a copy of your `metadata.JSON` and the command-line you are using to launch Datasette? | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
796234313 | |
https://github.com/simonw/datasette/issues/1208#issuecomment-767823684 | https://api.github.com/repos/simonw/datasette/issues/1208 | 767823684 | MDEyOklzc3VlQ29tbWVudDc2NzgyMzY4NA== | 9599 | 2021-01-26T20:58:51Z | 2021-01-26T20:58:51Z | OWNER | This is a good catch - I've been lazy about this, but you're right that it's an issue that needs cleaning up. Would be very happy to apply a PR, thanks! | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
794554881 | |
https://github.com/simonw/datasette/issues/1151#issuecomment-767762551 | https://api.github.com/repos/simonw/datasette/issues/1151 | 767762551 | MDEyOklzc3VlQ29tbWVudDc2Nzc2MjU1MQ== | 9599 | 2021-01-26T19:07:44Z | 2021-01-26T19:07:44Z | OWNER | Mentioned in https://simonwillison.net/2021/Jan/25/datasette/ | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
770448622 | |
https://github.com/simonw/datasette/issues/991#issuecomment-767761155 | https://api.github.com/repos/simonw/datasette/issues/991 | 767761155 | MDEyOklzc3VlQ29tbWVudDc2Nzc2MTE1NQ== | 9599 | 2021-01-26T19:05:21Z | 2021-01-26T19:06:36Z | OWNER | Idea: implement this using the existing table view, with a custom template called `table-internal-bb0ec0-tables.html` - that's the custom template listed in the HTML comments at the bottom of https://latest.datasette.io/_internal/tables | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
714377268 | |
https://github.com/simonw/datasette/issues/1201#issuecomment-766991680 | https://api.github.com/repos/simonw/datasette/issues/1201 | 766991680 | MDEyOklzc3VlQ29tbWVudDc2Njk5MTY4MA== | 9599 | 2021-01-25T17:42:21Z | 2021-01-25T17:42:21Z | OWNER | https://docs.datasette.io/en/stable/changelog.html#v0-54 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
792904595 | |
https://github.com/simonw/datasette/pull/1206#issuecomment-766588371 | https://api.github.com/repos/simonw/datasette/issues/1206 | 766588371 | MDEyOklzc3VlQ29tbWVudDc2NjU4ODM3MQ== | 9599 | 2021-01-25T06:49:06Z | 2021-01-25T06:49:06Z | OWNER | Last thing to do: write up the annotated version of these release notes, assign it a URL on my blog and link to it from the release notes here so I can publish them simultaneously. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
793086333 | |
https://github.com/simonw/datasette/pull/1206#issuecomment-766588020 | https://api.github.com/repos/simonw/datasette/issues/1206 | 766588020 | MDEyOklzc3VlQ29tbWVudDc2NjU4ODAyMA== | 9599 | 2021-01-25T06:48:20Z | 2021-01-25T06:48:20Z | OWNER | Issues to reference in the commit message: #509, #1091, #1150, #1151, #1166, #1167, #1178, #1181, #1182, #1184, #1185, #1186, #1187, #1194, #1198 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
793086333 | |
https://github.com/simonw/datasette/issues/1201#issuecomment-766586151 | https://api.github.com/repos/simonw/datasette/issues/1201 | 766586151 | MDEyOklzc3VlQ29tbWVudDc2NjU4NjE1MQ== | 9599 | 2021-01-25T06:44:43Z | 2021-01-25T06:44:43Z | OWNER | OK, release notes are ready to merge from that branch. I'll ship the release in the morning, to give me time to write the accompanying annotated release notes. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
792904595 | |
https://github.com/simonw/datasette/issues/1201#issuecomment-766545604 | https://api.github.com/repos/simonw/datasette/issues/1201 | 766545604 | MDEyOklzc3VlQ29tbWVudDc2NjU0NTYwNA== | 9599 | 2021-01-25T05:14:31Z | 2021-01-25T05:14:31Z | OWNER | The two big ticket items are `<script type="module">` support and the new `_internal` mechanism. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
792904595 | |
https://github.com/simonw/datasette/issues/1201#issuecomment-766545442 | https://api.github.com/repos/simonw/datasette/issues/1201 | 766545442 | MDEyOklzc3VlQ29tbWVudDc2NjU0NTQ0Mg== | 9599 | 2021-01-25T05:13:59Z | 2021-01-25T05:13:59Z | OWNER | The big stuff: - Database(memory_name=) for shared in-memory databases, closes #1151 - The `_internal` database - #1150 - script type=module support, closes #1186 , #1187 - Improved design for the `.add_database()` method 8919f99c2f7f245aca7f94bd53d5ac9d04aa42b5 - which means databases with the same stem can now be opened, #509 - Adopted Prettier #1166 Smaller: - force_https_urls on for publish cloudrun, refs #1178 - Fixed bug in example nginx config, refs #1091 - Shrunk ecosystem docs in favour of datasette.io, closes #1182 - request.full_path property, closes #1184 - Better PRAGMA error message, closes #1185 - publish heroku now uses python-3.8.7 - Plugin testing documentation on using pytest-httpx Closes #1198 - Contributing docs for Black and Prettier, closes #1167 - All ?_ parameters now copied to hidden form fields, closes #1194 - Fixed bug loading database called 'test-database (1).sqlite' - Closes #1181. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
792904595 | |
https://github.com/simonw/datasette/issues/1201#issuecomment-766543387 | https://api.github.com/repos/simonw/datasette/issues/1201 | 766543387 | MDEyOklzc3VlQ29tbWVudDc2NjU0MzM4Nw== | 9599 | 2021-01-25T05:07:40Z | 2021-01-25T05:13:29Z | OWNER | Changes: https://github.com/simonw/datasette/compare/0.53...a5ede3cdd455e2bb1a1fb2f4e1b5a9855caf5179 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
792904595 | |
https://github.com/simonw/datasette/issues/983#issuecomment-766536076 | https://api.github.com/repos/simonw/datasette/issues/983 | 766536076 | MDEyOklzc3VlQ29tbWVudDc2NjUzNjA3Ng== | 9599 | 2021-01-25T04:43:53Z | 2021-01-25T04:43:53Z | OWNER | ... actually not going to include this in 0.54, I need to write a couple of plugins myself using it before I even make it available in preview. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
712260429 | |
https://github.com/simonw/datasette/issues/1195#issuecomment-766535046 | https://api.github.com/repos/simonw/datasette/issues/1195 | 766535046 | MDEyOklzc3VlQ29tbWVudDc2NjUzNTA0Ng== | 9599 | 2021-01-25T04:40:08Z | 2021-01-25T04:40:08Z | OWNER | Also: should the view name really be the same for both of these pages? - https://latest.datasette.io/fixtures?sql=select+*+from+facetable - https://latest.datasette.io/fixtures/neighborhood_search Where one of them is a canned query and the other is an arbitrary query? | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
789336592 | |
https://github.com/simonw/datasette/issues/1195#issuecomment-766534748 | https://api.github.com/repos/simonw/datasette/issues/1195 | 766534748 | MDEyOklzc3VlQ29tbWVudDc2NjUzNDc0OA== | 9599 | 2021-01-25T04:38:56Z | 2021-01-25T04:38:56Z | OWNER | Here's a diff showing how far I got before I abandoned this particular effort: ```diff diff --git a/datasette/views/base.py b/datasette/views/base.py index a21b929..04e4aa9 100644 --- a/datasette/views/base.py +++ b/datasette/views/base.py @@ -120,7 +120,7 @@ class BaseView: handler = getattr(self, request.method.lower(), None) return await handler(request, *args, **kwargs) - async def render(self, templates, request, context=None): + async def render(self, templates, request, context=None, view_name=None): context = context or {} template = self.ds.jinja_env.select_template(templates) template_context = { @@ -135,7 +135,7 @@ class BaseView: } return Response.html( await self.ds.render_template( - template, template_context, request=request, view_name=self.name + template, template_context, request=request, view_name=view_name ) ) @@ -155,7 +155,7 @@ class BaseView: class DataView(BaseView): - name = "" + view_name = "no-view-name" re_named_parameter = re.compile(":([a-zA-Z0-9_]+)") async def options(self, request, *args, **kwargs): @@ -414,6 +414,10 @@ class DataView(BaseView): args["table"] = urllib.parse.unquote_plus(args["table"]) return _format, args + async def get_view_name(self, request, database, hash, **kwargs): + # Defaults to self.view_name, but can be over-ridden by subclasses + return self.view_name + async def view_get(self, request, database, hash, correct_hash_provided, **kwargs): _format, kwargs = await self.get_format(request, database, kwargs) @@ -424,6 +428,8 @@ class DataView(BaseView): # HTML views default to expanding all foreign key labels kwargs["default_labels"] = True + view_name = await self.get_view_name(request, database, hash, **kwargs) + extra_template_data = {} … | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
789336592 | |
https://github.com/simonw/datasette/issues/1195#issuecomment-766534634 | https://api.github.com/repos/simonw/datasette/issues/1195 | 766534634 | MDEyOklzc3VlQ29tbWVudDc2NjUzNDYzNA== | 9599 | 2021-01-25T04:38:30Z | 2021-01-25T04:38:30Z | OWNER | This has proved surprisingly difficult to implement, due to the weird way the QueryView is actually called. The class itself isn't used like other view classes - instead, the `.data()` methods of both `DatabaseView` and `TableView` dispatch out to `QueryView.data()` when they need to: https://github.com/simonw/datasette/blob/07e163561592c743e4117f72102fcd350a600909/datasette/views/table.py#L259-L270 https://github.com/simonw/datasette/blob/07e163561592c743e4117f72102fcd350a600909/datasette/views/table.py#L290-L294 https://github.com/simonw/datasette/blob/07e163561592c743e4117f72102fcd350a600909/datasette/views/database.py#L39-L44 It turns out this is a bad pattern because it makes changes like this one WAY harder than they should be. I think I should clean this up as part of #878. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
789336592 | |
https://github.com/simonw/datasette/pull/1204#issuecomment-766525337 | https://api.github.com/repos/simonw/datasette/issues/1204 | 766525337 | MDEyOklzc3VlQ29tbWVudDc2NjUyNTMzNw== | 9599 | 2021-01-25T04:04:28Z | 2021-01-25T04:04:28Z | OWNER | Writing the tests will be a bit tricky since we need to confirm that the `include_table_top(datasette, database, actor, table)` arguments were all passed correctly but the only thing we get back from the plugin is a list of templates. Maybe encode those values into the template names somehow? | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
793002853 | |
https://github.com/simonw/datasette/issues/987#issuecomment-766524141 | https://api.github.com/repos/simonw/datasette/issues/987 | 766524141 | MDEyOklzc3VlQ29tbWVudDc2NjUyNDE0MQ== | 9599 | 2021-01-25T03:59:55Z | 2021-01-25T03:59:55Z | OWNER | This is joined with #1191 now, which I've bumped from 0.54. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
712984738 | |
https://github.com/simonw/datasette/issues/1191#issuecomment-766524016 | https://api.github.com/repos/simonw/datasette/issues/1191 | 766524016 | MDEyOklzc3VlQ29tbWVudDc2NjUyNDAxNg== | 9599 | 2021-01-25T03:59:17Z | 2021-01-25T03:59:17Z | OWNER | More work can happen in the PR: #1204 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
787098345 | |
https://github.com/simonw/datasette/issues/1191#issuecomment-766523866 | https://api.github.com/repos/simonw/datasette/issues/1191 | 766523866 | MDEyOklzc3VlQ29tbWVudDc2NjUyMzg2Ng== | 9599 | 2021-01-25T03:58:34Z | 2021-01-25T03:58:34Z | OWNER | I've got a good prototype working now, but I'm dropping this from the Datasette 0.54 milestone because it requires a bunch of additional work to make sure it is really well tested and documented. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
787098345 | |
https://github.com/simonw/datasette/issues/1194#issuecomment-766491911 | https://api.github.com/repos/simonw/datasette/issues/1194 | 766491911 | MDEyOklzc3VlQ29tbWVudDc2NjQ5MTkxMQ== | 9599 | 2021-01-25T02:02:15Z | 2021-01-25T02:02:15Z | OWNER | I'm going to copy across anything starting with an underscore. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
788447787 | |
https://github.com/simonw/datasette/issues/1167#issuecomment-766491566 | https://api.github.com/repos/simonw/datasette/issues/1167 | 766491566 | MDEyOklzc3VlQ29tbWVudDc2NjQ5MTU2Ng== | 9599 | 2021-01-25T02:01:19Z | 2021-01-25T02:01:19Z | OWNER | New documentation section here (I documented Black as well): https://docs.datasette.io/en/latest/contributing.html#code-formatting | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
777145954 | |
https://github.com/simonw/datasette/issues/1167#issuecomment-766487520 | https://api.github.com/repos/simonw/datasette/issues/1167 | 766487520 | MDEyOklzc3VlQ29tbWVudDc2NjQ4NzUyMA== | 9599 | 2021-01-25T01:44:43Z | 2021-01-25T01:44:43Z | OWNER | Thanks @benpickles, I just merged that in. I'll use it in the documentation. # To check code is conformant npm run prettier -- --check # To fix it if it isn't npm run fix | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
777145954 | |
https://github.com/simonw/datasette/issues/983#issuecomment-766484915 | https://api.github.com/repos/simonw/datasette/issues/983 | 766484915 | MDEyOklzc3VlQ29tbWVudDc2NjQ4NDkxNQ== | 9599 | 2021-01-25T01:33:29Z | 2021-01-25T01:33:29Z | OWNER | I'm going to ship a version of this in Datasette 0.54 with a warning that the interface should be considered unstable (see #1202) so that we can start trying this out. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
712260429 | |
https://github.com/simonw/datasette/issues/1179#issuecomment-766484435 | https://api.github.com/repos/simonw/datasette/issues/1179 | 766484435 | MDEyOklzc3VlQ29tbWVudDc2NjQ4NDQzNQ== | 9599 | 2021-01-25T01:31:36Z | 2021-01-25T01:31:36Z | OWNER | Relevant existing tests: https://github.com/simonw/datasette/blob/461670a0b87efa953141b449a9a261919864ceb3/tests/test_utils.py#L365-L398 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
780278550 | |
https://github.com/simonw/datasette/issues/1179#issuecomment-766484257 | https://api.github.com/repos/simonw/datasette/issues/1179 | 766484257 | MDEyOklzc3VlQ29tbWVudDc2NjQ4NDI1Nw== | 9599 | 2021-01-25T01:30:57Z | 2021-01-25T01:30:57Z | OWNER | The challenge here is figuring out what the original path, without the `.format`, actually was - while taking into account that Datasette has a special case for tables that themselves end in a `.something`. The `path_with_format()` function nearly does what we need here: https://github.com/simonw/datasette/blob/b6a7b58fa01af0cd5a5e94bd17d686d283a46819/datasette/utils/__init__.py#L710-L729 It can be called with `replace_format="csv"` to REMOVE the `.csv` format and replace it with something else. Problem is, we want to use it to get rid of the format entirely. We could update `path_with_format()` to accept `format=''` to mean "remove the format entirely", but it's a bit messy. It may be better to reconsider the design of `path_with_format()` and related utility functions entirely. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
780278550 | |
https://github.com/simonw/datasette/issues/1191#issuecomment-766466030 | https://api.github.com/repos/simonw/datasette/issues/1191 | 766466030 | MDEyOklzc3VlQ29tbWVudDc2NjQ2NjAzMA== | 9599 | 2021-01-25T00:11:04Z | 2021-01-25T00:11:04Z | OWNER | I can combine this with #987 - each of these areas of the page can be wrapped in a `<div>` with a class that matches the name of the plugin hook, that way JavaScript plugins can append their content in the same place as Python plugins. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
787098345 | |
https://github.com/simonw/datasette/issues/1154#issuecomment-766465719 | https://api.github.com/repos/simonw/datasette/issues/1154 | 766465719 | MDEyOklzc3VlQ29tbWVudDc2NjQ2NTcxOQ== | 9599 | 2021-01-25T00:09:22Z | 2021-01-25T00:09:22Z | OWNER | https://docs.datasette.io/en/latest/internals.html#the-internal-database <img width="738" alt="Internals_for_plugins_—_Datasette_documentation" src="https://user-images.githubusercontent.com/9599/105648087-76eb4900-5e5e-11eb-9c73-c00ba37b7b10.png"> | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
771208009 | |
https://github.com/simonw/datasette/issues/1202#issuecomment-766464136 | https://api.github.com/repos/simonw/datasette/issues/1202 | 766464136 | MDEyOklzc3VlQ29tbWVudDc2NjQ2NDEzNg== | 9599 | 2021-01-25T00:01:02Z | 2021-01-25T00:01:02Z | OWNER | I'm going to use the existing `.. warning::` pattern for this. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
792931244 | |
https://github.com/simonw/datasette/issues/1090#issuecomment-766463496 | https://api.github.com/repos/simonw/datasette/issues/1090 | 766463496 | MDEyOklzc3VlQ29tbWVudDc2NjQ2MzQ5Ng== | 9599 | 2021-01-24T23:57:00Z | 2021-01-24T23:57:00Z | OWNER | Related: I built [datasette-leaflet-freedraw](https://datasette.io/plugins/datasette-leaflet-freedraw) which turns any canned query field called `freedraw` or `something_freedraw` into an interactive map that you can draw on to create a GeoJSON MultiPolygon. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
741862364 | |
https://github.com/simonw/datasette/issues/1202#issuecomment-766462475 | https://api.github.com/repos/simonw/datasette/issues/1202 | 766462475 | MDEyOklzc3VlQ29tbWVudDc2NjQ2MjQ3NQ== | 9599 | 2021-01-24T23:49:28Z | 2021-01-24T23:50:33Z | OWNER | Can use an "admonition" similar to this: ```sphinx .. warning:: Restricting access to tables and views in this way will NOT prevent users from querying them using arbitrary SQL queries, `like this <https://latest.datasette.io/fixtures?sql=select+*+from+facetable>`__ for example. ``` As seen on https://docs.datasette.io/en/stable/authentication.html#controlling-access-to-specific-tables-and-views Documentation: https://docutils.sourceforge.io/docs/ref/rst/directives.html#specific-admonitions | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
792931244 | |
https://github.com/simonw/datasette/issues/1154#issuecomment-766462197 | https://api.github.com/repos/simonw/datasette/issues/1154 | 766462197 | MDEyOklzc3VlQ29tbWVudDc2NjQ2MjE5Nw== | 9599 | 2021-01-24T23:47:06Z | 2021-01-24T23:47:06Z | OWNER | I'm going to document this but mark it as unstable, using a new documentation convention for marking unstable APIs. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
771208009 | |
https://github.com/simonw/datasette/issues/1179#issuecomment-766434629 | https://api.github.com/repos/simonw/datasette/issues/1179 | 766434629 | MDEyOklzc3VlQ29tbWVudDc2NjQzNDYyOQ== | 9599 | 2021-01-24T21:23:47Z | 2021-01-24T21:23:47Z | OWNER | I'm just going to do `path` and `full_path` (which includes the querystring)`. The `datasette.absolute_url()` method can be used by plugins that need the full URL. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
780278550 | |
https://github.com/simonw/datasette/issues/1190#issuecomment-766433153 | https://api.github.com/repos/simonw/datasette/issues/1190 | 766433153 | MDEyOklzc3VlQ29tbWVudDc2NjQzMzE1Mw== | 9599 | 2021-01-24T21:13:25Z | 2021-01-24T21:13:25Z | OWNER | This ties in to a bunch of other ideas that are in flight at the moment. If you're publishing databases by uploading them, how do you attach metadata? Ideally by baking it into the database file itself, using the mechanism from #1169. How could this interact with the `datasette insert` concept from #1163? Could you pass a CSV file to the `upload` command and have that converted and uploaded for you, or would you create the database file locally using `datasette insert` and then upload it as a separate `datasette upload` step? Lots to think about here. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
787098146 | |
https://github.com/simonw/datasette/issues/1190#issuecomment-766430644 | https://api.github.com/repos/simonw/datasette/issues/1190 | 766430644 | MDEyOklzc3VlQ29tbWVudDc2NjQzMDY0NA== | 9599 | 2021-01-24T20:57:03Z | 2021-01-24T20:57:03Z | OWNER | I really like this idea. It feels like an opportunity for a plugin that adds two things: an API endpoint to Datasette for accepting uploaded databases, and a `datasette publish upload` subcommand which can upload files to that endpoint (with some kind of authentication mechanism). | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
787098146 | |
https://github.com/simonw/datasette/issues/1197#issuecomment-766430111 | https://api.github.com/repos/simonw/datasette/issues/1197 | 766430111 | MDEyOklzc3VlQ29tbWVudDc2NjQzMDExMQ== | 9599 | 2021-01-24T20:53:40Z | 2021-01-24T20:53:40Z | OWNER | https://devcenter.heroku.com/articles/slug-compiler#slug-size says that the maximum allowed size is 500MB - my hunch is that the Datasette application itself weighs in at only a dozen or so MB but I haven't measured it. So I would imagine anything up to around 450MB should work OK on Heroku. Cloud Run works for up to about 2GB in my experience. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
791381623 | |
https://github.com/simonw/datasette/issues/1198#issuecomment-766428183 | https://api.github.com/repos/simonw/datasette/issues/1198 | 766428183 | MDEyOklzc3VlQ29tbWVudDc2NjQyODE4Mw== | 9599 | 2021-01-24T20:40:37Z | 2021-01-24T20:40:37Z | OWNER | https://docs.datasette.io/en/latest/testing_plugins.html#testing-outbound-http-calls-with-pytest-httpx | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
792625812 | |
https://github.com/simonw/datasette/issues/1199#issuecomment-766181628 | https://api.github.com/repos/simonw/datasette/issues/1199 | 766181628 | MDEyOklzc3VlQ29tbWVudDc2NjE4MTYyOA== | 9599 | 2021-01-23T21:25:18Z | 2021-01-23T21:25:18Z | OWNER | Comment thread here: https://news.ycombinator.com/item?id=25881911 - cperciva says: > There's an even better reason for databases to not write to memory mapped pages: Pages get synched out to disk at the kernel's leisure. This can be ok for a cache but it's definitely not what you want for a database! But... Datasette is often used in read-only mode, so that disadvantage often doesn't apply. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
792652391 | |
https://github.com/simonw/datasette/issues/1191#issuecomment-765757433 | https://api.github.com/repos/simonw/datasette/issues/1191 | 765757433 | MDEyOklzc3VlQ29tbWVudDc2NTc1NzQzMw== | 9599 | 2021-01-22T23:43:43Z | 2021-01-22T23:43:43Z | OWNER | Another potential use for this: plugins that provide authentication (like `datasette-auth-passwords` and `datasette-auth-github`) could use it to add a chunk of HTML to the "permission denied" page that links to their mechanism of authenticating. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
787098345 | |
https://github.com/simonw/datasette/issues/1195#issuecomment-763108730 | https://api.github.com/repos/simonw/datasette/issues/1195 | 763108730 | MDEyOklzc3VlQ29tbWVudDc2MzEwODczMA== | 9599 | 2021-01-19T20:22:37Z | 2021-01-19T20:22:37Z | OWNER | I can use this test: https://github.com/simonw/datasette/blob/c38c42948cbfddd587729413fd6082ba352eaece/tests/test_plugins.py#L238-L294 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
789336592 | |
https://github.com/simonw/sqlite-utils/issues/223#issuecomment-762540514 | https://api.github.com/repos/simonw/sqlite-utils/issues/223 | 762540514 | MDEyOklzc3VlQ29tbWVudDc2MjU0MDUxNA== | 9599 | 2021-01-19T01:14:58Z | 2021-01-19T01:15:54Z | OWNER | Example from https://docs.python.org/3/library/csv.html#csv.reader ```pycon >>> import csv >>> with open('eggs.csv', newline='') as csvfile: ... spamreader = csv.reader(csvfile, delimiter=' ', quotechar='|') ... for row in spamreader: ... print(', '.join(row)) Spam, Spam, Spam, Spam, Spam, Baked Beans Spam, Lovely Spam, Wonderful Spam ``` I'm going to add `--quotechar` as well as `--delimiter`. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
788527932 | |
https://github.com/simonw/datasette/issues/1194#issuecomment-762390568 | https://api.github.com/repos/simonw/datasette/issues/1194 | 762390568 | MDEyOklzc3VlQ29tbWVudDc2MjM5MDU2OA== | 9599 | 2021-01-18T17:43:03Z | 2021-01-18T17:43:03Z | OWNER | Should I just blanket copy over any query string argument that starts with an underscore? Any reason _not_ to do that? | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
788447787 | |
https://github.com/simonw/datasette/issues/1194#issuecomment-762390401 | https://api.github.com/repos/simonw/datasette/issues/1194 | 762390401 | MDEyOklzc3VlQ29tbWVudDc2MjM5MDQwMQ== | 9599 | 2021-01-18T17:42:38Z | 2021-01-18T17:42:38Z | OWNER | Relevant code: https://github.com/simonw/datasette/blob/a882d679626438ba0d809944f06f239bcba8ee96/datasette/views/table.py#L815-L827 It looks like there are other arguments that may not be persisted too. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
788447787 | |
https://github.com/simonw/datasette/issues/1036#issuecomment-762387875 | https://api.github.com/repos/simonw/datasette/issues/1036 | 762387875 | MDEyOklzc3VlQ29tbWVudDc2MjM4Nzg3NQ== | 9599 | 2021-01-18T17:36:36Z | 2021-01-18T17:36:36Z | OWNER | 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. You 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. Maybe 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. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
725996507 | |
https://github.com/simonw/datasette/issues/1191#issuecomment-761705076 | https://api.github.com/repos/simonw/datasette/issues/1191 | 761705076 | MDEyOklzc3VlQ29tbWVudDc2MTcwNTA3Ng== | 9599 | 2021-01-17T00:35:13Z | 2021-01-17T00:37:51Z | OWNER | I'm going to try using Jinja macros to implement this: https://jinja.palletsprojects.com/en/2.11.x/templates/#macros Maybe using one of these tricks to auto-load the macro? http://codyaray.com/2015/05/auto-load-jinja2-macros | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
787098345 | |
https://github.com/simonw/datasette/issues/1181#issuecomment-761703555 | https://api.github.com/repos/simonw/datasette/issues/1181 | 761703555 | MDEyOklzc3VlQ29tbWVudDc2MTcwMzU1NQ== | 9599 | 2021-01-17T00:24:20Z | 2021-01-17T00:24:40Z | OWNER | Here's the incomplete sketch of a test - to go at the bottom of `test_cli.py`. ```python @pytest.mark.parametrize( "filename", ["test-database (1).sqlite", "database (1).sqlite"] ) def test_weird_database_names(ensure_eventloop, tmpdir, filename): # https://github.com/simonw/datasette/issues/1181 runner = CliRunner() db_path = str(tmpdir / filename) sqlite3.connect(db_path).execute("vacuum") result1 = runner.invoke(cli, [db_path, "--get", "/"]) assert result1.exit_code == 0, result1.output homepage_html = result1.output assert False ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
781262510 | |
https://github.com/simonw/datasette/issues/1191#issuecomment-761703368 | https://api.github.com/repos/simonw/datasette/issues/1191 | 761703368 | MDEyOklzc3VlQ29tbWVudDc2MTcwMzM2OA== | 9599 | 2021-01-17T00:22:46Z | 2021-01-17T00:22:46Z | OWNER | I'm going to prototype this in a branch. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
787098345 | |
https://github.com/simonw/datasette/issues/1191#issuecomment-761703232 | https://api.github.com/repos/simonw/datasette/issues/1191 | 761703232 | MDEyOklzc3VlQ29tbWVudDc2MTcwMzIzMg== | 9599 | 2021-01-17T00:21:31Z | 2021-01-17T00:21:54Z | OWNER | I think this ends up being a whole collection of new plugin hooks, something like: - `include_table_top` - `include_table_bottom` - `include_row_top` - `include_row_bottom` - `include_database_top` - `include_database_bottom` - `include_query_bottom` - `include_query_bottom` - `include_index_bottom` - `include_index_bottom` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
787098345 | |
https://github.com/simonw/datasette/issues/1191#issuecomment-761703022 | https://api.github.com/repos/simonw/datasette/issues/1191 | 761703022 | MDEyOklzc3VlQ29tbWVudDc2MTcwMzAyMg== | 9599 | 2021-01-17T00:20:00Z | 2021-01-17T00:20:00Z | OWNER | Plugins that want to provide extra context to the template can already do so using the `extra_template_vars()` plugin hook. So this hook could work by returning a list of template filenames to be included. Those templates can be bundled with the plugin. Since they are included they will have access to the template context and to any `extra_template_vars()` values. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
787098345 | |
https://github.com/simonw/datasette/issues/657#issuecomment-761179229 | https://api.github.com/repos/simonw/datasette/issues/657 | 761179229 | MDEyOklzc3VlQ29tbWVudDc2MTE3OTIyOQ== | 9599 | 2021-01-15T20:24:35Z | 2021-01-15T20:24:35Z | OWNER | I'm not sure how I missed this issue but it's almost a year later and I'm finally taking a look at your Parquet work. This is yet more evidence that allowing plugins to provide their own custom `Database` objects would be a good idea. I started exploring what Datasette would like on PostgreSQL in #670 - my concern was that I would need to add a large amount of database abstraction code which would dramatically increase the complexity of the core project, but my thinking now is that it might be tractable - Datasette doesn't actually construct SQL in complex ways anywhere outside of the `TableView` class so abstracting away just that bit should be feasible. | { "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
548591089 | |
https://github.com/simonw/datasette/issues/1191#issuecomment-761103910 | https://api.github.com/repos/simonw/datasette/issues/1191 | 761103910 | MDEyOklzc3VlQ29tbWVudDc2MTEwMzkxMA== | 9599 | 2021-01-15T18:19:29Z | 2021-01-15T18:19:29Z | OWNER | This relates to #987 (documented HTML hooks for JavaScript plugins) but is not quite the same thing. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
787098345 | |
https://github.com/simonw/datasette/issues/657#issuecomment-761101878 | https://api.github.com/repos/simonw/datasette/issues/657 | 761101878 | MDEyOklzc3VlQ29tbWVudDc2MTEwMTg3OA== | 9599 | 2021-01-15T18:16:01Z | 2021-01-15T18:16:01Z | OWNER | I think the `startup()` plugin hook at https://docs.datasette.io/en/stable/plugin_hooks.html#startup-datasette should be able to fit this. You can write a plugin which uses that hook to execute `CREATE VIRTUAL TABLE` against one or more databases when Datasette first starts running. Would that work here? | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
548591089 | |
https://github.com/simonw/datasette/issues/1187#issuecomment-759875239 | https://api.github.com/repos/simonw/datasette/issues/1187 | 759875239 | MDEyOklzc3VlQ29tbWVudDc1OTg3NTIzOQ== | 9599 | 2021-01-14T02:02:24Z | 2021-01-14T02:02:31Z | OWNER | This plugin hook currently returns a string of JavaScript. It could optionally return this instead of a string: ```json { "script": "string of JavaScript goes here", "module": true } ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
785588942 | |
https://github.com/simonw/datasette/issues/1186#issuecomment-759874332 | https://api.github.com/repos/simonw/datasette/issues/1186 | 759874332 | MDEyOklzc3VlQ29tbWVudDc1OTg3NDMzMg== | 9599 | 2021-01-14T01:59:35Z | 2021-01-14T01:59:35Z | OWNER | Updated documentation: https://docs.datasette.io/en/latest/custom_templates.html#custom-css-and-javascript and https://docs.datasette.io/en/latest/plugin_hooks.html#extra-js-urls-template-database-table-columns-view-name-request-datasette | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
785573793 | |
https://github.com/simonw/sqlite-utils/issues/220#issuecomment-759098964 | https://api.github.com/repos/simonw/sqlite-utils/issues/220 | 759098964 | MDEyOklzc3VlQ29tbWVudDc1OTA5ODk2NA== | 9599 | 2021-01-12T23:19:55Z | 2021-01-12T23:19:55Z | OWNER | I don't think it makes sense to call `.enable_fts()` on a view does it? When I'm working with views and FTS I tend to write my queries against a FTS table for one of the tables that is used by the view - https://docs.datasette.io/en/stable/full_text_search.html#configuring-full-text-search-for-a-table-or-view describes how I do that in Datasette for example. Can you expand on your use-case for FTS and views? I'm ready to be convinced otherwise, but I don't see how it would work right now. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
783778672 | |
https://github.com/simonw/datasette/issues/1185#issuecomment-759069342 | https://api.github.com/repos/simonw/datasette/issues/1185 | 759069342 | MDEyOklzc3VlQ29tbWVudDc1OTA2OTM0Mg== | 9599 | 2021-01-12T22:13:18Z | 2021-01-12T22:13:18Z | OWNER | I'm going to change the error message to list the allowed pragmas. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
784628163 | |
https://github.com/simonw/datasette/issues/1185#issuecomment-759067427 | https://api.github.com/repos/simonw/datasette/issues/1185 | 759067427 | MDEyOklzc3VlQ29tbWVudDc1OTA2NzQyNw== | 9599 | 2021-01-12T22:09:21Z | 2021-01-12T22:09:21Z | OWNER | That allow-list was added in #761 but is not currently documented. It's here in the code: https://github.com/simonw/datasette/blob/8e8fc5cee5c78da8334495c6d6257d5612c40792/datasette/utils/__init__.py#L173-L186 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
784628163 | |
https://github.com/simonw/datasette/issues/1185#issuecomment-759066777 | https://api.github.com/repos/simonw/datasette/issues/1185 | 759066777 | MDEyOklzc3VlQ29tbWVudDc1OTA2Njc3Nw== | 9599 | 2021-01-12T22:07:58Z | 2021-01-12T22:07:58Z | OWNER | https://docs.datasette.io/en/stable/sql_queries.html?highlight=pragma#named-parameters documentation is out-of-date as well: > Datasette disallows custom SQL containing the string PRAGMA, as SQLite pragma statements can be used to change database settings at runtime. If you need to include the string "pragma" in a query you can do so safely using a named parameter. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
784628163 | |
https://github.com/simonw/datasette/issues/1183#issuecomment-758356640 | https://api.github.com/repos/simonw/datasette/issues/1183 | 758356640 | MDEyOklzc3VlQ29tbWVudDc1ODM1NjY0MA== | 9599 | 2021-01-12T02:42:08Z | 2021-01-12T02:42:08Z | OWNER | Should Datasette have subcommands for this? `datasette enable-counts data.db` and `datasette disable-counts data.db` and `datasette reset-counts data.db` commands? Maybe. The `sqlite-utils` CLI tool could be used here instead, but that won't be easily available if Datasette was installed as a standalone binary or using `brew install datasette` or `pipx install datasette`. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
782708469 | |
https://github.com/simonw/datasette/issues/1183#issuecomment-758356097 | https://api.github.com/repos/simonw/datasette/issues/1183 | 758356097 | MDEyOklzc3VlQ29tbWVudDc1ODM1NjA5Nw== | 9599 | 2021-01-12T02:40:30Z | 2021-01-12T02:40:30Z | OWNER | So how would this work? I think I'm going to automatically use these values if the `_counts` table exists, unless a `ignore_counts_table` boolean setting has been set. I won't bother looking to see if the triggers have been created. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
782708469 | |
https://github.com/simonw/datasette/issues/1091#issuecomment-758283074 | https://api.github.com/repos/simonw/datasette/issues/1091 | 758283074 | MDEyOklzc3VlQ29tbWVudDc1ODI4MzA3NA== | 9599 | 2021-01-11T23:12:46Z | 2021-01-11T23:12:46Z | OWNER | Fantastic! | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
742011049 | |
https://github.com/simonw/datasette/issues/1182#issuecomment-757375858 | https://api.github.com/repos/simonw/datasette/issues/1182 | 757375858 | MDEyOklzc3VlQ29tbWVudDc1NzM3NTg1OA== | 9599 | 2021-01-09T22:18:47Z | 2021-01-09T22:18:47Z | OWNER | https://docs.datasette.io/en/latest/ecosystem.html | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
782692159 | |
https://github.com/simonw/datasette/issues/1182#issuecomment-757373741 | https://api.github.com/repos/simonw/datasette/issues/1182 | 757373741 | MDEyOklzc3VlQ29tbWVudDc1NzM3Mzc0MQ== | 9599 | 2021-01-09T22:01:41Z | 2021-01-09T22:01:41Z | OWNER | It can talk about Dogsheep too. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
782692159 | |
https://github.com/simonw/datasette/issues/1182#issuecomment-757373082 | https://api.github.com/repos/simonw/datasette/issues/1182 | 757373082 | MDEyOklzc3VlQ29tbWVudDc1NzM3MzA4Mg== | 9599 | 2021-01-09T21:55:33Z | 2021-01-09T21:55:33Z | OWNER | I'll leave the page there but change it into more of a blurb about the existence of the plugins and tools directories. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
782692159 | |
https://github.com/simonw/datasette/issues/1181#issuecomment-756487966 | https://api.github.com/repos/simonw/datasette/issues/1181 | 756487966 | MDEyOklzc3VlQ29tbWVudDc1NjQ4Nzk2Ng== | 9599 | 2021-01-08T01:25:42Z | 2021-01-08T01:25:42Z | OWNER | I'm going to add a unit test that tries a variety of weird database names. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
781262510 | |
https://github.com/simonw/datasette/issues/1181#issuecomment-756482163 | https://api.github.com/repos/simonw/datasette/issues/1181 | 756482163 | MDEyOklzc3VlQ29tbWVudDc1NjQ4MjE2Mw== | 9599 | 2021-01-08T01:06:23Z | 2021-01-08T01:06:54Z | OWNER | Yes, that logic is definitely at fault. It looks like it applies `urllib.parse.unquote_plus()` AFTER it's tried to do the `-` hash splitting thing, which is why it's failing here: https://github.com/simonw/datasette/blob/97fb10c17dd007a275ab743742e93e932335ad67/datasette/views/base.py#L184-L198 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
781262510 | |
https://github.com/simonw/datasette/issues/1091#issuecomment-756453945 | https://api.github.com/repos/simonw/datasette/issues/1091 | 756453945 | MDEyOklzc3VlQ29tbWVudDc1NjQ1Mzk0NQ== | 9599 | 2021-01-07T23:42:50Z | 2021-01-07T23:42:50Z | OWNER | @henry501 it looks like you spotted a bug in the documentation - I just addressed that, the fix is now live here: https://docs.datasette.io/en/latest/deploying.html#running-datasette-behind-a-proxy | { "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
742011049 | |
https://github.com/simonw/datasette/issues/1091#issuecomment-756453010 | https://api.github.com/repos/simonw/datasette/issues/1091 | 756453010 | MDEyOklzc3VlQ29tbWVudDc1NjQ1MzAxMA== | 9599 | 2021-01-07T23:39:58Z | 2021-01-07T23:40:25Z | OWNER | @tballison I think that's the solution! It looks like you need to use this in your config: `ProxyPass /datasette http://127.0.0.1:8001/datasette` Instead of this: `ProxyPass /datasette http://127.0.0.1:8001/` Give that a go and let me know if it fixes it. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
742011049 | |
https://github.com/simonw/datasette/issues/1171#issuecomment-756335394 | https://api.github.com/repos/simonw/datasette/issues/1171 | 756335394 | MDEyOklzc3VlQ29tbWVudDc1NjMzNTM5NA== | 9599 | 2021-01-07T19:35:59Z | 2021-01-07T19:35:59Z | OWNER | I requested a D-U-N-S number as a first step in getting a developer certificate: https://developer.apple.com/support/D-U-N-S/ | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
778450486 | |
https://github.com/simonw/datasette/issues/1180#issuecomment-756312213 | https://api.github.com/repos/simonw/datasette/issues/1180 | 756312213 | MDEyOklzc3VlQ29tbWVudDc1NjMxMjIxMw== | 9599 | 2021-01-07T18:56:24Z | 2021-01-07T18:56:24Z | OWNER | The `async_call_with_supported_arguments` version should be able to await any of the lazy arguments that are awaitable - can use `await_me_maybe` for that. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
780767542 | |
https://github.com/simonw/datasette/issues/1180#issuecomment-755500475 | https://api.github.com/repos/simonw/datasette/issues/1180 | 755500475 | MDEyOklzc3VlQ29tbWVudDc1NTUwMDQ3NQ== | 9599 | 2021-01-06T18:43:41Z | 2021-01-06T18:43:41Z | OWNER | Relevant code: https://github.com/simonw/datasette/blob/97fb10c17dd007a275ab743742e93e932335ad67/datasette/utils/__init__.py#L919-L940 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
780767542 | |
https://github.com/simonw/datasette/issues/1179#issuecomment-755495387 | https://api.github.com/repos/simonw/datasette/issues/1179 | 755495387 | MDEyOklzc3VlQ29tbWVudDc1NTQ5NTM4Nw== | 9599 | 2021-01-06T18:39:23Z | 2021-01-06T18:39:23Z | OWNER | In that case maybe there are three new arguments: `path`, `full_path` and `url`. I'll also add `request.full_path` for consistency with these: https://github.com/simonw/datasette/blob/97fb10c17dd007a275ab743742e93e932335ad67/datasette/utils/asgi.py#L77-L90 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
780278550 | |
https://github.com/simonw/datasette/issues/1179#issuecomment-755492945 | https://api.github.com/repos/simonw/datasette/issues/1179 | 755492945 | MDEyOklzc3VlQ29tbWVudDc1NTQ5Mjk0NQ== | 9599 | 2021-01-06T18:37:39Z | 2021-01-06T18:37:39Z | OWNER | I think I'll call this `full_path` for consistency with Django. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
780278550 |