Add admin panel, cart, checkout, and digital key delivery

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
orohi
2026-07-25 05:32:05 +03:00
co-authored by Cursor
parent 08cc4b0f1b
commit 54eaff4c70
32 changed files with 1982 additions and 105 deletions
+44
View File
@@ -0,0 +1,44 @@
{% extends "admin/base.html" %}
{% block title %}Ключи — {{ product.title }}{% endblock %}
{% block content %}
<div class="section-head">
<h2>Ключи: {{ product.title }}</h2>
<p>Свободно: {{ stock }} шт.</p>
</div>
{% if message %}
<p class="flash ok">{{ message }}</p>
{% endif %}
<form method="post" class="stack-form">
<label>
Добавить ключи (по одному на строку)
<textarea name="codes" rows="8" required placeholder="XXXX-YYYY-ZZZZ"></textarea>
</label>
<button class="btn btn-primary" type="submit">Загрузить</button>
</form>
<div class="table-wrap" style="margin-top: 2rem">
<table class="data-table">
<thead>
<tr>
<th>Код</th>
<th>Статус</th>
<th>Order</th>
</tr>
</thead>
<tbody>
{% for key in keys %}
<tr>
<td><code>{{ key.code }}</code></td>
<td>{% if key.is_sold %}sold{% else %}free{% endif %}</td>
<td>{% if key.order_id %}#{{ key.order_id }}{% else %}—{% endif %}</td>
</tr>
{% else %}
<tr><td colspan="3">Ключей пока нет</td></tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}