mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
This change updates the `-s/--setting` option to `datasette serve` to allow it to be used to set arbitrarily complex nested settings in a way that is compatible with the new `-c datasette.yml` work happening in: - #2143 It will enable things like this: ``` datasette data.db --setting plugins.datasette-ripgrep.path "/home/simon/code" ``` For the moment though it just affects [settings](https://docs.datasette.io/en/1.0a4/settings.html) - so you can do this: ``` datasette data.db --setting settings.sql_time_limit_ms 3500 ``` I've also implemented a backwards compatibility mechanism, so if you use it this way (the old way): ``` datasette data.db --setting sql_time_limit_ms 3500 ``` It will notice that the setting you passed is one of Datasette's core settings, and will treat that as if you said `settings.sql_time_limit_ms` instead.
This commit is contained in:
parent
527cec66b0
commit
d9aad1fd04
3 changed files with 46 additions and 47 deletions
|
|
@ -113,8 +113,8 @@ Once started you can access it at ``http://localhost:8001``
|
|||
/MOUNT/...
|
||||
--memory Make /_memory database available
|
||||
-c, --config FILENAME Path to JSON/YAML Datasette configuration file
|
||||
--setting SETTING... Setting, see
|
||||
docs.datasette.io/en/stable/settings.html
|
||||
-s, --setting SETTING... nested.key, value setting to use in Datasette
|
||||
configuration
|
||||
--secret TEXT Secret used for signing secure values, such as
|
||||
signed cookies
|
||||
--root Output URL that sets a cookie authenticating
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue