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
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
e627510b76
BaseView.check_permissions is now datasette.ensure_permissions, closes #1675
...
Refs #1660
2022-03-21 10:13:16 -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
61419388c1
Rename route match groups for consistency, refs #1667 , #1660
2022-03-19 09:52:08 -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
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
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
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
8c401ee0f0
Fixed remaining code and docs for new block=True default, closes #1579
2021-12-23 11:18:20 -08:00
Simon Willison
ace86566b2
Remove concept of special_args, re-arrange TableView a bit, refs #1518
2021-12-22 12:23:05 -08:00
Simon Willison
4094741c28
Fixed bug with custom templates for writable canned queries, closes #1547
2021-12-19 13:11:57 -08:00
Simon Willison
d0f24f9bbc
Clarifying comment
...
The new filters stuff is a little bit action-at-a-distance
2021-12-17 15:55:06 -08:00
Simon Willison
aa7f0037a4
filters_from_request plugin hook, now used in TableView
...
- New `filters_from_request` plugin hook, closes #473
- Used it to extract the logic from TableView that handles `_search` and
`_through` and `_where` - refs #1518
Also needed for this plugin work: https://github.com/simonw/datasette-leaflet-freedraw/issues/7
2021-12-17 11:02:14 -08:00
Simon Willison
0663d5525c
More comments in TableView.data(), refs #1518
2021-12-16 14:00:29 -08:00
Simon Willison
2c07327d23
Move columns_to_select to TableView class, add lots of comments, refs #1518
2021-12-16 13:43:44 -08:00
Simon Willison
95d0dd7a1c
Fix for colliding facet types bug, closes #625
...
Refs #830
2021-12-16 12:12:04 -08:00
Simon Willison
992496f261
?_nosuggest=1 parameter for table views, closes #1557
2021-12-16 11:24:54 -08:00
Simon Willison
eb53837d2a
Always show count of distinct facet values, closes #1556
...
Refs #1423
2021-12-15 09:58:01 -08:00
Simon Willison
a6ff123de5
keep_blank_values=True when parsing query_string, closes #1551
...
Refs #1518
2021-12-12 12:01:51 -08:00
Simon Willison
a37ee74891
Correct link to _ prefix on row page, closes #1525
2021-11-29 22:34:31 -08:00
Simon Willison
06762776f7
Fix for incorrect hidden for fields for _columns, refs #1527
2021-11-29 19:04:35 -08:00
Simon Willison
08947fa764
Fix more broken base_url links
...
Refs #1519 , #838
2021-11-20 11:03:08 -08:00
Simon Willison
640031edfd
Fixed bug introduced in #1519
2021-11-19 17:01:17 -08:00
Simon Willison
fe687fd020
Fixed a whole bunch of broken base_url links
...
Refs #1519 , #838
2021-11-19 16:53:11 -08:00
Simon Willison
1c13e1af06
Ensure query columns are included too, ref #1503
2021-11-13 21:08:33 -08:00
Simon Willison
c9e3cfecc8
Columns in filters now ignore ?_nocol, closes #1503
2021-11-13 20:53:00 -08:00
Simon Willison
8584993529
--cors Access-Control-Allow-Headers: Authorization
...
Refs #1467 , refs https://github.com/simonw/datasette-auth-tokens/issues/4
2021-10-14 12:03:28 -07:00
Simon Willison
b50bf5d13f
Don't persist _next in hidden field, closes #1483
2021-10-13 14:08:06 -07:00
Simon Willison
875117c343
Fix bug with ?_next=x&_sort=rowid, closes #1470
2021-10-09 18:14:56 -07:00
Simon Willison
adb5b70de5
Show count of facet values if ?_facet_size=max, closes #1423
2021-08-16 11:56:32 -07:00
Simon Willison
ca4f83dc7b
Rename config= to settings=, refs #1432
2021-08-12 18:10:36 -07:00
Simon Willison
e837095ef3
Column metadata, closes #942
2021-08-12 16:53:23 -07:00
Simon Willison
fc4846850f
New way of deriving named parameters using explain, refs #1421
2021-08-08 20:21:13 -07:00
Simon Willison
a390bdf9ce
Stop using firstresult=True on render_cell, refs #1425
...
See https://github.com/simonw/datasette/issues/1425#issuecomment-894883664
2021-08-08 17:38:42 -07:00
Simon Willison
3bb6409a6c
render_cell() can now return an awaitable, refs
2021-08-08 16:05:00 -07:00
Simon Willison
66e143c76e
New hide_sql canned query option, refs #1422
2021-08-06 22:17:36 -07:00
Simon Willison
dd5ee8e668
Removed some unused imports
...
I found these with:
flake8 datasette | grep unus
2021-07-15 23:26:12 -07:00
Simon Willison
a6c8e7fa4c
Big performance boost for faceting, closes #1394
2021-07-14 17:05:43 -07:00
Simon Willison
83f6799a96
searchmode: raw table metadata property, closes #1389
2021-07-10 11:33:08 -07:00
Simon Willison
4a3e8561ab
Default 405 for POST, plus tests
2021-06-23 15:40:09 -07:00
Simon Willison
d23a267138
Make request available to menu plugin hooks, closes #1371
2021-06-09 21:45:24 -07:00