Simon Willison
6303ea5048
prepare_connection() now takes datasette and database args, refs #678
2020-02-21 17:32:40 -08:00
Simon Willison
d3f2fade88
Refactored run_sanity_checks to check_connection(conn), refs #674
2020-02-15 09:56:48 -08:00
Simon Willison
f1442a8151
Replaced self.ds.execute with db.execute in more places
2020-02-13 18:20:05 -08:00
Simon Willison
3ffb8f3b98
.add_database() and .remove_database() methods, refs #671
...
Also made a start on the Datasette class documentation, refs #576
2020-02-13 17:27:57 -08:00
Simon Willison
0091dfe3e5
More reliable tie-break ordering for facet results
...
I was seeing a weird bug where the order of results running tests
on my laptop was inconsistent, causing pytest failures even though
the order of tests in Travis CI was fine.
I think the fix is to explicitly state how facet ordering ties on
the count should be resolved.
2020-02-12 22:36:42 -08:00
Simon Willison
298a899e79
Reformatted with black
2020-02-12 22:05:46 -08:00
Jay Graves
33a12c8ae5
Allow leading comments in SQL input field ( #653 )
...
Thanks, @jaywgraves!
2020-02-04 18:13:24 -08:00
Simon Willison
70b915fb4b
Datasette.render_template() method, closes #577
...
Pull request #664 .
2020-02-04 12:26:17 -08:00
Simon Willison
67fc9c5720
--port argument for datasette package, plus tests - closes #661
...
From pull request #663
2020-01-29 14:46:43 -08:00
Katie McLaughlin
34d77d780f
gcloud run is now GA, s/beta// ( #660 )
...
Thanks, @glasnt
2020-01-21 15:28:11 -08:00
Simon Willison
3c861f363d
_search= queries now correctly escaped, fixes #651
...
Queries with reserved words or characters according to the SQLite
FTS5 query language could cause errors.
Queries are now escaped like so:
dog cat => "dog" "cat"
2019-12-29 18:48:30 +00:00
Simon Willison
d54318fc7f
Added template_debug setting, closes #654
2019-12-22 16:04:45 +00:00
Simon Willison
ceef5ce684
Documentation for --port=0
2019-12-22 15:42:30 +00:00
Simon Willison
85c19c4037
Apply black
2019-12-22 15:34:20 +00:00
Simon Willison
16665c9ee6
Better handling of corrupted database files
2019-12-22 15:31:40 +00:00
Simon Willison
d6b6c9171f
Include asyncio task information in /-/threads debug page
2019-12-04 22:47:17 -08:00
Simon Willison
df2879ee2a
Better documentation for --static, closes #641
...
https://datasette.readthedocs.io/en/stable/custom_templates.html#serving-static-files
2019-11-25 18:31:42 -08:00
Simon Willison
d3e1c3017e
Display 0 results, closes #637
2019-11-22 22:07:01 -08:00
Simon Willison
fd137da7f8
Suggest column facet only if at least one count > 1
...
Fixes #638
2019-11-21 16:56:55 -08:00
Simon Willison
440a70428c
Include rowid in filter select, closes #636
2019-11-19 15:01:10 -08:00
Simon Willison
a9909c29cc
Move .execute() from Datasette to Database
...
Refs #569 - I split this change out from #579
2019-11-15 14:52:03 -08:00
Simon Willison
8c642f04e0
Render templates using Jinja async mode
...
Closes #628
2019-11-14 15:14:22 -08:00
Simon Willison
f524510230
Fix "publish heroku" + upgrade to use Python 3.8.0
...
Closes #633 . Closes #632 .
2019-11-13 08:42:47 -08:00
Stanley Zheng
848dec4deb
Fix for datasette publish with just --source_url ( #631 )
...
Closes #572
2019-11-12 20:28:42 -08:00
Simon Willison
d977fbadf7
datasette publish uses python:3.8 base Docker image, closes #629
2019-11-11 22:03:09 -08:00
Simon Willison
5bc2570121
Include uvicorn version in /-/versions, refs #622
2019-11-11 20:45:12 -08:00
Simon Willison
1c063fae9d
Test against Python 3.8 in Travis ( #623 )
...
* Test against Python 3.8 in Travis
* Avoid current_task warnings in Python 3.8
2019-11-10 19:45:34 -08:00
Simon Willison
28c4a6db5b
CREATE INDEX statements on table page, closes #618
2019-11-09 17:29:36 -08:00
Simon Willison
83fc5165ac
Improved UI for publish cloudrun, closes #608
2019-11-07 18:48:39 -08:00
Simon Willison
f9c146b893
Removed unused special_args_lists variable
2019-11-06 16:55:44 -08:00
Simon Willison
c30f07c58e
Removed _group_count=col feature, closes #504
2019-11-05 21:12:55 -08:00
Tobias Kunze
931bfc6661
Handle spaces in DB names ( #590 )
...
Closes #503 - thanks, @rixx
2019-11-04 15:16:30 -08:00
Simon Willison
52fa79c607
Use select colnames, not select * for table view - refs #615
2019-11-04 15:03:48 -08:00
Simon Willison
9db22cdf18
pk__notin= filter, closes #614
2019-11-03 20:11:55 -08:00
Tobias Kunze
ee330222f4
Offer to format readonly SQL ( #602 )
...
Following discussion in #601 , this PR adds a "Format SQL" button to
read-only SQL (if the SQL actually differs from the formatting result).
It also removes a console error on readonly SQL queries.
Thanks, @rixx!
2019-11-03 18:39:55 -08:00
Simon Willison
2bf7ce5f51
Fix CSV export for nullable foreign keys, closes #612
2019-11-02 16:12:46 -07:00
Simon Willison
14da70525b
Don't show 'None' as label for nullable foreign key, closes #406
2019-11-02 15:29:40 -07:00
Simon Willison
ed57e4f990
Plugin static assets support both hyphens and underscores in names
...
Closes #611
2019-11-01 15:15:10 -07:00
Simon Willison
ffae2f0ecd
Better documentation of --host, closes #574
2019-11-01 14:57:49 -07:00
Simon Willison
7152e76eda
Don't suggest array facet if column is only [], closes #610
2019-11-01 14:45:59 -07:00
Simon Willison
ba5414f16b
Only inspect first 100 records for #562
2019-11-01 12:38:15 -07:00
Simon Willison
50287e7c6b
Only suggest array facet for arrays of strings - closes #562
2019-11-01 12:37:46 -07:00
Simon Willison
937828f946
Use distinfo.project_name for plugin name if available, closes #606
2019-10-31 22:39:59 -07:00
Simon Willison
3ca290e0db
Fixed dumb error
2019-10-30 12:00:21 -07:00
Simon Willison
e2c390500e
Persist _where= in hidden fields, closes #604
2019-10-30 11:49:26 -07:00
Simon Willison
5dd4d2b2d3
Update to latest black ( #609 )
2019-10-30 11:49:01 -07:00
chris48s
f4c0830529
Always pop as_format off args dict ( #603 )
...
Closes #563 . Thanks, @chris48s
2019-10-20 19:03:08 -07:00
Simon Willison
e877b1cb12
Don't auto-format SQL on page load ( #601 )
...
Closes #600
2019-10-18 16:56:44 -07:00
Simon Willison
b647b5efc2
Fix for /foo v.s. /foo-bar issue, closes #597
...
Pull request #599
2019-10-18 15:51:07 -07:00
Simon Willison
b6ad1fdc70
Fixed bug returning non-ascii characters in CSV, closes #584
2019-10-17 22:23:01 -07:00