kopia lustrzana https://github.com/simonw/datasette
Fixed spelling errors spotted by codespell, refs #1417
rodzic
3d916ea432
commit
e459787a14
|
@ -60,7 +60,7 @@ The key question the permissions system answers is this:
|
|||
|
||||
**Actors** are :ref:`described above <authentication_actor>`.
|
||||
|
||||
An **action** is a string describing the action the actor would like to perfom. A full list is :ref:`provided below <permissions>` - examples include ``view-table`` and ``execute-sql``.
|
||||
An **action** is a string describing the action the actor would like to perform. A full list is :ref:`provided below <permissions>` - examples include ``view-table`` and ``execute-sql``.
|
||||
|
||||
A **resource** is the item the actor wishes to interact with - for example a specific database or table. Some actions, such as ``permissions-debug``, are not associated with a particular resource.
|
||||
|
||||
|
@ -73,7 +73,7 @@ Permissions with potentially harmful effects should default to *deny*. Plugin au
|
|||
Defining permissions with "allow" blocks
|
||||
----------------------------------------
|
||||
|
||||
The standard way to define permissions in Datasette is to use an ``"allow"`` block. This is a JSON document describing which actors are allowed to perfom a permission.
|
||||
The standard way to define permissions in Datasette is to use an ``"allow"`` block. This is a JSON document describing which actors are allowed to perform a permission.
|
||||
|
||||
The most basic form of allow block is this (`allow demo <https://latest.datasette.io/-/allow-debug?actor=%7B%22id%22%3A+%22root%22%7D&allow=%7B%0D%0A++++++++%22id%22%3A+%22root%22%0D%0A++++%7D>`__, `deny demo <https://latest.datasette.io/-/allow-debug?actor=%7B%22id%22%3A+%22trevor%22%7D&allow=%7B%0D%0A++++++++%22id%22%3A+%22root%22%0D%0A++++%7D>`__):
|
||||
|
||||
|
|
|
@ -426,7 +426,7 @@ See also `Datasette 0.49: The annotated release notes <https://simonwillison.net
|
|||
- Datasette now has `a GitHub discussions forum <https://github.com/simonw/datasette/discussions>`__ for conversations about the project that go beyond just bug reports and issues.
|
||||
- Datasette can now be installed on macOS using Homebrew! Run ``brew install simonw/datasette/datasette``. See :ref:`installation_homebrew`. (:issue:`335`)
|
||||
- Two new commands: ``datasette install name-of-plugin`` and ``datasette uninstall name-of-plugin``. These are equivalent to ``pip install`` and ``pip uninstall`` but automatically run in the same virtual environment as Datasette, so users don't have to figure out where that virtual environment is - useful for installations created using Homebrew or ``pipx``. See :ref:`plugins_installing`. (:issue:`925`)
|
||||
- A new command-line option, ``datasette --get``, accepts a path to a URL within the Datasette instance. It will run that request through Datasette (without starting a web server) and print out the repsonse. See :ref:`getting_started_datasette_get` for an example. (:issue:`926`)
|
||||
- A new command-line option, ``datasette --get``, accepts a path to a URL within the Datasette instance. It will run that request through Datasette (without starting a web server) and print out the response. See :ref:`getting_started_datasette_get` for an example. (:issue:`926`)
|
||||
|
||||
.. _v0_46:
|
||||
|
||||
|
@ -500,7 +500,7 @@ New plugin hooks
|
|||
Smaller changes
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
- Cascading view permissons - so if a user has ``view-table`` they can view the table page even if they do not have ``view-database`` or ``view-instance``. (:issue:`832`)
|
||||
- Cascading view permissions - so if a user has ``view-table`` they can view the table page even if they do not have ``view-database`` or ``view-instance``. (:issue:`832`)
|
||||
- CSRF protection no longer applies to ``Authentication: Bearer token`` requests or requests without cookies. (:issue:`835`)
|
||||
- ``datasette.add_message()`` now works inside plugins. (:issue:`864`)
|
||||
- Workaround for "Too many open files" error in test runs. (:issue:`846`)
|
||||
|
@ -714,7 +714,7 @@ Also in this release:
|
|||
* Datasette now has a *pattern portfolio* at ``/-/patterns`` - e.g. https://latest.datasette.io/-/patterns. This is a page that shows every Datasette user interface component in one place, to aid core development and people building custom CSS themes. (:issue:`151`)
|
||||
* SQLite `PRAGMA functions <https://www.sqlite.org/pragma.html#pragfunc>`__ such as ``pragma_table_info(tablename)`` are now allowed in Datasette SQL queries. (:issue:`761`)
|
||||
* Datasette pages now consistently return a ``content-type`` of ``text/html; charset=utf-8"``. (:issue:`752`)
|
||||
* Datasette now handles an ASGI ``raw_path`` value of ``None``, which should allow compatibilty with the `Mangum <https://github.com/erm/mangum>`__ adapter for running ASGI apps on AWS Lambda. Thanks, Colin Dellow. (`#719 <https://github.com/simonw/datasette/pull/719>`__)
|
||||
* Datasette now handles an ASGI ``raw_path`` value of ``None``, which should allow compatibility with the `Mangum <https://github.com/erm/mangum>`__ adapter for running ASGI apps on AWS Lambda. Thanks, Colin Dellow. (`#719 <https://github.com/simonw/datasette/pull/719>`__)
|
||||
* Installation documentation now covers how to :ref:`installation_pipx`. (:issue:`756`)
|
||||
* Improved the documentation for :ref:`full_text_search`. (:issue:`748`)
|
||||
|
||||
|
@ -1169,7 +1169,7 @@ Documentation improvements plus a fix for publishing to Zeit Now.
|
|||
New plugin hooks, improved database view support and an easier way to use more recent versions of SQLite.
|
||||
|
||||
- New ``publish_subcommand`` plugin hook. A plugin can now add additional ``datasette publish`` publishers in addition to the default ``now`` and ``heroku``, both of which have been refactored into default plugins. :ref:`publish_subcommand documentation <plugin_hook_publish_subcommand>`. Closes :issue:`349`
|
||||
- New ``render_cell`` plugin hook. Plugins can now customize how values are displayed in the HTML tables produced by Datasette's browseable interface. `datasette-json-html <https://github.com/simonw/datasette-json-html>`__ and `datasette-render-images <https://github.com/simonw/datasette-render-images>`__ are two new plugins that use this hook. :ref:`render_cell documentation <plugin_hook_render_cell>`. Closes :issue:`352`
|
||||
- New ``render_cell`` plugin hook. Plugins can now customize how values are displayed in the HTML tables produced by Datasette's browsable interface. `datasette-json-html <https://github.com/simonw/datasette-json-html>`__ and `datasette-render-images <https://github.com/simonw/datasette-render-images>`__ are two new plugins that use this hook. :ref:`render_cell documentation <plugin_hook_render_cell>`. Closes :issue:`352`
|
||||
- New ``extra_body_script`` plugin hook, enabling plugins to provide additional JavaScript that should be added to the page footer. :ref:`extra_body_script documentation <plugin_hook_extra_body_script>`.
|
||||
- ``extra_css_urls`` and ``extra_js_urls`` hooks now take additional optional parameters, allowing them to be more selective about which pages they apply to. :ref:`Documentation <plugin_hook_extra_css_urls>`.
|
||||
- You can now use the :ref:`sortable_columns metadata setting <metadata_sortable_columns>` to explicitly enable sort-by-column in the interface for database views, as well as for specific tables.
|
||||
|
|
|
@ -188,7 +188,7 @@ Then add these directives to proxy traffic::
|
|||
ProxyPass /my-datasette/ http://127.0.0.1:8009/my-datasette/
|
||||
ProxyPreserveHost On
|
||||
|
||||
Using ``--uds`` you can use Unix domain sockets similiar to the nginx example::
|
||||
Using ``--uds`` you can use Unix domain sockets similar to the nginx example::
|
||||
|
||||
ProxyPass /my-datasette/ unix:/tmp/datasette.sock|http://localhost/my-datasette/
|
||||
|
||||
|
|
|
@ -431,13 +431,13 @@ It offers the following methods:
|
|||
``await datasette.client.get(path, **kwargs)`` - returns HTTPX Response
|
||||
Execute an internal GET request against that path.
|
||||
|
||||
``await datasette.client.post(path, **kwargs)`` - returns HTTPX Respons
|
||||
``await datasette.client.post(path, **kwargs)`` - returns HTTPX Response
|
||||
Execute an internal POST request. Use ``data={"name": "value"}`` to pass form parameters.
|
||||
|
||||
``await datasette.client.options(path, **kwargs)`` - returns HTTPX Response
|
||||
Execute an internal OPTIONS request.
|
||||
|
||||
``await datasette.client.head(path, **kwargs)`` - returns HTTPX Respons
|
||||
``await datasette.client.head(path, **kwargs)`` - returns HTTPX Response
|
||||
Execute an internal HEAD request.
|
||||
|
||||
``await datasette.client.put(path, **kwargs)`` - returns HTTPX Response
|
||||
|
@ -714,7 +714,7 @@ The ``Database`` class also provides properties and methods for introspecting th
|
|||
List of names of tables in the database.
|
||||
|
||||
``await db.view_names()`` - list of strings
|
||||
List of names of views in tha database.
|
||||
List of names of views in the database.
|
||||
|
||||
``await db.table_columns(table)`` - list of strings
|
||||
Names of columns in a specific table.
|
||||
|
|
|
@ -39,7 +39,7 @@ Then later you can start Datasette against the ``counts.json`` file and use it t
|
|||
|
||||
datasette -i data.db --inspect-file=counts.json
|
||||
|
||||
You need to use the ``-i`` immutable mode against the databse file here or the counts from the JSON file will be ignored.
|
||||
You need to use the ``-i`` immutable mode against the database file here or the counts from the JSON file will be ignored.
|
||||
|
||||
You will rarely need to use this optimization in every-day use, but several of the ``datasette publish`` commands described in :ref:`publishing` use this optimization for better performance when deploying a database file to a hosting provider.
|
||||
|
||||
|
|
|
@ -664,7 +664,7 @@ Return an `ASGI <https://asgi.readthedocs.io/>`__ middleware wrapper function th
|
|||
|
||||
This is a very powerful hook. You can use it to manipulate the entire Datasette response, or even to configure new URL routes that will be handled by your own custom code.
|
||||
|
||||
You can write your ASGI code directly against the low-level specification, or you can use the middleware utilites provided by an ASGI framework such as `Starlette <https://www.starlette.io/middleware/>`__.
|
||||
You can write your ASGI code directly against the low-level specification, or you can use the middleware utilities provided by an ASGI framework such as `Starlette <https://www.starlette.io/middleware/>`__.
|
||||
|
||||
This example plugin adds a ``x-databases`` HTTP header listing the currently attached databases:
|
||||
|
||||
|
|
|
@ -165,7 +165,7 @@ You can now run the resulting container like so::
|
|||
|
||||
This exposes port 8001 inside the container as port 8081 on your host machine, so you can access the application at ``http://localhost:8081/``
|
||||
|
||||
You can customize the port that is exposed by the countainer using the ``--port`` option::
|
||||
You can customize the port that is exposed by the container using the ``--port`` option::
|
||||
|
||||
datasette package mydatabase.db --port 8080
|
||||
|
||||
|
|
|
@ -349,7 +349,7 @@ Using secrets with datasette publish
|
|||
|
||||
The :ref:`cli_publish` and :ref:`cli_package` commands both generate a secret for you automatically when Datasette is deployed.
|
||||
|
||||
This means that every time you deploy a new version of a Datasette project, a new secret will be generated. This will cause signed cookies to become inalid on every fresh deploy.
|
||||
This means that every time you deploy a new version of a Datasette project, a new secret will be generated. This will cause signed cookies to become invalid on every fresh deploy.
|
||||
|
||||
You can fix this by creating a secret that will be used for multiple deploys and passing it using the ``--secret`` option::
|
||||
|
||||
|
|
|
@ -403,7 +403,7 @@ Datasette can execute joins across multiple databases if it is started with the
|
|||
|
||||
If it is started in this way, the ``/_memory`` page can be used to execute queries that join across multiple databases.
|
||||
|
||||
References to tables in attached databases should be preceeded by the database name and a period.
|
||||
References to tables in attached databases should be preceded by the database name and a period.
|
||||
|
||||
For example, this query will show a list of tables across both of the above databases:
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue