mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Move non-metadata configuration from metadata.yaml to datasette.yaml
* Allow and permission blocks moved to datasette.yaml * Documentation updates, initial framework for configuration reference
This commit is contained in:
parent
4e1188f60f
commit
35deaabcb1
22 changed files with 595 additions and 493 deletions
|
|
@ -33,6 +33,7 @@ As an alternative to this, you can run Datasette in *configuration directory* mo
|
|||
# In a directory called my-app:
|
||||
my-app/one.db
|
||||
my-app/two.db
|
||||
my-app/datasette.yaml
|
||||
my-app/metadata.json
|
||||
my-app/templates/index.html
|
||||
my-app/plugins/my_plugin.py
|
||||
|
|
@ -47,7 +48,7 @@ Datasette will detect the files in that directory and automatically configure it
|
|||
The files that can be included in this directory are as follows. All are optional.
|
||||
|
||||
* ``*.db`` (or ``*.sqlite3`` or ``*.sqlite``) - SQLite database files that will be served by Datasette
|
||||
* ``datasette.json`` - :ref:`configuration` for the Datasette instance
|
||||
* ``datasette.yaml`` - :ref:`configuration` for the Datasette instance
|
||||
* ``metadata.json`` - :ref:`metadata` for those databases - ``metadata.yaml`` or ``metadata.yml`` can be used as well
|
||||
* ``inspect-data.json`` - the result of running ``datasette inspect *.db --inspect-file=inspect-data.json`` from the configuration directory - any database files listed here will be treated as immutable, so they should not be changed while Datasette is running
|
||||
* ``templates/`` - a directory containing :ref:`customization_custom_templates`
|
||||
|
|
@ -72,7 +73,7 @@ Setting this to ``off`` causes permission checks for :ref:`permissions_execute_s
|
|||
|
||||
datasette mydatabase.db --setting default_allow_sql off
|
||||
|
||||
There are two ways to achieve this: the other is to add ``"allow_sql": false`` to your ``metadata.json`` file, as described in :ref:`authentication_permissions_execute_sql`. This setting offers a more convenient way to do this.
|
||||
Another way to achieve this is to add ``"allow_sql": false`` to your ``datasette.yaml`` file, as described in :ref:`authentication_permissions_execute_sql`. This setting offers a more convenient way to do this.
|
||||
|
||||
.. _setting_default_page_size:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue