diff options
author | B. Stack <bgstack15@gmail.com> | 2022-02-13 21:47:21 -0500 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-02-13 21:54:20 -0500 |
commit | 85df4b3dc87003ae738f2676a99b88a83f3ac05a (patch) | |
tree | 15b892a06b81451d83f73cf0f8822c9bf262c4af /templates/admin.html | |
parent | add redirects after delete, and simplify css calls (diff) | |
download | stackbin-85df4b3dc87003ae738f2676a99b88a83f3ac05a.tar.gz stackbin-85df4b3dc87003ae738f2676a99b88a83f3ac05a.tar.bz2 stackbin-85df4b3dc87003ae738f2676a99b88a83f3ac05a.zip |
add expiry, and wsgi usage to support that
The flask dev server seems incapable of using the @timer
decorator, so we need the whole wsgi implementation, for
which I've added a script.
Arbitrary expiration options are available in the config
file.
Diffstat (limited to 'templates/admin.html')
-rw-r--r-- | templates/admin.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/templates/admin.html b/templates/admin.html index a815fb5..4991d7c 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -4,13 +4,15 @@ <h1>Administration for {{ appname }}</h1> {% if pastes %} <table> -<tr><th>id</th><th>private</th><th>title</th><th>user</th><th>parent</th><th>children</th><th>Actions</th></tr> +<tr>{#<th>id</th>#}<th>private</th><th>title</th><th>user</th><th>published</th><th>expires</th><th>parent</th><th>children</th><th>Actions</th></tr> {% for p in pastes %} <tr> -<td>{{ p.id }}</td> +{# <td>{{ p.id }}</td> #} <td>{% if p.private %}✓{% endif %}</td>{# magic string is from utf8icons.com #} <td><a href="{% if not p.private %}{{ url_for('show_paste', paste_id=p.id) }}{% else %}{{ url_for('show_paste', paste_id=p.id, s=p.private) }}{% endif %}">{{ p.title }}</a></td> <td>{% if p.user %}{{ p.user }}{% endif%}</td> +<td>{{ p.pub_date.strftime('%FT%TZ') }}</td> +<td>{% if p.exp_date != p.pub_date %}{{ p.exp_date.strftime('%FT%TZ') }}{% endif %}</td> <td>{% if p.parent[0] %}<a href="{{ url_for('show_paste', paste_id=p.parent[0]) }}">{{ p.parent[1] }}</a>{% endif %}</td> <td>{% if p.children %}{% for c in p.children %}{% if not loop.first %},{% endif %} <a href="{{ url_for('show_paste', paste_id=c[0]) }}">{{ c[1] }}</a>{% endfor %}{% endif %} |