first commit

main
R-Murod 2024-01-17 15:20:11 +06:00
parent e4094cbbc3
commit e7f2b2d161
8 changed files with 81 additions and 82 deletions

View File

@ -129,6 +129,8 @@ STATIC_URL = '/static/'
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
#python -Xutf8 manage.py dumpdata -o db.json
#python manage.py loaddata db.json
STATIC_URL = '/static/' STATIC_URL = '/static/'
STATIC_ROOT = BASE_DIR / 'static' STATIC_ROOT = BASE_DIR / 'static'
@ -149,12 +151,12 @@ MESSAGE_TAGS = {
PASSWORD_RESET_TIMEOUT_DAYS = 1 PASSWORD_RESET_TIMEOUT_DAYS = 1
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' # EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST= 'smtp.gmail.com' # EMAIL_HOST= 'smtp.gmail.com'
EMAIL_USE_TLS = True # EMAIL_USE_TLS = True
EMAIL_PORT= 587 # EMAIL_PORT= 587
EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER') # EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER')
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD') # EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD')
# AWS_QUERYSTRING_AUTH = False # AWS_QUERYSTRING_AUTH = False

1
db.json Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -85,11 +85,11 @@
<div class="middel-top"> <div class="middel-top">
{% if user.id is None %} {% if user.id is None %}
<div class="left floatleft"> <div class="left floatleft">
<p style="color:#f4cca4"><b>Welcome Guest!</b></p> <p style="color:#f4cca4"><b>Добро пожаловать, гость!</b></p>
</div> </div>
{% else %} {% else %}
<div class="left floatleft"> <div class="left floatleft">
<p style="color:#f4cca4"><b>Welcome {{user.first_name | capfirst}}!</b></p> <p style="color:#f4cca4"><b>Добро пожаловать, {{user.first_name | capfirst}}!</b></p>
</div> </div>
{% endif %} {% endif %}
</div> </div>
@ -99,23 +99,23 @@
<a style="color:#f4cca4" href="#"><i class="mdi mdi-account"></i></a> <a style="color:#f4cca4" href="#"><i class="mdi mdi-account"></i></a>
{% if user.id is None %} {% if user.id is None %}
<ul style="background:#1c1427"> <ul style="background:#1c1427">
<li><a href="{% url 'accounts:login' %}">Login</a></li> <li><a href="{% url 'accounts:login' %}">Логин</a></li>
<li><a href="{% url 'accounts:register' %}">Registar</a></li> <li><a href="{% url 'accounts:register' %}">Регистрция</a></li>
</ul> </ul>
{% else %} {% else %}
<ul style="background:#1c1427"> <ul style="background:#1c1427">
<li><a href="{% url 'accounts:dashboard' %}">Dashboard</a></li> <li><a href="{% url 'accounts:dashboard' %}">Панель</a></li>
<li><a href="{% url 'accounts:logout' %}">Logout</a></li> <li><a href="{% url 'accounts:logout' %}">Выйти</a></li>
</ul> </ul>
{% endif %} {% endif %}
</li> </li>
<li> <li>
<a style="color:#f4cca4" href="#"><i class="mdi mdi-settings"></i></a> <a style="color:#f4cca4" href="#"><i class="mdi mdi-settings"></i></a>
<ul style="background:#1c1427"> <ul style="background:#1c1427">
<li><a href="my-account.html">My account</a></li> <li><a href="my-account.html">Аккаунт</a></li>
<li><a href="cart.html">My cart</a></li> <li><a href="cart.html">Корзина</a></li>
<li><a href="wishlist.html">My wishlist</a></li> <li><a href="wishlist.html">Избранные</a></li>
<li><a href="checkout.html">Check out</a></li> <li><a href="checkout.html">Проверить</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -138,8 +138,8 @@
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<form id="searchh" action={% url 'shop:search' %} method="GET"> <form id="searchh" action={% url 'shop:search' %} method="GET">
<input type="text" name="keyword" placeholder="Search..."> <input type="text" name="keyword" placeholder="Поиск...">
<button style="height:49px; margin-bottom:6px; background:#f4cca4;margin-left:-1px;border:None " class="btn btn-warning" type="submit"> <button style="height:49px; margin-bottom:4px; background:#f4cca4;margin-left:-1px;border:None " class="btn btn-warning" type="submit">
<i style="color:#d99879" class="fa fa-search"></i> <i style="color:#d99879" class="fa fa-search"></i>
</button> </button>
</form> </form>
@ -151,8 +151,8 @@
<div class="row"> <div class="row">
<div class="col-sm-2"> <div class="col-sm-2">
<div class="logo"> <div class="logo">
<a style="color:#f4cca4;font-weight: 800;" href="\"><span <a style="color:#f4cca4;font-weight: 800;" href="{% url 'shop:shop' %}"><span
style="color:#d99879">E-</span>shop</a> style="color:#d99879">E-</span>Shop</a>
</div> </div>
</div> </div>
<div class="col-sm-8"> <div class="col-sm-8">
@ -160,19 +160,19 @@
<div class="mainmenu"> <div class="mainmenu">
<nav > <nav >
<ul> <ul>
<li ><a href="\">Home</a></li> {% comment %} <li ><a href="\">Главная</a></li> {% endcomment %}
<li><a href="{% url 'shop:shop' %}">Shop</a></li> <li><a href="{% url 'shop:shop' %}">Магазин</a></li>
<li><a href="#">Category <i class="mdi mdi-arrow-down"></i></a> {% comment %} <li><a href="#">Category <i class="mdi mdi-arrow-down"></i></a>
<ul class="dropdown"> <ul class="dropdown">
<li><a href="{% url 'shop:shop' %}">All</a></li> <li><a href="{% url 'shop:shop' %}">All</a></li>
{% for category in categories %} {% for category in categories %}
<li><a href="{{ category.get_category_slug_url }}">{{category.name}}</a></li> <li><a href="{{ category.get_category_slug_url }}">{{category.name}}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
</li> </li> {% endcomment %}
<li><a href="blog.html">Blog</a></li> {% comment %} <li><a href="blog.html">Blog</a></li> {% endcomment %}
<li><a href="about.html">About</a></li> <li><a href="about.html">О Нас</a></li>
<li><a href="contact.html">Contact</a></li> <li><a href="contact.html">Контакты</a></li>
</ul> </ul>
</nav> </nav>
</div> </div>
@ -181,19 +181,19 @@
<div class="mobile-menu"> <div class="mobile-menu">
<nav id="dropdown"> <nav id="dropdown">
<ul > <ul >
<li><a style="color:#1c1427" href="\">Home</a></li> {% comment %} <li><a style="color:#1c1427" href="\">Главная</a></li> {% endcomment %}
<li><a style="color:#1c1427" href="{% url 'shop:shop' %}">Shop</a></li> <li><a style="color:#1c1427" href="{% url 'shop:shop' %}">Магазин</a></li>
<li><a style="color:#1c1427" href="{% url 'shop:shop' %}">Category</a> {% comment %} <li><a style="color:#1c1427" href="{% url 'shop:shop' %}">Category</a>
<ul class="dropdown"> <ul class="dropdown">
<li><a style="color:#1c1427" href="{% url 'shop:shop' %}">All</a></li> <li><a style="color:#1c1427" href="{% url 'shop:shop' %}">All</a></li>
{% for category in categories %} {% for category in categories %}
<li><a style="color:#1c1427" href="{{ category.get_category_slug_url }}">{{category.name}}</a></li> <li><a style="color:#1c1427" href="{{ category.get_category_slug_url }}">{{category.name}}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
</li> </li> {% endcomment %}
<li><a style="color:#1c1427" href="blog.html">Blog</a></li> {% comment %} <li><a style="color:#1c1427" href="blog.html">Blog</a></li> {% endcomment %}
<li><a style="color:#1c1427" href="about.html">About</a></li> <li><a style="color:#1c1427" href="about.html">О Нас</a></li>
<li><a style="color:#1c1427" href="contact.html">Contact</a></li> <li><a style="color:#1c1427" href="contact.html">ConКонтактыtact</a></li>
</ul> </ul>
</nav> </nav>
</div> </div>
@ -205,7 +205,7 @@
<a class="cart-itme-a" href="{% url 'cart:cart' %}"> <a class="cart-itme-a" href="{% url 'cart:cart' %}">
<i class="mdi mdi-cart"></i> <i class="mdi mdi-cart"></i>
{{quantityyy}} items : <strong>${{totalll}}</strong> {{quantityyy}} штук : <strong>${{totalll}}</strong>
</a> </a>
<div class="cartdrop"> <div class="cartdrop">
{% for x in cart_itemsss %} {% for x in cart_itemsss %}
@ -222,8 +222,8 @@
<span>{{item.variation_category | capfirst}} : {{item.variation_value | capfirst}}</span> <span>{{item.variation_category | capfirst}} : {{item.variation_value | capfirst}}</span>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<span>Price for each : ${{x.product.price}}</span> <span>Цена за каждый : ${{x.product.price}}</span>
<span>Quantity : {{x.quantity}}</span> <span>Количество : {{x.quantity}}</span>
<strong>${{x.sub_total}}</strong> <strong>${{x.sub_total}}</strong>
</div> </div>
</div> </div>
@ -231,10 +231,10 @@
{% endfor %} {% endfor %}
<div class="total"> <div class="total">
<span>total <strong>= ${{totalll}}</strong></span> <span>Общий <strong>= ${{totalll}}</strong></span>
</div><br> </div><br>
{% if '/cart/' not in request.path %} {% if '/cart/' not in request.path %}
<a style="background:#40394a;color:#f4cca4" class="out-menu" href="{% url 'cart:cart' %}">Go To Cart</a> <a style="background:#40394a;color:#f4cca4;text-transform: lowercase;" class="out-menu" href="{% url 'cart:cart' %}">Перейти в корзину</a>
{% endif %} {% endif %}
</div> </div>
</div> </div>
@ -242,7 +242,6 @@
</div> </div>
</div> </div>
</header> </header>
<br>
<!--===================== Content ====================--> <!--===================== Content ====================-->
{% block content %} {% block content %}
@ -254,8 +253,8 @@
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-6"> <div class="col-xs-12 col-sm-6">
<p style="color:#d99879">Created By <span style="color:#f4cca4"><b>Omar Reda</b></span> 2021 & <p style="color:#d99879">Сделано <span style="color:#f4cca4"><b>Rakhmetov Murod</b></span> 2024 &
All Rights Reserved.</p> Все права защищены.</p>
</div> </div>
<div class="col-xs-12 col-sm-6 text-right"> <div class="col-xs-12 col-sm-6 text-right">
<a href="#"><img src="{% static 'img/footer/payment.png' %}" alt="" /></a> <a href="#"><img src="{% static 'img/footer/payment.png' %}" alt="" /></a>

View File

@ -2,16 +2,16 @@
{% load static %} {% load static %}
{% block title %}Cart{% endblock title %} {% block title %}Cart{% endblock title %}
{% block content %} {% block content %}
<div class="pages-title section-padding"> <style>
.section-padding{padding: 0px 0;}
.col-xs-12{padding-top: 20px;}
</style>
<div class="pages-title section-padding">
<div class="container"> <div class="container">
<div style="background:#40394a" class="row"> <div style="background:#40394a" class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="pages-title-text text-center"> <div class="pages-title-text text-center">
<h2 style="color:#f4cca4">Cart</h2> <h2 style="color:#f4cca4; margin: 0; margin-bottom: 17px;">Корзина</h2>
<ul class="text-left">
<li><a style="color:#d99879" href="\">Home </a></li>
<li style="color:#d99879"><span> // </span>Cart</li>
</ul>
</div> </div>
</div> </div>
</div> </div>

View File

@ -8,7 +8,7 @@
<!-- header section end --> <!-- header section end -->
<!-- slider-section-start --> <!-- slider-section-start -->
<div style="margin-top:50px;margin-bottom:50px" class=" container main-slider-one main-slider-two slider-area"> {% comment %} <div style="margin-top:50px;margin-bottom:50px" class=" container main-slider-one main-slider-two slider-area">
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel"> <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<div class=" carousel-inner"> <div class=" carousel-inner">
<div class="carousel-item active"> <div class="carousel-item active">
@ -16,11 +16,11 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div> {% endcomment %}
<br> <br>
<!-- slider section end --> <!-- slider section end -->
<!-- collection section start --> <!-- collection section start -->
<section style="background:#1c1427;" class="collection-area collection-area2 section-padding"> {% comment %} <section style="background:#1c1427;" class="collection-area collection-area2 section-padding">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-sm-4"> <div class="col-sm-4">
@ -51,10 +51,10 @@
</div> </div>
</div> </div>
</section> </section>
<br><br> <br><br> {% endcomment %}
<!-- collection section end --> <!-- collection section end -->
<!-- featured-products section start --> <!-- featured-products section start -->
<section class="single-products products-two section-padding extra-padding-bottom"> {% comment %} <section class="single-products products-two section-padding extra-padding-bottom">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
@ -150,10 +150,10 @@
<button id="load-more-one">Load More</button> <button id="load-more-one">Load More</button>
</div> </div>
</div> </div>
</section><br><br> </section><br><br> {% endcomment %}
<!-- featured-products section end --> <!-- featured-products section end -->
<!-- coming product section start --> <!-- coming product section start -->
<section style="background:#1c1427" class="coming-product coming-product2"> {% comment %} <section style="background:#1c1427" class="coming-product coming-product2">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-sm-4 col-md-2"> <div class="col-sm-4 col-md-2">
@ -244,7 +244,7 @@
</div> </div>
</div> </div>
</div> </div>
</section><br> </section><br> {% endcomment %}
<!-- coming product section end --> <!-- coming product section end -->
<!-- tab-products section start --> <!-- tab-products section start -->
<div class="tab-products single-products products-two section-padding extra-padding-top"> <div class="tab-products single-products products-two section-padding extra-padding-top">
@ -294,7 +294,7 @@
</div><br><br> </div><br><br>
<!-- tab-products section end --> <!-- tab-products section end -->
<!-- blog section start --> <!-- blog section start -->
<section style="background:#1c1427" class="latest-blog section-padding"> {% comment %} <section style="background:#1c1427" class="latest-blog section-padding">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
@ -401,7 +401,7 @@
<button id="load-more-blog">Load More</button> <button id="load-more-blog">Load More</button>
</div> </div>
</div> </div>
</section> </section> {% endcomment %}
<!-- blog section end --> <!-- blog section end -->
<!-- quick view start --> <!-- quick view start -->
<div class="product-details quick-view modal animated zoomInUp" id="quick-view"> <div class="product-details quick-view modal animated zoomInUp" id="quick-view">

View File

@ -2,20 +2,22 @@
{% load static %} {% load static %}
{% block title %}{{single_product.name}}{% endblock %} {% block title %}{{single_product.name}}{% endblock %}
{% block content %} {% block content %}
<style>
.pages-title-text h2{margin-bottom: 0;}
</style>
<div style="background:#40394a" class="pages-title section-padding"> <div style="background:#40394a" class="pages-title section-padding">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="pages-title-text text-center"> <div class="pages-title-text text-center">
<h2 style="color:#f4cca4">{{single_product.name}}</h2> <h2 style="color:#f4cca4">{{single_product.name}}</h2>
<ul class="text-left"> {% comment %} <ul class="text-left">
<li><a style="color:#d99879" href="\">Home </a></li> <li><a style="color:#d99879" href="\">Home </a></li>
<li style="color:#d99879"><span> // </span><a style="color:#d99879" <li style="color:#d99879"><span> // </span><a style="color:#d99879"
href="{% url 'shop:shop' %}">shop </a></li> href="{% url 'shop:shop' %}">shop </a></li>
<li style="color:#d99879"><span> // </span>{{single_product.category}}</li> <li style="color:#d99879"><span> // </span>{{single_product.category}}</li>
<li style="color:#d99879"><span> // </span>{{single_product.name}}</li> <li style="color:#d99879"><span> // </span>{{single_product.name}}</li>
</ul> </ul> {% endcomment %}
</div> </div>
</div> </div>
</div> </div>
@ -58,7 +60,7 @@
<div class="quick-right"> <div class="quick-right">
<div style="border-radius:10px;" class="list-text"> <div style="border-radius:10px;" class="list-text">
<h3 style="color:#d99879">{{single_product.name}}</h3> <h3 style="color:#d99879">{{single_product.name}}</h3>
<h5>{% if single_product.discount != 0.00 %}<del>${{single_product.discount}}</del>{% endif %} <h5>{% if single_product.discount != 0.00 %}<del>{{single_product.discount}}tg</del>{% endif %}
<div class="ratting floatright"> <div class="ratting floatright">
<p style="font-size:1.5rem">( {{single_product.countReview}} Rating )</p> <p style="font-size:1.5rem">( {{single_product.countReview}} Rating )</p>
<div style="float:right; font-size:1.5rem" class="rating-star"> <div style="float:right; font-size:1.5rem" class="rating-star">
@ -72,7 +74,7 @@
</span> </span>
</div> </div>
</div> </div>
${{single_product.price}}</h5> {{single_product.price}}tg</h5>
<p>{{single_product.description}}.</p> <p>{{single_product.description}}.</p>
<form action="{% url 'cart:add_cart' single_product.id %}" method="POST"> <form action="{% url 'cart:add_cart' single_product.id %}" method="POST">

View File

@ -1,32 +1,27 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %} {% load static %}
{% block title %}Shop{% endblock %} {% block title %}Магазин{% endblock %}
{% block content %} {% block content %}
<style>
.section-padding{padding:10px 0;}
</style>
<!-- header section end --> <!-- header section end -->
<!-- pages-title-start --> <!-- pages-title-start -->
<div style="background:#40394a" class="pages-title section-padding"> <div style="background:#40394a;" class="pages-title section-padding">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="pages-title-text text-center"> <div class="pages-title-text text-center">
{% if category_slug != None %} {% if category_slug != None %}
<h2 style="color:#f4cca4;text-transform: capitalize;">{{category_slug}}</h2> <h2 style="color:#f4cca4;text-transform: capitalize; margin: 0; margin-bottom: 17px;">{{category_slug}}</h2>
{% else %} {% else %}
<h2 style="color:#f4cca4;text-transform: capitalize;">All Products</h2> <h2 style="color:#f4cca4;text-transform: capitalize; margin: 0; margin-bottom: 17px;">Магазин</h2>
{% endif %} {% endif %}
<ul class="text-left">
<li ><a href="\">Home </a></li>
<li style="color:#f4cca4"><span> // </span>Shop</li>
{% if category_slug != None %}
<li style="color:#f4cca4"><span> // </span>{{category_slug}}</li>
{% endif %}
</ul>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<br>
<!-- pages-title-end --> <!-- pages-title-end -->
<!-- collection section start --> <!-- collection section start -->
@ -39,11 +34,11 @@
<div class="sidebar left-sidebar"> <div class="sidebar left-sidebar">
<div style="background:#40394a; color:#d99879;;border-radius:20px 20px 0 0;" class="s-side-text"> <div style="background:#40394a; color:#d99879;;border-radius:20px 20px 0 0;" class="s-side-text">
<div class="sidebar-title clearfix text-center"> <div class="sidebar-title clearfix text-center">
<h3 >Categories</h3> <h3 >Категории</h3>
</div> </div>
<div class="sidebar-title clearfix"> <div class="sidebar-title clearfix">
<h4 class="floatleft"><a style="font-weight:600;color:#f4cca4" href="{% url 'shop:shop' %}">All</a></h4> <h4 class="floatleft"><a style="font-weight:600;color:#f4cca4" href="{% url 'shop:shop' %}">Все</a></h4>
</div> </div>
{% for category in categories %} {% for category in categories %}
<div class="sidebar-title clearfix"> <div class="sidebar-title clearfix">
@ -67,7 +62,7 @@
</ul> </ul>
</li> </li>
<li style="color:#d99879; font-size:18px" class="sort-by floatright"> <li style="color:#d99879; font-size:18px" class="sort-by floatright">
{{products_count}} Results {{products_count}} Результаты
</li> </li>
</ul> </ul>
</div> </div>
@ -82,12 +77,12 @@
<div class="product-img"> <div class="product-img">
{% if product.discount != 0.00 %} {% if product.discount != 0.00 %}
<div class="pro-type"> <div class="pro-type">
<span>Discount</span> <span>Скидка</span>
</div> </div>
{% endif %} {% endif %}
{% if product.new %} {% if product.new %}
<div style="background:#1c1427;color:#f4cca4" class="pro-type"> <div style="background:#1c1427;color:#f4cca4" class="pro-type">
<span>New</span> <span>Новый</span>
</div> </div>
{% endif %} {% endif %}
<a href="{{product.get_prodcut_details_url}}"><img style="width:100%; height:350px;;border-radius:15px 15px 0 0;" src="{{product.image.url}}" alt="Product Title" /></a> <a href="{{product.get_prodcut_details_url}}"><img style="width:100%; height:350px;;border-radius:15px 15px 0 0;" src="{{product.image.url}}" alt="Product Title" /></a>
@ -151,8 +146,8 @@
<p>{{product.description}}.</p> <p>{{product.description}}.</p>
<div class="list-btn"> <div class="list-btn">
<a href="{{product.get_prodcut_details_url}}" class="btn btn-warning" style="background:none; color:#f4cca4">View Details <i class="mdi mdi-eye"></i></a> <a href="{{product.get_prodcut_details_url}}" class="btn btn-warning" style="background:none; color:#f4cca4">Посмотреть детали<i class="mdi mdi-eye"></i></a>
<a href="{% url 'cart:add_cart' product.id %}" class="btn " style="color:#1c1427;background:#f4cca4">add to cart <i class="mdi mdi-cart-outline"></i></a> <a href="{% url 'cart:add_cart' product.id %}" class="btn " style="color:#1c1427;background:#f4cca4">Добавить в корзину<i class="mdi mdi-cart-outline"></i></a>
</div> </div>
</div> </div>