Initial commit

This commit is contained in:
2022-09-15 22:25:55 +03:00
commit 7582330b1b
70 changed files with 1094 additions and 0 deletions

30
templates/cart.html Normal file
View File

@@ -0,0 +1,30 @@
{% 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 %}