{% extends "layouts/base.html" %} {% block title %}Admin Panel{% endblock %} {% block page_title %}Admin Panel{% endblock %} {% block content %}

{{ stats.total_users }}

Total Users

{{ stats.total_players }}

Players

{{ stats.total_org_teams }}

Org Teams

{{ stats.active_tryouts }}

Active Tryouts

{{ stats.upcoming_tryouts }}

Upcoming

Tryouts Access

Status: {% if settings.tryouts_open %}OPEN{% else %}CLOSED{% endif %}

{% if settings.tryouts_open %} Coaches and managers can create and modify tryouts. {% else %} Only admins can create or modify tryouts. Coaches and managers are locked out. {% endif %}

Season Management

Season: {% if settings.season_active %}ACTIVE{% else %}INACTIVE{% endif %}

Name: {{ settings.season_name }}

Start: {{ settings.season_start }}

End: {{ settings.season_end }}

{% if not settings.season_active %}
{% else %}
{% endif %}

Wipe Teams for New Season

This removes all players from organization teams and deletes all regular-season matches. Team structures, coaches, and managers are preserved. A safety backup is created automatically.

Manual Backup

Creates a full PostgreSQL database dump (.sql file). Stored on the server.

Backup History & Restore

{% if backups %}
{% for b in backups %} {% endfor %}
Date Filename Size Type Actions
{{ b.created_at.strftime('%Y-%m-%d %H:%M') if b.created_at else '—' }} {{ b.filename }} {{ (b.size_bytes / 1024)|round(1) }} KB {{ b.backup_type }}
{% else %}

No backups yet. Create your first backup above.

{% endif %}

Audit Log (Recent)

{% if audit_logs %}
{% for entry in audit_logs %} {% endfor %}
Date User Action Details IP
{{ entry.created_at.strftime('%Y-%m-%d %H:%M') if entry.created_at else '—' }} {{ entry.user.username if entry.user else 'System' }} {{ entry.action }} {{ entry.details or '—' }} {{ entry.ip_address or '—' }}
{% else %}

No audit log entries yet.

{% endif %}
{% endblock %} {% block scripts %} {% endblock %}