From e2a4f9abb65eb064affcf41728a5c75b82abf473 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Wed, 18 Mar 2026 13:00:27 -0700 Subject: [PATCH] Fixed some broken docs/ references --- docs/authentication.rst | 2 +- docs/changelog.rst | 2 +- docs/internals.rst | 4 ++-- docs/plugin_hooks.rst | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/authentication.rst b/docs/authentication.rst index a796d11e..7fa3a241 100644 --- a/docs/authentication.rst +++ b/docs/authentication.rst @@ -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 ` for columns in a table. ``resource`` - ``datasette.resources.TableResource(database, table)`` ``database`` is the name of the database (string) diff --git a/docs/changelog.rst b/docs/changelog.rst index 71d63e33..3d7d8405 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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 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 `__ - 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`) diff --git a/docs/internals.rst b/docs/internals.rst index 2442e687..704643cc 100644 --- a/docs/internals.rst +++ b/docs/internals.rst @@ -922,7 +922,7 @@ await .get_column_type(database, resource, column) ``column`` - string The name of the column. -Returns a :ref:`ColumnType ` 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 ` 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 diff --git a/docs/plugin_hooks.rst b/docs/plugin_hooks.rst index 53a47334..e375707d 100644 --- a/docs/plugin_hooks.rst +++ b/docs/plugin_hooks.rst @@ -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 ` subclass instance or None - The :ref:`ColumnType ` 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 ` subclass instance or None + The :ref:`ColumnType ` 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 ` 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 ` 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 ` **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 ` **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 ` or :ref:`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 `: +Column types are assigned to columns via the :ref:`column_types ` table configuration option: .. code-block:: yaml