Skip to main content

Show a specific Datasette table on the homepage

Project description

datasette-homepage-table

PyPI Changelog Tests License

Show a specific Datasette table on the homepage

Installation

Install this plugin in the same environment as Datasette.

datasette install datasette-homepage-table

Usage

This plugin changes the Datasette homepage to display a table instead of the default list of databases.

Without configuration, it will take the first table in the first attached database.

Alternatively you can configure it like this:

{
    "plugins": {
        "datasette-homepage-table": {
            "database": "mydatabase",
            "table": "mytable"
        }
    }
}

Both keys are optional: if you omit database it will use the first attached database, and if you omit table it will use the first table in the database.

You can customize the table.html template to change the appearance of the table.

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-homepage-table
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datasette-homepage-table-0.2.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

datasette_homepage_table-0.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file datasette-homepage-table-0.2.tar.gz.

File metadata

File hashes

Hashes for datasette-homepage-table-0.2.tar.gz
Algorithm Hash digest
SHA256 7a5b67e86f5cb73095d1f1125e2fc7d4bb4db6461427af9f6e00649990f5dd25
MD5 29d71c7138ffadf940ba7517064ca884
BLAKE2b-256 d3e73682a3abd0a77554bac52398705ab5be9222c8f5faa60d2d914d4cf86e33

See more details on using hashes here.

File details

Details for the file datasette_homepage_table-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for datasette_homepage_table-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 97adcbf4265ad3f171487183d71605ef3e36d206710c52867dedac8bf9135071
MD5 52da0311af7175c5581b5fe93d9626b3
BLAKE2b-256 5258d2b08cd8076274369ec4ab5d100de9f1307931d3ae387e3b2377b64b8946

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page