Changes by vlad
This commit is contained in:
parent
9918e7f5b5
commit
0aa3bdc336
Binary file not shown.
@ -1,30 +0,0 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %} Корзина {% endblock %}
|
||||
|
||||
{% block styles %}
|
||||
{% load static %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/catalog-style.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1> Ваша корзина </h1>
|
||||
{% if user %}
|
||||
{% if cart_objects %}
|
||||
{% for ojb in cart_objects %}
|
||||
{# 'item_count', 'prod', 'prod__prod_name', 'prod__prod_price', 'prod__prod_available', 'prod__prod_photo', 'prod__category__cat_name' #}
|
||||
<a class="product" href="/catalog/{{ obj.1 }}/" style="text-decoration: none">
|
||||
<img src="/static/images/{% if obj.5 %}no-photo.webp{% else %}products/{{ obj.5 }}{% endif %}" alt="photo">
|
||||
<div>
|
||||
<div> {{ ojb.0 }}шт </div>
|
||||
<div><strong> {{ ojb.2 }} </strong>₽</div>
|
||||
<div> {{ ojb.3 }} доступно </div>
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<h3 style="text-align: center">Корзина пуста!</h3>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
нужно войти...
|
||||
{% endif %}
|
||||
{% endblock %}
|
@ -1,45 +0,0 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %} Каталог {% endblock %}
|
||||
|
||||
{% block styles %}
|
||||
{% load static %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/catalog-style.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
Каталог
|
||||
{% if cat_name %}
|
||||
/ {{ cat_name }}
|
||||
{% endif %}
|
||||
</h1>
|
||||
<div class="catalog-container">
|
||||
<div class="catalog-categories">
|
||||
<h4 style="text-align: center">Категории</h4>
|
||||
<ul>
|
||||
<li><a href="{% url 'catalog' %}">Все категории</a></li>
|
||||
{% for c in categories %}
|
||||
<li><a href="{% url 'catalog' %}?cat={{ c.id }}">{{ c.cat_name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% if products %}
|
||||
<div class="catalog-products">
|
||||
{% for p in products %}
|
||||
<a class="product" href="{% url 'product_view' p.id %}" style="text-decoration: none">
|
||||
<img src="{{ p.get_photo_url }}" alt="photo">
|
||||
<div>
|
||||
<div> {{ p.prod_name }} </div>
|
||||
<div><strong> {{ p.prod_price }} </strong>₽</div>
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div style="display: flex; flex-wrap: wrap; align-content: center; flex-grow: 1;">
|
||||
<h3 style="text-align: center; width: 100%">Упс, тут нет доступных товаров...</h3>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@ -1,26 +0,0 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %} Каталог {% endblock %}
|
||||
|
||||
{% block styles %}
|
||||
{% load static %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/product-view-style.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1> {{ product.prod_name }} </h1>
|
||||
{% if product %}
|
||||
<div class="product-container">
|
||||
<div id="product-photo-container">
|
||||
<img id="product-photo" src="{{ product.get_photo_url }}" alt="photo">
|
||||
</div>
|
||||
<div>
|
||||
<h3>Цена: <span id="price-banner">{{ product.prod_price }}</span></h3>
|
||||
<p id="product-description">{{ product.prod_description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div style="display: flex; flex-wrap: wrap; align-content: center; flex-grow: 1;">
|
||||
<h3 style="text-align: center; width: 100%">Упс, товар не найден...</h3>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
20
templates/registration/register.html
Normal file
20
templates/registration/register.html
Normal file
@ -0,0 +1,20 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %} Аккаунт | регистрация {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class=deprecated-page-header"> Ваш аккаунт </h1>
|
||||
<h3>Регистрация</h3>
|
||||
<form action="" method="POST">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
<tbody>
|
||||
{{ form.as_table }}
|
||||
</tbody>
|
||||
</table>
|
||||
<button type="submit">Регистрация</button>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
Уже зарегистрированы? <a href="{% url 'login' %}">Вход</a>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user