mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
I'm using click, and click recommends using a setup.py - so I've added one of those. I also refactored code into a new datasite package. It's not quite deploying to now properly at the moment though - I seem to have messed up the path handling a bit. Also snuck in a new template for the "Row" view. Refs #40
13 lines
No EOL
688 B
HTML
13 lines
No EOL
688 B
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Databases{% endblock %}
|
|
|
|
{% block content %}
|
|
<h1>Database{% if databases|length != 1 %}s{% endif %}</h1>
|
|
{% for database in databases %}
|
|
<h2><a href="{{ database.path }}">{{ database.name }}</a></h2>
|
|
<p>{{ "{:,}".format(database.total_rows) }} rows in {{ database.tables_count }} table{% if database.tables_count != 1 %}s{% endif %}</p>
|
|
<p>{% for table, count in database.tables_truncated %}<a href="{{ database.path }}/{{ table }}" title="{{ count }} rows">{{ table }}</a>{% if not loop.last %}, {% endif %}{% endfor %}{% if database.tables_more %}, <a href="{{ database.path }}">...</a>{% endif %}</p>
|
|
{% endfor %}
|
|
|
|
{% endblock %} |