Simon Willison
bb030ba46f
More margin on /-/allow-debug page
2022-11-02 22:10:59 -07:00
Simon Willison
c51d9246b9
Permission check testing tool, refs #1881
2022-11-02 22:10:07 -07:00
Simon Willison
9b5a73ba4c
Applied Black
2022-11-02 21:46:05 -07:00
Simon Willison
719e757252
Return method not allowed error in JSON in some situations
...
Added this while playing with the new API explorer, refs #1871
2022-11-02 20:12:13 -07:00
Simon Willison
000eeb4464
Link to Datasette API docs from /-/api, refs #1871
2022-11-01 22:45:05 -07:00
Simon Willison
042881a522
Ran Prettier, refs #1871
2022-11-01 22:30:16 -07:00
Simon Willison
0b166befc0
API explorer can now do GET, has JSON syntax highlighting
...
Refs #1871
2022-11-01 17:31:22 -07:00
Simon Willison
497290beaf
Handle database errors in /-/insert, refs #1866 , #1873
...
Also improved API explorer to show HTTP status of response, refs #1871
2022-11-01 12:59:17 -07:00
Simon Willison
9bec7c38eb
ignore and replace options for bulk inserts, refs #1873
...
Also removed the rule that you cannot include primary keys in the rows you insert.
And added validation that catches invalid parameters in the incoming JSON.
And renamed "inserted" to "rows" in the returned JSON for return_rows: true
2022-11-01 11:08:17 -07:00
Simon Willison
93a02281da
Show interrupted query in resizing textarea, closes #1876
2022-11-01 10:38:24 -07:00
Simon Willison
2ec5583629
Show interrupted query in resizing textarea, closes #1876
2022-11-01 10:22:26 -07:00
Simon Willison
00632ded30
Initial attempt at /db/table/row/-/delete, refs #1864
2022-10-30 16:16:00 -07:00
Simon Willison
2865d3956f
/db/table/-/drop API, closes #1874
2022-10-30 15:17:21 -07:00
Simon Willison
fedbfcc368
Neater display of output and errors in API explorer, refs #1871
2022-10-30 14:49:07 -07:00
Simon Willison
9eb9ffae3d
Drop API token requirement from API explorer, refs #1871
2022-10-30 13:09:55 -07:00
Simon Willison
f6bf2d8045
Initial prototype of API explorer at /-/api, refs #1871
2022-10-29 23:20:11 -07:00
Simon Willison
c35859ae3d
API for bulk inserts, closes #1866
2022-10-29 23:03:45 -07:00
Simon Willison
61171f0154
Release 0.63
...
Refs #1646 , #1786 , #1787 , #1789 , #1794 , #1800 , #1804 , #1805 , #1808 , #1809 , #1816 , #1819 , #1825 , #1829 , #1831 , #1834 , #1844 , #1853 , #1860
Closes #1869
2022-10-27 17:58:41 -07:00
Forest Gregg
2ea60e12d9
Make hash and size a lazy property ( #1837 )
...
* use inspect data for hash and file size
* make hash and cached_size lazy properties
* move hash property near size
2022-10-27 17:58:41 -07:00
Simon Willison
bf00b0b59b
Release 0.63
...
Refs #1646 , #1786 , #1787 , #1789 , #1794 , #1800 , #1804 , #1805 , #1808 , #1809 , #1816 , #1819 , #1825 , #1829 , #1831 , #1834 , #1844 , #1853 , #1860
Closes #1869
2022-10-27 15:11:26 -07:00
Forest Gregg
b912d92b65
Make hash and size a lazy property ( #1837 )
...
* use inspect data for hash and file size
* make hash and cached_size lazy properties
* move hash property near size
2022-10-27 13:51:20 -07:00
Simon Willison
6e788b49ed
New URL design /db/table/-/insert, refs #1851
2022-10-27 13:18:05 -07:00
Simon Willison
a51608090b
Slight tweak to insert row API design, refs #1851
...
https://github.com/simonw/datasette/issues/1851#issuecomment-1292997608
2022-10-27 12:06:18 -07:00
Simon Willison
b597bb6b3e
Better comment handling in SQL regex, refs #1860
2022-10-27 11:52:06 -07:00
Simon Willison
5f6be3c48b
Better comment handling in SQL regex, refs #1860
2022-10-27 11:47:48 -07:00
Simon Willison
51c436fed2
First draft of insert row write API, refs #1851
2022-10-26 20:57:02 -07:00
Simon Willison
382a871583
max_signed_tokens_ttl setting, closes #1858
...
Also redesigned token format to include creation time and optional duration.
2022-10-26 20:14:59 -07:00
Simon Willison
af5d5d0243
Allow leading comments on SQL queries, refs #1860
2022-10-26 20:14:59 -07:00
Simon Willison
55f860c304
Fix bug with breadcrumbs and request=None, closes #1849
2022-10-26 20:14:59 -07:00
Simon Willison
55a709c480
Allow leading comments on SQL queries, refs #1860
2022-10-26 14:34:33 -07:00
Simon Willison
df7bf0b2fc
Fix bug with breadcrumbs and request=None, closes #1849
2022-10-26 14:13:31 -07:00
Simon Willison
c7956eed77
datasette create-token command, refs #1859
2022-10-25 21:26:12 -07:00
Simon Willison
c23fa850e7
allow_signed_tokens setting, closes #1856
2022-10-25 19:55:47 -07:00
Simon Willison
0f013ff497
Mechanism to prevent tokens creating tokens, closes #1857
2022-10-25 19:43:55 -07:00
Simon Willison
b29e487bc3
actor_from_request for dstok_ tokens, refs #1852
2022-10-25 19:18:41 -07:00
Simon Willison
7ab091e8ef
Tests and docs for /-/create-token, refs #1852
2022-10-25 19:04:05 -07:00
Simon Willison
68ccb7578b
dstoke_ prefix for tokens
...
Refs https://github.com/simonw/datasette/issues/1852#issuecomment-1291290451
2022-10-25 18:40:07 -07:00
Simon Willison
42f8b402e6
Initial prototype of create API token page, refs #1852
2022-10-25 17:07:58 -07:00
Simon Willison
9676b2deb0
Upgrade Docker images to Python 3.11, closes #1853
2022-10-25 12:04:53 -07:00
Simon Willison
02ae1a0029
Upgrade Docker images to Python 3.11, closes #1853
2022-10-25 12:04:25 -07:00
Simon Willison
602c0888ce
Release 0.63a1
...
Refs #1646 , #1819 , #1825 , #1829 , #1831 , #1832 , #1834 , #1844 , #1848
2022-10-23 20:07:09 -07:00
Simon Willison
5be86d48b2
Fix display of padlocks on database page, closes #1848
2022-10-23 19:42:30 -07:00
Simon Willison
78dad236df
check_visibility can now take multiple permissions into account
...
Closes #1829
2022-10-23 19:11:33 -07:00
Simon Willison
1a5e5f2aa9
Refactor breadcrumbs to respect permissions, refs #1831
2022-10-13 14:42:52 -07:00
Simon Willison
b7fec7f902
.sqlite/.sqlite3 extensions for config directory mode
...
Closes #1646
2022-10-07 16:03:30 -07:00
Forest Gregg
eff112498e
Useuse inspect data for hash and file size on startup
...
Thanks, @fgregg
Closes #1834
2022-10-06 13:06:06 -07:00
Simon Willison
883e326dd6
Drop word-wrap: anywhere, refs #1828 , #1805
2022-10-02 14:26:16 -07:00
Simon Willison
5f9f567acb
Show SQL query when reporting time limit error, closes #1819
2022-09-26 16:06:01 -07:00
Simon Willison
212137a90b
Release 0.63a0
...
Refs #1786 , #1787 , #1789 , #1794 , #1800 , #1804 , #1805 , #1808 , #1809 , #1816
2022-09-26 14:14:25 -07:00
Simon Willison
cb1e093fd3
Fixed error message, closes #1816
2022-09-19 18:15:40 -07:00
Simon Willison
df851c117d
Validate settings.json keys on startup, closes #1816
...
Refs #1814
2022-09-19 16:46:39 -07:00
Simon Willison
ddc999ad12
Async support for prepare_jinja2_environment, closes #1809
2022-09-16 20:38:24 -07:00
Simon Willison
b40872f5e5
prepare_jinja2_environment(datasette) argument, refs #1809
2022-09-14 14:31:54 -07:00
Simon Willison
fb7e70d5e7
Database(is_mutable=) now defaults to True, closes #1808
...
Refs https://github.com/simonw/datasette-upload-dbs/issues/6
2022-09-09 09:19:20 -07:00
Simon Willison
bf8d84af54
word-wrap: anywhere on links in cells, refs #1805
2022-09-06 20:34:59 -07:00
Simon Willison
5aa359b869
Apply cell truncation on query page too, refs #1805
2022-09-06 16:58:30 -07:00
Simon Willison
d0737e4de5
truncate_cells_html now affects URLs too, refs #1805
2022-09-06 16:50:43 -07:00
Simon Willison
303c6c733d
Fix for incorrectly handled _facet_size=max, refs #1804
2022-09-06 11:05:00 -07:00
Simon Willison
8430c3bc7d
table facet_size in metadata, refs #1804
2022-09-06 08:59:19 -07:00
Simon Willison
d80775a48d
Raise error if it's not about loops, refs #1802
2022-09-06 08:29:07 -07:00
Daniel Rech
c9d1943aed
Fix word break in facets by adding ul.tight-bullets li word-break: break-all ( #1794 )
...
Thanks, @dmr
2022-09-05 17:45:41 -07:00
Simon Willison
64288d827f
Workaround for test failure: RuntimeError: There is no current event loop ( #1803 )
...
* Remove ensure_eventloop hack
* Hack to recover from intermittent RuntimeError calling asyncio.Lock()
2022-09-05 17:40:19 -07:00
Simon Willison
fd1086c686
Applied Black, refs #1789
2022-08-23 11:35:41 -07:00
Alex Garcia
1d64c9a8da
Add new entrypoint option to --load-extensions. ( #1789 )
...
Thanks, @asg017
2022-08-23 11:34:30 -07:00
Simon Willison
6c0ba7c00c
Improved CLI reference documentation, refs #1787
2022-08-18 14:52:04 -07:00
Simon Willison
a3e6f1b167
Increase height of non-JS textarea to fit query
...
Closes #1786
2022-08-18 09:06:02 -07:00
Simon Willison
815162cf02
Release 0.62
...
Refs #903 , #1300 , #1683 , #1701 , #1712 , #1717 , #1718 , #1728 , #1733 , #1738 , #1739 , #1744 , #1746 , #1748 , #1759 , #1766 , #1768 , #1770 , #1773 , #1779
Closes #1782
2022-08-14 10:32:42 -07:00
Simon Willison
82167105ee
--min-instances and --max-instances Cloud Run publish options, closes #1779
2022-08-14 10:07:30 -07:00
Simon Willison
c1396bf860
Don't allow canned write queries on immutable DBs, closes #1728
2022-08-14 09:34:31 -07:00
Simon Willison
1563c22a8c
Don't duplicate _sort_desc, refs #1738
2022-08-14 09:13:12 -07:00
Simon Willison
080d4b3e06
Switch to python:3.10.6-slim-bullseye for datasette publish - refs #1768
2022-08-14 08:49:14 -07:00
Simon Willison
df4fd2d7dd
_sort= works even if sort column not selected, closes #1773
2022-08-14 08:44:02 -07:00
Chris Amico
01369176b0
Keep track of datasette.config_dir ( #1766 )
...
Thanks, @eyeseast - closes #1764
2022-07-17 18:12:45 -07:00
Simon Willison
6d5e195547
Release 0.62a1
...
Refs #1300 , #1739 , #1744 , #1746 , #1748 , #1759 , #1770
2022-07-17 17:59:20 -07:00
Simon Willison
c09c53f345
New handle_exception plugin hook, refs #1770
...
Also refs:
- https://github.com/simonw/datasette-sentry/issues/1
- https://github.com/simonw/datasette-show-errors/issues/2
2022-07-17 16:24:39 -07:00
Simon Willison
8188f55efc
Rename handle_500 to handle_exception, refs #1770
2022-07-17 15:24:16 -07:00
Simon Willison
6373bb3414
Expose current SQLite row to render_cell hook, closes #1300
2022-07-07 09:30:49 -07:00
M. Nasimul Haque
00e59ec461
Extract facet pieces of table.html into included templates
...
Thanks, @nsmgr8
2022-06-20 11:05:44 -07:00
Simon Willison
3508bf7875
--nolock mode to ignore locked files, closes #1744
2022-05-17 12:40:25 -07:00
Simon Willison
280ff372ab
ETag support for .db downloads, closes #1739
2022-05-03 07:59:46 -07:00
Simon Willison
943aa2e1f7
Release 0.62a0
...
Refs #1683 , #1701 , #1712 , #1717 , #1718 , #1733
2022-05-02 14:38:34 -07:00
Simon Willison
3f00a29141
Clean up compatibility with Pyodide ( #1736 )
...
* Optional uvicorn import for Pyodide, refs #1733
* --setting num_sql_threads 0 to disable threading, refs #1735
2022-05-02 13:15:27 -07:00
Simon Willison
a29c127789
Rename to_decimal/from_decimal to decode/encode, refs #1734
2022-05-02 12:44:09 -07:00
Simon Willison
687907aa2b
Remove python-baseconv dependency, refs #1733 , closes #1734
2022-05-02 12:39:06 -07:00
Simon Willison
7e03394734
Optional uvicorn import for Pyodide, refs #1733
2022-05-02 12:20:14 -07:00
Simon Willison
942411ef94
Execute some TableView queries in parallel
...
Use ?_noparallel=1 to opt out (undocumented, useful for benchmark comparisons)
Refs #1723 , #1715
2022-04-26 15:50:02 -07:00
Simon Willison
8a0c38f0b8
Rename database->database_name and table-> table_name, refs #1715
2022-04-26 15:50:02 -07:00
Simon Willison
579f59dcec
Refactor to remove RowTableShared class, closes #1719
...
Refs #1715
2022-04-25 11:33:35 -07:00
Simon Willison
e64d14e413
Use type integer for --timeout, refs #1717
2022-04-24 07:09:08 -07:00
Tim Sherratt
3001e1e394
Add timeout option to Cloudrun build ( #1717 )
...
* Add timeout option for build phase
* Make the --timeout setting optional
* Add test for --timeout setting
Thanks, @wragge
2022-04-24 07:03:08 -07:00
Simon Willison
0bc5186b7b
Tooltip and commas for byte length display, closes #1712
2022-04-12 11:44:12 -07:00
Simon Willison
143c105f87
Removed rogue print
2022-04-12 11:43:32 -07:00
Simon Willison
90d1be9952
Tilde encoding now encodes space as plus, closes #1701
...
Refs #1657
2022-04-06 08:55:01 -07:00
Simon Willison
5c5e9b3657
Request.fake(... url_vars), plus .fake() is now documented
...
Also made 'from datasette import Request' shortcut work.
Closes #1697
2022-03-31 19:01:58 -07:00
Simon Willison
c496f2b663
Don't show facet in cog menu if not allow_facet, closes #1683
2022-03-24 12:16:19 -07:00
Simon Willison
d431a9055e
Release 0.61.1
...
Refs #1682
Refs https://github.com/simonw/datasette-hashed-urls/issues/13
2022-03-23 11:54:10 -07:00
Simon Willison
0159662ab8
Fix for bug running ?sql= against databases with a different route, closes #1682
2022-03-23 11:48:10 -07:00
Simon Willison
d7c793d799
Release 0.61
...
Refs #957 , #1228 , #1533 , #1545 , #1576 , #1577 , #1587 , #1601 , #1603 , #1607 , #1612 , #1621 , #1649 , #1654 , #1657 , #1661 , #1668 , #1675 , #1678
2022-03-23 11:12:26 -07:00
Simon Willison
72bfd75fb7
Drop n=1 threshold down to <= 20ms, closes #1679
2022-03-21 14:55:50 -07:00
Simon Willison
1a7750eb29
Documented datasette.check_visibility() method, closes #1678
2022-03-21 12:01:37 -07:00
Simon Willison
194e4f6c3f
Removed check_permission() from BaseView, closes #1677
...
Refs #1660
2022-03-21 11:41:56 -07:00
Simon Willison
dfafce6d96
Display no-opinion permission checks on /-/permissions
2022-03-21 11:37:27 -07:00
Simon Willison
e627510b76
BaseView.check_permissions is now datasette.ensure_permissions, closes #1675
...
Refs #1660
2022-03-21 10:13:16 -07:00
Simon Willison
5471e3c491
Release 0.61a0
...
Refs #957 , #1533 , #1545 , #1576 , #1577 , #1587 , #1601 , #1603 , #1607 , #1612 , #1621 , #1649 , #1654 , #1657 , #1661 , #1668
2022-03-19 18:14:40 -07:00
Simon Willison
cdbae2b93f
Fixed internal links to respect db.route, refs #1668
2022-03-19 17:31:23 -07:00
Simon Willison
7a6654a253
Databases can now have a .route separate from their .name, refs #1668
2022-03-19 17:11:17 -07:00
Simon Willison
798f075ef9
Read format from route captures, closes #1667
...
Refs #1660
2022-03-19 13:32:29 -07:00
Simon Willison
b9c2b1cfc8
Consistent treatment of format in route capturing, refs #1667
...
Also refs #1660
2022-03-19 13:29:10 -07:00
Simon Willison
61419388c1
Rename route match groups for consistency, refs #1667 , #1660
2022-03-19 09:52:08 -07:00
Simon Willison
711767bcd3
Refactored URL routing to add tests, closes #1666
...
Refs #1660
2022-03-18 21:03:08 -07:00
Simon Willison
4e47a2d894
Fixed bug where tables with a column called n caused 500 errors
...
Closes #1228
2022-03-18 18:37:54 -07:00
Simon Willison
9979dcd07f
Also remove default_cache_ttl_hashed setting, refs #1661
2022-03-18 17:25:14 -07:00
Simon Willison
8658c66438
Show error if --setting hash_urls 1 used, refs #1661
2022-03-18 17:19:31 -07:00
Simon Willison
d4f60c2388
Remove hashed URL mode
...
Also simplified how view class routing works.
Refs #1661
2022-03-18 17:12:03 -07:00
Simon Willison
a35393b29c
Tilde encoding ( #1659 )
...
Closes #1657
Refs #1439
2022-03-15 11:01:57 -07:00
Simon Willison
77e718c3ff
Revert "Fix bug with percentage redirects, close #1650"
...
This reverts commit c85d669de3
.
Refs #1658
2022-03-15 08:37:31 -07:00
Simon Willison
c85d669de3
Fix bug with percentage redirects, close #1650
2022-03-07 11:26:08 -08:00
Simon Willison
020effe47b
Preserve query string in % to - redirects, refs #1650
2022-03-07 08:18:07 -08:00
Simon Willison
644d25d1de
Redirect old % URLs to new - encoded URLs, closes #1650
...
Refs #1439
2022-03-07 08:01:42 -08:00
Simon Willison
1baa030eca
Switch to dash encoding for table/database/row-pk in paths
...
* Dash encoding functions, tests and docs, refs #1439
* dash encoding is now like percent encoding but with dashes
* Use dash-encoding for row PKs and ?_next=, refs #1439
* Use dash encoding for table names, refs #1439
* Use dash encoding for database names, too, refs #1439
See also https://simonwillison.net/2022/Mar/5/dash-encoding/
2022-03-07 07:38:29 -08:00
Dan Peterson
de810f49cc
Add /opt/homebrew to where spatialite extension can be found ( #1649 )
...
Helps homebrew on Apple Silicon setups find spatialite without needing
a full path.
Similar to #1114
Thanks, @danp
2022-03-06 11:39:15 -08:00
Simon Willison
5010d1359b
Fix for test failure caused by SQLite 3.37.0+, closes #1647
2022-03-05 11:46:59 -08:00
Simon Willison
458f03ad3a
More SpatiaLite details on /-/versions, closes #1607
2022-02-08 22:32:19 -08:00
Simon Willison
1b2f0ab6bb
Revert "Use de-dupe idiom that works with Python 3.6, refs #1632"
...
This reverts commit 5bfd001b55
.
No need for this on the main branch because it doesn't support Python 3.6 any more.
2022-02-07 15:43:45 -08:00
Simon Willison
5bfd001b55
Use de-dupe idiom that works with Python 3.6, refs #1632
2022-02-07 15:42:37 -08:00
Simon Willison
fa5fc327ad
Release 0.60.2
...
Refs #1632
2022-02-07 15:34:01 -08:00
Simon Willison
0cd982fc6a
De-duplicate 'datasette db.db db.db', closes #1632
...
Refs https://github.com/simonw/datasette-publish-fly/pull/12
2022-02-07 15:28:59 -08:00
Simon Willison
d9b508ffaa
@documented decorator plus unit test plus sphinx.ext.autodoc
...
New mechanism for marking datasette.utils functions that should be covered by the
documentation, then testing that they have indeed been documented.
Also enabled sphinx.ext.autodoc which can now be used to embed the documented
versions of those functions.
Refs #1176
2022-02-06 22:31:06 -08:00
Simon Willison
8a25ea9bca
Implemented import shortcuts, closes #957
2022-02-05 22:34:33 -08:00
Simon Willison
da53e0360d
tracer.trace_child_tasks() for asyncio.gather tracing
...
Also added documentation for datasette.tracer module.
Closes #1576
2022-02-04 21:19:49 -08:00
Robert Christie
1af1041f91
Jinja template_name should use "/" even on Windows ( #1617 )
...
Closes #1545 . Thanks, Robert Christie
2022-02-02 17:58:35 -08:00
Simon Willison
23a09b0f6a
Remove JSON rel=alternate from some pages, closes #1623
2022-02-02 13:48:52 -08:00
Simon Willison
8d5779acf0
Refactored alternate_url_json mechanism, refs #1620 , #1533
2022-02-02 13:32:47 -08:00
Simon Willison
b72b2423c7
rel=alternate JSON for queries and database pages, closes #1620
2022-02-02 13:22:45 -08:00
Simon Willison
3ef47a0896
Link rel=alternate header for tables and rows
...
Also added Access-Control-Expose-Headers: Link to --cors mode.
Closes #1533
Refs https://github.com/simonw/datasette-notebook/issues/2
LL# metadata.json.1
2022-02-01 23:49:09 -08:00
Simon Willison
68cc1e2dbb
Move queries to top of database page, refs #1612
2022-01-25 10:28:15 -08:00
Simon Willison
150967d98e
Hand-edited pixel favicon, refs #1603
2022-01-20 10:43:15 -08:00
Simon Willison
b01c9b68d1
Oops I pushed the wrong favicon, refs #1603
2022-01-19 21:54:41 -08:00
Simon Willison
b2eebf5ebf
No need to send this, it's got a default, refs #1603
2022-01-19 21:52:00 -08:00
Simon Willison
0467723ee5
New, improved favicon - refs #1603
2022-01-19 21:46:03 -08:00
Simon Willison
e1770766ce
Return plugins and hooks in predictable order
2022-01-19 21:14:04 -08:00
Simon Willison
43c30ce023
Use cog to maintain default plugin list in plugins.rst, closes #1600
...
Also fixed a bug I spotted where datasette.filters showed the same hook three times.
2022-01-19 21:04:09 -08:00
Simon Willison
14e320329f
Hidden tables data_licenses, KNN, KNN2 for SpatiaLite, closes #1601
2022-01-19 20:38:49 -08:00
Simon Willison
58652dd925
Hidden tables sqlite1/2/3/4, closes #1587
2022-01-19 20:12:46 -08:00
Simon Willison
cb29119db9
Release 0.60
...
Refs #473 , #625 , #1527 , #1544 , #1547 , #1551 , #1552 , #1555 , #1556 , #1557 ,
#1563 , #1564 , #1568 , #1570 , #1575 , #1579 , #1588 , #1594
2022-01-13 17:36:51 -08:00
Simon Willison
ab7d6a7179
Updated settings help URL to avoid redirect
2022-01-13 16:38:16 -08:00
Simon Willison
3a0f7d6488
Fixed hidden form fields bug #1527
2022-01-13 16:27:21 -08:00
Simon Willison
515f8d38eb
Help summaries for publish cloudrun/heroku
2022-01-13 16:12:54 -08:00
Simon Willison
8cf4b77a92
Better copy for 'datasette plugins --help'
2022-01-13 16:11:07 -08:00
Simon Willison
8f5c44a166
Better --help summaries for install and uninstall
2022-01-13 16:09:38 -08:00