{# app/templates/platform/tenants.html #} {% extends "base.html" %} {% block title %}Tenants{% endblock %} {% block header %}Platform • Tenants{% endblock %} {% block content %}
Tenants
Manage tenant registry (platform database)
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, msg in messages %} {% endfor %} {% endif %} {% endwith %}
Logo
Tenant
Dates
Status
Actions
{% if tenants %} {% for t in tenants %} {% set start_txt = (t.start_date.strftime("%Y-%m-%d") if t.start_date else "—") %} {% set end_txt = (t.end_date.strftime("%Y-%m-%d") if t.end_date else "—") %} {% set domain = (config.get("BASE_DOMAIN","") or "") %} {% set full_host = (t.slug ~ "." ~ domain) if domain else t.slug %}
{% if t.logo %} Logo {% else %}
{{ (t.name[:1] if t.name else 'T')|upper }}
{% endif %}
{{ t.name }}
{{ t.slug }}
{% if t.is_active %} Active {% else %} Inactive {% endif %} {% if t.end_date %} {% if t.is_expired %} Expired {% else %} Valid {% endif %} {% else %} No expiry {% endif %}
{{ t.db_uri }}
Created: {% if t.created_at %}{{ t.created_at.strftime("%Y-%m-%d %H:%M") }}{% else %}—{% endif %} {% if t.logo %} {{ t.logo }} {% endif %}
Start
{{ start_txt }}
End
{{ end_txt }}
Quick actions
{% if t.end_date and t.is_expired %}
Expired — extend to re-enable access.
{% endif %}
Edit
{% endfor %} {% else %}
No tenants found. Click New Tenant to create one.
{% endif %}
{% endblock %}