mirror of
https://github.com/simonw/datasette.git
synced 2026-05-28 04:46:18 +02:00
Fixed some broken docs/ references
This commit is contained in:
parent
2704bc9c61
commit
e2a4f9abb6
4 changed files with 9 additions and 9 deletions
|
|
@ -1355,7 +1355,7 @@ Actor is allowed to alter a database table.
|
|||
set-column-type
|
||||
---------------
|
||||
|
||||
Actor is allowed to set assigned column types for columns in a table.
|
||||
Actor is allowed to set assigned :ref:`column types <table_configuration_column_types>` for columns in a table.
|
||||
|
||||
``resource`` - ``datasette.resources.TableResource(database, table)``
|
||||
``database`` is the name of the database (string)
|
||||
|
|
|
|||
|
|
@ -934,7 +934,7 @@ Other small fixes
|
|||
0.59 (2021-10-14)
|
||||
-----------------
|
||||
|
||||
- Columns can now have associated metadata descriptions in ``metadata.json``, see :ref:`table_configuration_columns`. (:issue:`942`)
|
||||
- Columns can now have associated metadata descriptions in ``metadata.json``, see :ref:`metadata_column_descriptions`. (:issue:`942`)
|
||||
- New :ref:`register_commands() <plugin_hook_register_commands>` plugin hook allows plugins to register additional Datasette CLI commands, e.g. ``datasette mycommand file.db``. (:issue:`1449`)
|
||||
- Adding ``?_facet_size=max`` to a table page now shows the number of unique values in each facet. (:issue:`1423`)
|
||||
- Upgraded dependency `httpx 0.20 <https://github.com/encode/httpx/releases/tag/0.20.0>`__ - the undocumented ``allow_redirects=`` parameter to :ref:`internals_datasette_client` is now ``follow_redirects=``, and defaults to ``False`` where it previously defaulted to ``True``. (:issue:`1488`)
|
||||
|
|
|
|||
|
|
@ -922,7 +922,7 @@ await .get_column_type(database, resource, column)
|
|||
``column`` - string
|
||||
The name of the column.
|
||||
|
||||
Returns a :ref:`ColumnType <column_types>` subclass instance with ``.config`` populated for the specified column, or ``None`` if no column type is assigned.
|
||||
Returns a ``ColumnType`` subclass instance with ``.config`` populated for the specified column, or ``None`` if no column type is assigned.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -943,7 +943,7 @@ await .get_column_types(database, resource)
|
|||
``resource`` - string
|
||||
The name of the table or view.
|
||||
|
||||
Returns a dictionary mapping column names to :ref:`ColumnType <column_types>` subclass instances (with ``.config`` populated) for all columns that have assigned types on the given resource.
|
||||
Returns a dictionary mapping column names to ``ColumnType`` subclass instances (with ``.config`` populated) for all columns that have assigned types on the given resource.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
|
|||
|
|
@ -503,10 +503,10 @@ Lets you customize the display of values within table cells in the HTML table vi
|
|||
``request`` - :ref:`internals_request`
|
||||
The current request object
|
||||
|
||||
``column_type`` - :ref:`ColumnType <column_types>` subclass instance or None
|
||||
The :ref:`ColumnType <column_types>` subclass instance assigned to this column (with ``.config`` populated), or ``None`` if no column type is assigned. You can access ``column_type.name``, ``column_type.config``, etc.
|
||||
``column_type`` - :ref:`ColumnType <datasette_column_types>` subclass instance or None
|
||||
The :ref:`ColumnType <datasette_column_types>` subclass instance assigned to this column (with ``.config`` populated), or ``None`` if no column type is assigned. You can access ``column_type.name``, ``column_type.config``, etc.
|
||||
|
||||
If a column has a :ref:`column type <column_types>` assigned and that column type's ``render_cell`` method returns a non-``None`` value, it will take priority over this plugin hook.
|
||||
If a column has a :ref:`column type <datasette_column_types>` assigned and that column type's ``render_cell`` method returns a non-``None`` value, it will take priority over this plugin hook.
|
||||
|
||||
If your hook returns ``None``, it will be ignored. Use this to indicate that your hook is not able to custom render this particular value.
|
||||
|
||||
|
|
@ -999,7 +999,7 @@ The permission system then uses this query along with rules from plugins to dete
|
|||
register_column_types(datasette)
|
||||
--------------------------------
|
||||
|
||||
Return a list of :ref:`ColumnType <column_types>` **subclasses** (not instances) to register custom column types. Column types define how values in specific columns are rendered, validated, and transformed.
|
||||
Return a list of :ref:`ColumnType <datasette_column_types>` **subclasses** (not instances) to register custom column types. Column types define how values in specific columns are rendered, validated, and transformed.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
@ -1069,7 +1069,7 @@ And the following methods, all optional:
|
|||
|
||||
Per-column configuration is available via ``self.config`` in all methods. When a column type is looked up for a specific column (via :ref:`get_column_type <datasette_get_column_type>` or :ref:`get_column_types <datasette_get_column_types>`), the returned instance has ``config`` set to the parsed JSON config dict for that column assignment, or ``None`` if no config was provided.
|
||||
|
||||
Column types are assigned to columns via the ``column_types`` key in :ref:`table configuration <metadata_tables>`:
|
||||
Column types are assigned to columns via the :ref:`column_types <table_configuration_column_types>` table configuration option:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue