{% extends "base.html" %} {% import "_icons.html" as icon %} {% block title %}{{ app.name }} ยท pepa{% endblock %} {% macro file_card(app_name, place) %}

{{ place.label }}

{{ "{:,}".format(place.total) }}{% if place.capped %}+{% endif %} item{% if place.total != 1 %}s{% endif %}

{{ place.path }}

{% if place.deep %}

Including sub-folders

{% endif %} {% if place.rows %} {% else %}

{% if place.exists %}Empty{% else %}Not there yet{% endif %}

{% endif %} {% if place.exists or place.takes_copies %}
{% if place.exists %}Show all{% endif %} {% if place.takes_copies %}
{% endif %} {% if place.exists %}
{% endif %}
{% endif %}
{% if place.takes_copies %}

Write a file into {{ place.label | lower }}

{% endif %} {% endmacro %} {% block content %} {% set assigned = key_sources | selectattr("key") | map(attribute="key") | unique | list %} {% set from_environment = key_sources | selectattr("environment") | list %}

{{ app.name }}

{{ app.blurb }}

{% if key_sources %} {% if from_environment %}Key: from this computer's environment{% elif assigned %}Key: {{ assigned | join(", ") }}, saved on Models{% else %}No key chosen{% endif %} {% endif %} {% if has_guide %}How it works{% endif %}
{% for path in paths %} {% if settings %}

Settings

{% for field in settings %} {% include "_setting.html" %} {% endfor %}
{% endif %} {% set running = namespace(found=False) %} {% for command in app.commands %}{% if latest[command.name] and latest[command.name].status == "running" %}{% set running.found = True %}{% endif %}{% endfor %}
More: commands
{% for command in app.commands %} {% set job = latest[command.name] %}
{{ command.name }} {{ command.help }} {% if command.kind in ["terminal", "service"] %}Opens its own window{% endif %} {{ icon.chevron() }}
{% if command.kind in ["terminal", "service"] %} {% if installed %}{{ app.name }} {{ command.name }}{% else %}cd "{{ app.path }}"; python manage.py {{ command.name }}{% endif %} {% else %}
{% set entries = command.fields | rejectattr("type", "equalto", "bool") | list %} {% set switches = command.fields | selectattr("type", "equalto", "bool") | list %} {% if entries %}
{% for field in entries %} {% set required = not field.name.startswith("-") %} {% endfor %}
{% endif %} {% for field in switches %} {% endfor %}
{% if job %}{% with run = job, log_url = url_for('console.job_log', job_id=job.id) %}{% include "_run.html" %}{% endwith %}{% endif %}
{% endif %}
{% endfor %}

Files

{{ icon.folder() }}Change folders
{% for place in places %}{{ file_card(app.name, place) }}{% endfor %}
{% endblock %}