Admin: per-user activity file (logins, logouts, orders) with CSV export

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 12:17:11 +03:30
parent dbf0ff52d2
commit bda415e579
4 changed files with 143 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
{% extends "admin/base_site.html" %}
{% block content %}
<div dir="rtl">
<h1>پرونده‌ی کاربر {{ public_id }} — {{ target.phone|default:"بدون شماره" }}</h1>
<p>{{ target.name|default:"بی‌نام" }} · {{ rows|length }} رویداد · زمان‌ها به وقتِ تهران
· <a href="?format=csv">خروجی CSV (اکسل)</a></p>
<table>
<thead><tr>{% for c in columns %}<th>{{ c }}</th>{% endfor %}</tr></thead>
<tbody>
{% for r in rows %}
<tr><td dir="ltr">{{ r.at_local }}</td><td>{{ r.kind }}</td><td>{{ r.detail }}</td><td>{{ r.amount }}</td><td dir="ltr">{{ r.ip }}</td></tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}