view piecrust/admin/templates/dashboard.html @ 1188:a7c43131d871

bake: Fix file write flushing problem with Python 3.8+ Writing the cache files fails in Python 3.8 because it looks like flushing behaviour has changed. We need to explicitly flush. And even then, in very rare occurrences, it looks like it can still run into racing conditions, so we do a very hacky and ugly "retry" loop when fetching cached data :(
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 15 Jun 2021 22:36:23 -0700
parents dff873f11541
children
line wrap: on
line source

{% extends 'layouts/default.html' %}

{% block content %}
<div class="row">
    <div class="col-md-12">
        <h1>{{site_title}} <a href="{{url_preview}}"><span class="oi oi-arrow-right"></span></a></h1>
    </div>
</div>
{% with messages = get_flashed_messages() %}
{% if messages %}
<div class="row">
{% for message in messages %}
<p class="bg-info">{{message}}</p>
{% endfor %}
</div>
{% endif %}
{% endwith %}
<div class="row">
    <div class="col-md-6">
        <h2><span class="oi oi-bar-chart"></span> Site Summary</h2>
        {% for s in sources %}
        <div class="ft-summary-source">
            <p><a href="{{s.list_url}}">{{s.page_count}} {{s.name}}</a></p>
        </div>
        {% endfor %}

        <h2><span class="oi oi-wrench"></span> Site Management</h2>
        <form action="{{url_bake_assets}}" method="POST">
            <button type="submit" class="btn"><span class="oi oi-loop"></span> Rebake Preview Assets</button>
        </form>
    </div>
    <div class="col-md-6">
        <h2><span class="oi oi-beaker"></span> Work in Progress</h2>
        {% if new_pages %}
        <p>New pages:</p>
        <ul>
            {% for p in new_pages %}
            <li><a href="{{p.url}}">{{p.title}}</a><br/>
                {%if p.text%}<pre>{{p.text}}</pre>{%endif%}</li>
            {% endfor %}
        </ul>
        {% endif %}
        {% if edited_pages %}
        <p>Edited pages:</p>
        <ul>
            {% for p in edited_pages %}
            <li><a href="{{p.url}}">{{p.title}}</a><br/>
                {%if p.text%}<pre>{{p.text}}</pre>{%endif%}</li>
            {% endfor %}
        </ul>
        {% endif %}
        {% if not new_pages and not edited_pages %}
        <p>No work in progress.</p>
        {% endif %}
        {% if misc_files %}
        <div class="ft-dash-misc">
        <p>Miscellaneous new/edited files:</p>
        <ul>
            {% for p in misc_files %}
            <li>{{p}}</li>
            {% endfor %}
        </ul>
        </div>
        {% endif %}

    </div>
</div>
{% endblock %}