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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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