feat: MVP-скелет площадки (Django + MySQL/SQLite, модели по ТЗ §4, базовые страницы)

This commit is contained in:
apuc committed 2026-09-23 16:47:57 +03:00
1 parent e5f312a00f
commit 8218a568ce
67 files changed
+1929

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
<article class="card">
<a href="{% url 'catalog:product_detail' p.slug %}">
<h3>{{ p.name }}</h3>
<p class="price">{{ p.price }} ₽</p>
<p class="brand">{{ p.brand.name }}</p>
</a>
</article>
+16
View File
@@ -0,0 +1,16 @@
{% extends 'base.html' %}
{% block title %}{{ brand.name }}{% endblock %}
{% block content %}
<h1>{{ brand.name }}</h1>
<p>{{ brand.region }}{% if brand.city %} · {{ brand.city }}{% endif %}</p>
<p>{{ brand.story }}</p>
<h2>Товары</h2>
<div class="grid">
{% for p in products %}
{% include 'catalog/_product_card.html' %}
{% empty %}
<p>У бренда пока нет товаров.</p>
{% endfor %}
</div>
{% endblock %}
+24
View File
@@ -0,0 +1,24 @@
{% extends 'base.html' %}
{% block title %}Каталог{% endblock %}
{% block content %}
<h1>Каталог</h1>
<form class="filters" method="get">
<input type="search" name="q" value="{{ q }}" placeholder="Поиск по названию...">
<select name="category">
<option value="">Все категории</option>
{% for c in categories %}
<option value="{{ c.slug }}" {% if current_category == c %}selected{% endif %}>{{ c.name }}</option>
{% endfor %}
</select>
<button class="btn" type="submit">Применить</button>
</form>
<div class="grid">
{% for p in products %}
{% include 'catalog/_product_card.html' %}
{% empty %}
<p>Ничего не найдено.</p>
{% endfor %}
</div>
{% endblock %}
+28
View File
@@ -0,0 +1,28 @@
{% extends 'base.html' %}
{% block title %}Создано молодыми — площадка молодых предпринимателей{% endblock %}
{% block content %}
<section class="hero">
<h1>Покупайте у своих</h1>
<p>Товары и услуги молодых предпринимателей вашего региона.</p>
<a class="btn" href="{% url 'catalog:catalog' %}">Перейти в каталог</a>
</section>
{% if banners %}
<section class="banners">
{% for b in banners %}
<a class="banner" href="{{ b.url|default:'#' }}">{{ b.title }}</a>
{% endfor %}
</section>
{% endif %}
<section class="products">
<h2>Новинки</h2>
<div class="grid">
{% for p in products %}
{% include 'catalog/_product_card.html' %}
{% empty %}
<p>Пока нет товаров.</p>
{% endfor %}
</div>
</section>
{% endblock %}
+18
View File
@@ -0,0 +1,18 @@
{% extends 'base.html' %}
{% block title %}{{ product.name }}{% endblock %}
{% block content %}
<nav class="breadcrumbs">
<a href="{% url 'catalog:catalog' %}">Каталог</a> / {{ product.name }}
</nav>
<article class="product">
<h1>{{ product.name }}</h1>
<p class="price">{{ product.price }} ₽</p>
<p>Бренд:
<a href="{% url 'catalog:brand_detail' product.brand.slug %}">{{ product.brand.name }}</a>
</p>
<p>{{ product.description }}</p>
<p>Остаток: {{ product.stock }}</p>
<button class="btn" type="button" data-add-to-cart="{{ product.pk }}">В корзину</button>
</article>
{% endblock %}