mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Corrected documentation for datasette.urls.static_plugins
This commit is contained in:
parent
6f41c8a2be
commit
73bed17563
1 changed files with 2 additions and 7 deletions
|
|
@ -458,16 +458,11 @@ The ``datasette.urls`` object contains methods for building URLs to pages within
|
|||
``datasette.urls.static_plugins(plugin_name, path)``
|
||||
Returns the URL of one of the static assets belonging to a plugin.
|
||||
|
||||
``datasette.url.static_plugins("datasette_cluster_map", "datasette-cluster-map.js")`` would return ``"/-/static-plugins/datasette_cluster_map/datasette-cluster-map.js"``
|
||||
``datasette.urls.static_plugins("datasette_cluster_map", "datasette-cluster-map.js")`` would return ``"/-/static-plugins/datasette_cluster_map/datasette-cluster-map.js"``
|
||||
|
||||
``datasette.urls.static(path)``
|
||||
Returns the URL of one of Datasette's default static assets, for example ``"/-/static/app.css"``
|
||||
|
||||
``datasette.urls.static_plugins(plugin_name, path)``
|
||||
Returns the URL of one of the static assets belonging to a plugin.
|
||||
|
||||
``datasette.url.static_plugins("datasette_cluster_map", "datasette-cluster-map.js")`` would return ``"/-/static-plugins/datasette_cluster_map/datasette-cluster-map.js"``
|
||||
|
||||
``datasette.urls.database(database_name, format=None)``
|
||||
Returns the URL to a database page, for example ``"/fixtures"``
|
||||
|
||||
|
|
@ -765,4 +760,4 @@ By default all actors are denied access to the ``view-database`` permission for
|
|||
|
||||
Plugins can access this database by calling ``db = datasette.get_database("_internal")`` and then executing queries using the :ref:`Database API <internals_database>`.
|
||||
|
||||
You can explore an example of this database by `signing in as root <https://latest.datasette.io/login-as-root>`__ to the ``latest.datasette.io`` demo instance and then navigating to `latest.datasette.io/_internal <https://latest.datasette.io/_internal>`__.
|
||||
You can explore an example of this database by `signing in as root <https://latest.datasette.io/login-as-root>`__ to the ``latest.datasette.io`` demo instance and then navigating to `latest.datasette.io/_internal <https://latest.datasette.io/_internal>`__.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue