remotes/origin/artem
Gena 11 years ago
parent ee8cbef930
commit ef493a26a7
  1. 1
      .gitignore
  2. 4
      batiskaf/settings.py
  3. 504
      batiskaf/templates/jinja2/base.jinja
  4. 127
      batiskaf/templates/jinja2/cart_detail.jinja
  5. 204
      batiskaf/templates/jinja2/category.jinja
  6. 68
      batiskaf/templates/jinja2/includes/category_filter.jinja
  7. 466
      batiskaf/templates/jinja2/index.jinja
  8. 81
      batiskaf/templates/jinja2/product.jinja
  9. 16
      batiskaf/urls.py
  10. 2
      batiskaf/wsgi.py
  11. 278
      static/less/_.less
  12. BIN
      static/photo_uploads/6795336.5n58bodtpi.jpg
  13. BIN
      static/photo_uploads/6795336.5n58bodtpi.jpg.398x398_q85_crop-upscale.jpg
  14. BIN
      static/photo_uploads/6795336.5n58bodtpi.jpg.80x80_q85_crop-upscale.jpg
  15. BIN
      static/photo_uploads/XuAB9RCUbgA.jpg
  16. BIN
      static/photo_uploads/XuAB9RCUbgA.jpg.398x398_q85_crop-upscale.jpg
  17. BIN
      static/photo_uploads/XuAB9RCUbgA.jpg.420x420_q85_crop-upscale.jpg
  18. BIN
      static/photo_uploads/XuAB9RCUbgA.jpg.80x80_q85_crop-upscale.jpg
  19. 4
      store/admin.py
  20. 51
      store/migrations/0010_auto_20150602_0842.py
  21. 36
      store/models.py
  22. 1
      store/urls.py
  23. 8
      store/views.py
  24. 22
      uwsgi.ini

1
.gitignore vendored

@ -1,7 +1,6 @@
*.pyc
*.pyo
.idea
.idea/workspace.xml
*.sublime-project
*.sublime-workspace
*.db

@ -65,7 +65,6 @@ MIDDLEWARE_CLASSES = (
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
ROOT_URLCONF = 'batiskaf.urls'
WSGI_APPLICATION = 'batiskaf.wsgi.application'
@ -95,7 +94,7 @@ else:
'PORT': '5432',
}
}
#admin user hOilk5Ewd9Om4bYpt1At
# admin user hOilk5Ewd9Om4bYpt1At
# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/
@ -154,7 +153,6 @@ TEMPLATES = [
},
]
BOOTSTRAP3 = {
# The complete URL to the Bootstrap CSS file (None means derive it from

@ -1,306 +1,328 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>{% block title %}Батискаф{% endblock %}</title>
<meta name="description" content="{% block meta_description %}{% endblock %}">
<meta name="author" content="Sitio">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>{% block title %}Батискаф{% endblock %}</title>
<meta name="description" content="{% block meta_description %}{% endblock %}">
<meta name="author" content="Sitio">
<!-- Bootstrap -->
<!-- Bootstrap -->
<link href="/static/bower_components/Bootflat/css/bootstrap.min.css" rel="stylesheet">
<link href="/static/bower_components/Bootflat/bootflat/css/bootflat.min.css" rel="stylesheet">
<link href="/static/less/_.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/static/bower_components/sweetalert/lib/sweet-alert.css">
<link href="/static/js/icheck/skins/square/blue.css" rel="stylesheet">
{% block stylesheet %}{% endblock stylesheet %}
<link href="/static/bower_components/Bootflat/css/bootstrap.min.css" rel="stylesheet">
<link href="/static/bower_components/Bootflat/bootflat/css/bootflat.min.css" rel="stylesheet">
<link href="/static/less/_.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/static/bower_components/sweetalert/lib/sweet-alert.css">
<link href="/static/js/icheck/skins/square/blue.css" rel="stylesheet">
{% block stylesheet %}{% endblock stylesheet %}
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container-fluid header-top">
<div class="container">
</head>
<body>
<div class="container-fluid header-top">
<div class="container">
<div class="top-left-links"><a href="#">Оплата</a> | <a href="#">Доставка</a> | <a href="#">Помощь</a> | <a href="#">Контакты</a></div>
<div class="top-right-links">В Усть-Каменогорске: <span class="yellow">+7 (812) 921-78-12</span> | В Алматы: <span class="yellow">8-800-555-78-12</span> |
<a href="#">Написать нам</a> | <a href="#"><img src="/static/img/skype.png" alt="" width="20" height="20"/></a>
</div>
<div class="top-left-links"><a href="#">Оплата</a> | <a href="#">Доставка</a> | <a href="#">Помощь</a> | <a
href="#">Контакты</a></div>
<div class="top-right-links">В Усть-Каменогорске: <span class="yellow">+7 (812) 921-78-12</span> | В Алматы:
<span class="yellow">8-800-555-78-12</span> |
<a href="#">Написать нам</a> | <a href="#"><img src="/static/img/skype.png" alt="" width="20" height="20"/></a>
</div>
</div>
<div class="container-fluid header-middle">
<div class="container">
<div class="logo-container">
</div>
</div>
<div class="container-fluid header-middle">
<div class="container">
<div class="logo-container">
<a href="/"><img src="/static/img/logo.png" alt="" width="457" height="104"/></a>
</div>
<div class="quick-access-container">
</div>
<div class="quick-access-container">
<form action="">
<input type="text" placeholder="Что ищем?"/> <button type="submit"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button>
<input type="text" placeholder="Что ищем?"/>
<button type="submit"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button>
</form>
<p class="small-welcome">Добро пожаловать в интернет-магазин Батискаф!</p>
<p class="quick-links"><a href="#">Мой аккаунт</a> | <a href="#">Новости</a> | <a href="/store/cart/">Моя корзина {% if (request|cart).items|length > 0 %}<span class="label label-success">{{ (request|cart).items|length }}</span>{% endif %}</a> | <a href="#">Оформление заказа</a> | <a href="#">Войти</a></p>
</div>
<p class="quick-links"><a href="#">Мой аккаунт</a> | <a href="#">Новости</a> | <a href="/store/cart/">Моя
корзина {% if (request|cart).items|length > 0 %}
<span class="label label-success">{{ (request|cart).items|length }}</span>{% endif %}</a> | <a
href="#">Оформление заказа</a> | <a href="#">Войти</a></p>
</div>
</div>
</div>
</div>
<div class="container-fluid navbar-container" id="shop-categories" data-spy="affix" data-offset-top="170">
<div class="navbar navbar-inverse yamm navbar-static-top">
<div class="container">
<div class="container-fluid navbar-container" id="shop-categories" data-spy="affix" data-offset-top="170">
<div class="navbar navbar-inverse yamm navbar-static-top">
<div class="container">
<div class="navbar-header">
<a href="/" class="navbar-brand"><span class="glyphicon glyphicon-home" aria-hidden="true"></span></a>
<a href="/" class="navbar-brand"><span class="glyphicon glyphicon-home" aria-hidden="true"></span></a>
</div>
<div>
<ul class="nav navbar-nav">
<ul class="nav navbar-nav">
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Подводная охота</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
<div class="row">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<ul>
<li><a class="title" href="/store/spearfishing/spearguns/">Ружья</a></li>
<li><a href="#">Пневматика</a></li>
<li><a href="/store/spearfishing/spearguns/arbalets/">Арбалеты</a></li>
<li><a href="#">Карбоновые арбалеты</a></li>
</ul>
<ul>
<li><a class="title" href="#">Аксессуары к ружьям</a></li>
<li><a href="#">Гарпуны</a></li>
<li><a href="#">Наконечники</a></li>
<li><a href="#">Катушки</a></li>
<li><a href="#">Линь</a></li>
<li><a href="#">Амортизаторы</a></li>
<li><a href="#">Заряжалки</a></li>
<li><a href="#">Запчасти</a></li>
<li><a href="#">Тяжи и зацепы</a></li>
<li><a href="#">Прочее</a></li>
</ul>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<ul>
<li><a class="title" href="#">Неопрен</a></li>
<li><a href="#">Гидрокостюмы</a></li>
<li><a href="#">Перчатки</a></li>
<li><a href="#">Носки</a></li>
</ul>
<ul>
<li><a class="title" href="#">Экипировка</a></li>
<li><a href="#">Маски</a></li>
<li><a href="#">Ласты</a></li>
<li><a href="#">Трубки</a></li>
<li><a href="#">Куканы</a></li>
<li><a href="#">Сумки</a></li>
</ul>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<ul>
<li><a class="title" href="#">Грузовые системы</a></li>
<li><a href="#">Ремни</a></li>
<li><a href="#">Грузы</a></li>
<li><a href="#">Жилеты</a></li>
</ul>
<ul>
<li><a class="title" href="#">Приборы</a></li>
<li><a href="#">Компьютеры</a></li>
<li><a href="#">Компасы</a></li>
</ul>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<ul>
<li><a class="title" href="#">Фонари</a></li>
<li><a href="#">На батарейках</a></li>
<li><a href="#">Аккумуляторные</a></li>
</ul>
<ul>
<li><a class="title" href="#">Безопасность</a></li>
<li><a href="#">Ножи</a></li>
<li><a href="#">Буи, плотики</a></li>
</ul>
</div>
</div>
</div>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Подводная
охота</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
<div class="row">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<ul>
<li><a class="title" href="/store/spearfishing/spearguns/">Ружья</a>
</li>
<li><a href="#">Пневматика</a></li>
<li><a href="/store/spearfishing/spearguns/arbalets/">Арбалеты</a></li>
<li><a href="#">Карбоновые арбалеты</a></li>
</ul>
<ul>
<li><a class="title" href="#">Аксессуары к ружьям</a></li>
<li><a href="#">Гарпуны</a></li>
<li><a href="#">Наконечники</a></li>
<li><a href="#">Катушки</a></li>
<li><a href="#">Линь</a></li>
<li><a href="#">Амортизаторы</a></li>
<li><a href="#">Заряжалки</a></li>
<li><a href="#">Запчасти</a></li>
<li><a href="#">Тяжи и зацепы</a></li>
<li><a href="#">Прочее</a></li>
</ul>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<ul>
<li><a class="title" href="#">Неопрен</a></li>
<li><a href="#">Гидрокостюмы</a></li>
<li><a href="#">Перчатки</a></li>
<li><a href="#">Носки</a></li>
</ul>
<ul>
<li><a class="title" href="#">Экипировка</a></li>
<li><a href="#">Маски</a></li>
<li><a href="#">Ласты</a></li>
<li><a href="#">Трубки</a></li>
<li><a href="#">Куканы</a></li>
<li><a href="#">Сумки</a></li>
</ul>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<ul>
<li><a class="title" href="#">Грузовые системы</a></li>
<li><a href="#">Ремни</a></li>
<li><a href="#">Грузы</a></li>
<li><a href="#">Жилеты</a></li>
</ul>
<ul>
<li><a class="title" href="#">Приборы</a></li>
<li><a href="#">Компьютеры</a></li>
<li><a href="#">Компасы</a></li>
</ul>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<ul>
<li><a class="title" href="#">Фонари</a></li>
<li><a href="#">На батарейках</a></li>
<li><a href="#">Аккумуляторные</a></li>
</ul>
<ul>
<li><a class="title" href="#">Безопасность</a></li>
<li><a href="#">Ножи</a></li>
<li><a href="#">Буи, плотики</a></li>
</ul>
</div>
</div>
</div>
</li>
</ul>
</li>
</ul>
</li>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Дайвинг</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Дайвинг</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
</div>
</div>
</li>
</ul>
</li>
</ul>
</li>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Фридайвинг</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown"
class="dropdown-toggle">Фридайвинг</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
</div>
</div>
</li>
</ul>
</li>
</ul>
</li>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Отдых на воде</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Отдых на
воде</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
</div>
</div>
</li>
</ul>
</li>
</ul>
</li>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Распродажа</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown"
class="dropdown-toggle">Распродажа</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
</div>
</div>
</li>
</ul>
</li>
</ul>
</li>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Детям</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Детям</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
</div>
</div>
</li>
</ul>
</li>
</ul>
</li>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Для бассейна</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Для
бассейна</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
</div>
</div>
</li>
</ul>
</li>
</ul>
</li>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Подарочный сертификат</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">Подарочный
сертификат</a>
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
</div>
</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</ul>
</div>
</div>
</div>
</div>
<div class="container main-container">
{% block content %}
</div>
</div>
<div class="container main-container">
{% block content %}
{% endblock %}
</div>
<footer class="footer">
<div class="container-fluid footer-top">
</div>
<div class="container-fluid footer-bottom">
<div class="container">
{% endblock %}
</div>
<footer class="footer">
<div class="container-fluid footer-top">
</div>
<div class="container-fluid footer-bottom">
<div class="container">
<div class="row">
<div class="footer-col col-xs-4">
<span class="title">О НАС</span><br/><br/>
<div class="row">
<div class="col-xs-6">
<a href="#">Сеть Батискаф</a><br/>
<a href="#">Магазины</a><br/>
<a href="#">Наши бренды</a><br/>
<a href="#">Новости</a><br/>
</div>
<div class="col-xs-6">
<a href="#">Контакты</a><br/>
<a href="#">Обратная связь</a><br/>
<a href="#">Журнал</a><br/>
<a href="#">Франчайзинг</a><br/>
</div>
</div>
<div class="footer-col col-xs-4">
<span class="title">О НАС</span><br/><br/>
<div class="row">
<div class="col-xs-6">
<a href="#">Сеть Батискаф</a><br/>
<a href="#">Магазины</a><br/>
<a href="#">Наши бренды</a><br/>
<a href="#">Новости</a><br/>
</div>
<div class="col-xs-6">
<a href="#">Контакты</a><br/>
<a href="#">Обратная связь</a><br/>
<a href="#">Журнал</a><br/>
<a href="#">Франчайзинг</a><br/>
</div>
</div>
</div>
<div class="footer-col col-xs-4">
<span class="title">ОБСЛУЖИВАНИЕ КЛИЕНТОВ</span><br/><br/>
<div class="row">
<div class="col-xs-6">
<a href="#">Доставка</a><br/>
<a href="#">Оплата</a><br/>
<a href="#">Система скидок</a><br/>
</div>
<div class="col-xs-6">
<a href="#">Сервис</a><br/>
<a href="#">Возврат и возмещение</a><br/>
<a href="#">Правила и условия</a><br/>
<a href="#">Помощь</a><br/>
</div>
</div>
<div class="footer-col col-xs-4">
<span class="title">ОБСЛУЖИВАНИЕ КЛИЕНТОВ</span><br/><br/>
</div>
<div class="footer-col col-xs-4 text-center col-last">
<div class="row">
<div class="col-xs-6">
<a href="#">Доставка</a><br/>
<a href="#">Оплата</a><br/>
<a href="#">Система скидок</a><br/>
</div>
<div class="col-xs-6">
<a href="#">Сервис</a><br/>
<a href="#">Возврат и возмещение</a><br/>
<a href="#">Правила и условия</a><br/>
<a href="#">Помощь</a><br/>
</div>
</div>
<span class="title">МЫ В ИНТЕРНЕТЕ</span><br/><br/>
<div class="row">
Кнопочки социалок
</div>
<div class="footer-col col-xs-4 text-center col-last">
<span class="title">МЫ В ИНТЕРНЕТЕ</span><br/><br/>
</div>
<div class="row">
Кнопочки социалок
</div>
</div>
</div>
<br/><br/>
<p>
<a href="#">Карта сайта</a> &nbsp;|&nbsp; <a href="#">Поисковые запросы</a> &nbsp;|&nbsp; <a href="#">Расширенный Поиск</a> &nbsp;|&nbsp; <a href="#">Контакты</a> &nbsp;|&nbsp; <a href="#">RSS</a> &nbsp;|&nbsp; <a href="#">Privacy Policy</a>
<a href="#">Карта сайта</a> &nbsp;|&nbsp; <a href="#">Поисковые запросы</a> &nbsp;|&nbsp; <a href="#">Расширенный
Поиск</a> &nbsp;|&nbsp; <a href="#">Контакты</a> &nbsp;|&nbsp; <a href="#">RSS</a> &nbsp;|&nbsp; <a
href="#">Privacy Policy</a>
</p><br/>
<p>
<a href="#">Карта сайта</a> <a href="#">Поисковые запросы</a> <a href="#">Advanced Search</a> <a
href="#">Contact Us</a> <a href="#">RSS</a>
<a href="#">Карта сайта</a> <a href="#">Поисковые запросы</a> <a href="#">Advanced Search</a> <a
href="#">Contact Us</a> <a href="#">RSS</a>
</p><br/>
<p>
Все права защищены 2001-2014 © компанией Батискаф <br/>
ООО "Батискаф” ИНН 7801565397 ОГРН 1127847046964 от 23.01.2012г. <br/>
Юрид.адрес: 199155 г.Санкт-Петербург Морская наб. д.33 лит.А пом.13Н
Все права защищены 2001-2014 © компанией Батискаф <br/>
ООО "Батискаф” ИНН 7801565397 ОГРН 1127847046964 от 23.01.2012г. <br/>
Юрид.адрес: 199155 г.Санкт-Петербург Морская наб. д.33 лит.А пом.13Н
</p>
</div>
</div>
</footer>
{% if request._messages %}
<ul class="messages">
</div>
</footer>
{% if request._messages %}
<ul class="messages">
{% for message in request._messages %}
<li{% if message.tags %} data-type="{{ message.tags }}"{% endif %}>{{ message|safe }}</li>
<li{% if message.tags %} data-type="{{ message.tags }}"{% endif %}>{{ message|safe }}</li>
{% endfor %}
</ul>
{% endif %}
{% block footer_scripts %}
<script src="/static/bower_components/jquery/dist/jquery.min.js"></script>
<script src="/static/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="/static/bower_components/Bootflat/bootflat/js/icheck.min.js"></script>
<script src="/static/bower_components/Bootflat/bootflat/js/jquery.fs.selecter.min.js"></script>
<script src="/static/bower_components/Bootflat/bootflat/js/jquery.fs.stepper.min.js"></script>
<script src="/static/bower_components/sweetalert/lib/sweet-alert.min.js"></script>
<script src="/static/js/icheck/icheck.min.js"></script>
<script src="/static/js/jquery.ba-bbq.min.js"></script>
<script src="/static/js/jquery.zoom.min.js"></script>
<script src="/static/js/Selecter/jquery.fs.selecter.min.js"></script>
<script src="/static/js/_.js"></script>
{% endblock footer_scripts %}
{% block jss %}{% endblock jss %}
{% if messages %}
<script>
</ul>
{% endif %}
{% block footer_scripts %}
<script src="/static/bower_components/jquery/dist/jquery.min.js"></script>
<script src="/static/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="/static/bower_components/Bootflat/bootflat/js/icheck.min.js"></script>
<script src="/static/bower_components/Bootflat/bootflat/js/jquery.fs.selecter.min.js"></script>
<script src="/static/bower_components/Bootflat/bootflat/js/jquery.fs.stepper.min.js"></script>
<script src="/static/bower_components/sweetalert/lib/sweet-alert.min.js"></script>
<script src="/static/js/icheck/icheck.min.js"></script>
<script src="/static/js/jquery.ba-bbq.min.js"></script>
<script src="/static/js/jquery.zoom.min.js"></script>
<script src="/static/js/Selecter/jquery.fs.selecter.min.js"></script>
<script src="/static/js/_.js"></script>
{% endblock footer_scripts %}
{% block jss %}{% endblock jss %}
{% if messages %}
<script>
{% for message in messages %}
swal("", "{{ message }}", "{{ message.tags|default('success') }}");
swal("", "{{ message }}", "{{ message.tags|default('success') }}");
{% endfor %}
</script>
{% endif %}
</body>
</html>
</script>
{% endif %}
</body>
</html>

@ -1,68 +1,81 @@
{% extends 'base.jinja' %}
{% block content %}
<div class=" breadcrumbs">
<ol class="breadcrumb breadcrumb-arrow">
<li><a href="/">Главная</a></li>
<div class=" breadcrumbs">
<ol class="breadcrumb breadcrumb-arrow">
<li><a href="/">Главная</a></li>
<li class="active"><span>Корзина</span></li>
</ol>
</div>
<li class="active"><span>Корзина</span></li>
</ol>
</div>
<div class="row">
<h3>Корзина товаров</h3><br/>
<div class="row">
<h3>Корзина товаров</h3><br/>
{% if cart.items %}
{% if cart.items %}
<div class="panel panel-default">
<form action="" method="post"><input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}">
<table class="table table-hover table-cart ">
<thead>
<tr>
<th>Фото</th>
<th>Наименование</th>
<th>Цена за единицу</th>
<th>Количество</th>
<th>Итого</th>
<th>Действия</th>
</tr>
</thead>
<tbody>
{% for item in cart.items %}
<tr>
<td class="text-center">
{% set im = item.item.product.main_image()|thumbnail("80x80") %}
<a href="{{ item.item.product.get_absolute_url() }}" ><img src="/static/{{ im.url }}" alt="" class="img-thumbnail"/></a>
</td>
<td><a href="{{ item.item.product.get_absolute_url() }}" >{{ item.item.product.title }}</a></td>
<td class="text-right">{{ item.item.price }} ₸</td>
<td class="text-right"><input type="number" value="{{ item.count }}" name="{{ item.id }}" class="form-control col-xs-1"/>
<div class="panel panel-default">
<form action="" method="post"><input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}">
<table class="table table-hover table-cart ">
<thead>
<tr>
<th>Фото</th>
<th>Наименование</th>
<th>Цена за единицу</th>
<th>Количество</th>
<th>Итого</th>
<th>Действия</th>
</tr>
</thead>
<tbody>
{% for item in cart.items %}
<tr>
<td class="text-center">
{% set im = item.item.product.main_image()|thumbnail("80x80") %}
<a href="{{ item.item.product.get_absolute_url() }}"><img src="/static/{{ im.url }}"
alt=""
class="img-thumbnail"/></a>
</td>
<td>
<a href="{{ item.item.product.get_absolute_url() }}">{{ item.item.product.title }}</a>
</td>
<td class="text-right">{{ item.item.price }} ₸</td>
<td class="text-right"><input type="number" value="{{ item.count }}"
name="{{ item.id }}" class="form-control col-xs-1"/>
</td>
<td class="text-right">{{ item.subtotal }} ₸</td>
<td class="text-center">
<a class="text-danger" href="/store/cart/remove/?id={{ item.id }}"><span class="glyphicon glyphicon-remove"></span></a>
</td>
</tr>
{% endfor %}
</td>
<td class="text-right">{{ item.subtotal }} ₸</td>
<td class="text-center">
<a class="text-danger" href="/store/cart/remove/?id={{ item.id }}"><span
class="glyphicon glyphicon-remove"></span></a>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th colspan="5" class="text-right table-cart-itogo">Итого: {{ cart.total }} ₸</th>
<th class="text-center"><button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-repeat"></span> Пересчитать</button></th>
</tr>
</tfoot>
</table>
</form>
</div>
</tbody>
<tfoot>
<tr>
<th colspan="5" class="text-right table-cart-itogo">Итого: {{ cart.total }} ₸</th>
<th class="text-center">
<button type="submit" class="btn btn-primary"><span
class="glyphicon glyphicon-repeat"></span> Пересчитать
</button>
</th>
</tr>
</tfoot>
</table>
</form>
</div>
{% else %}
<div class="alert alert-warning alert-dismissable">
<h4>Ваша корзина пуста</h4>
{% else %}
<div class="alert alert-warning alert-dismissable">
<h4>Ваша корзина пуста</h4>
<p>Вы еще ничего не добавляли в корзину. Выберите товары и добавьте их в корзину для дальнейшего оформления покупки.</p>
<p><a class="btn btn-warning" href="/">Перейти на главную страницу</a></p>
</div>
{% endif %}
</div>
<p>Вы еще ничего не добавляли в корзину. Выберите товары и добавьте их в корзину для дальнейшего
оформления покупки.</p>
<p><a class="btn btn-warning" href="/">Перейти на главную страницу</a></p>
</div>
{% endif %}
</div>
{% endblock %}

@ -1,57 +1,59 @@
{% extends 'base.jinja' %}
{% block content %}
<div class=" breadcrumbs">
<ol class="breadcrumb breadcrumb-arrow">
<li><a href="/">Главная</a></li>
{% for parent in category.get_parents() %}
<li><a href="{{ parent.get_absolute_url() }}">{{ parent.title }}</a></li>
{% endfor %}
<li class="active"><span>{{ category.title }}</span></li>
</ol>
</div>
<div class="row">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="panel panel-default panel-filter">
<div class="panel-heading">
<h3 class="panel-title">Фильтрация товаров</h3>
</div>
<div class="panel-body">
{% include 'includes/category_filter.jinja' with context %}
</div>
<div class=" breadcrumbs">
<ol class="breadcrumb breadcrumb-arrow">
<li><a href="/">Главная</a></li>
{% for parent in category.get_parents() %}
<li><a href="{{ parent.get_absolute_url() }}">{{ parent.title }}</a></li>
{% endfor %}
<li class="active"><span>{{ category.title }}</span></li>
</ol>
</div>
<div class="row">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="panel panel-default panel-filter">
<div class="panel-heading">
<h3 class="panel-title">Фильтрация товаров</h3>
</div>
<div class="panel-body">
{% include 'includes/category_filter.jinja' with context %}
</div>
</div>
</div>
<div class="col-xs-9 col-sm-9 col-md-9 col-lg-9 index-goods category-items">
<div class="category-paginator">
<div class="category-paginator-top">
<div class="row">
<div class="col-xs-4">С {{ products.start_index() }} до {{ products.end_index() }} из {{ products.paginator.count }}</div>
<div class="col-xs-4 text-center paginate">Страница: {% if products.has_previous() %}<a href="?page={{ products.previous_page_number() }}">&larr;</a>{% endif %}
{% for page in products.paginator.page_range %}
{% if page == products.number %}
{{ page }}
{% else %}
<a href="?page={{ page }}">{{ page }}</a>
{% endif %}
{% endfor %}
</div>
<div class="col-xs-9 col-sm-9 col-md-9 col-lg-9 index-goods category-items">
<div class="category-paginator">
<div class="category-paginator-top">
<div class="row">
<div class="col-xs-4">С {{ products.start_index() }} до {{ products.end_index() }}
из {{ products.paginator.count }}</div>
<div class="col-xs-4 text-center paginate">Страница: {% if products.has_previous() %}
<a href="?page={{ products.previous_page_number() }}">&larr;</a>{% endif %}
{% for page in products.paginator.page_range %}
{% if page == products.number %}
{{ page }}
{% else %}
<a href="?page={{ page }}">{{ page }}</a>
{% endif %}
{% if products.has_next() %}
<a href="?page={{ products.next_page_number() }}">&rarr;</a>
{% endif %}</div>
<div class="col-xs-4 text-right">Показать
<select name="show-count" id="">
<option value="10">10</option>
<option value="20">20</option>
<option value="50">50</option>
<option value="100">100</option>
<option value="all">Все</option>
</select>
на странице</div>
{% endfor %}
{% if products.has_next() %}
<a href="?page={{ products.next_page_number() }}">&rarr;</a>
{% endif %}</div>
<div class="col-xs-4 text-right">Показать
<select name="show-count" id="">
<option value="10">10</option>
<option value="20">20</option>
<option value="50">50</option>
<option value="100">100</option>
<option value="all">Все</option>
</select>
на странице
</div>
</div>
</div>
<div class="category-paginator-bottom">
@ -72,62 +74,72 @@
{% if products %}
{% for product in products %}
<div class="col-md-4 col-xs-4 col-sm-4 col-lg-4">
<div class="thumbnail">
{% set im = product.main_image()|thumbnail("420x420") %}
<a href="{{ product.get_absolute_url() }}"><img src="/static/{{ im.url }}"
class="img-responsive"></a>
<div class="caption">
<div class="title">
<a href="{{ product.get_absolute_url() }}">
{{ product.title }}
</a>
{% for product in products %}
<div class="col-md-4 col-xs-4 col-sm-4 col-lg-4">
<div class="thumbnail">
{% set im = product.main_image()|thumbnail("420x420") %}
<a href="{{ product.get_absolute_url() }}"><img src="/static/{{ im.url }}"
class="img-responsive"></a>
<div class="caption">
<div class="title">
<a href="{{ product.get_absolute_url() }}">
{{ product.title }}
</a>
</div>
<div class="price">
{{ product.min_price() }} ₸
</div>
{% if product.in_stock() %}
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар
есть в наличии
</div>
{% else %}
<div class="state-no">
{# TODO: Товар на заказ#}
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товара
нет в наличии
</div>
{% endif %}
<div class="in-cart">
{# TODO: Сделать кнопку заказать#}
{% if product.in_stock() %}
<a class="btn btn-warning btn-block"
href="/store/cart/add/?pk={{ product.variations.filter(in_stock__gt=0).order_by('price').first().pk }}&count=1&next={{ request.get_full_path()|urlencode }}"><span><span
class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Добавить в корзину</span></a>
{% else %}
<a class=" btn btn-danger btn-block" href="#"><span><span
class="glyphicon glyphicon-import" aria-hidden="true"></span> Заказать</span></a>
{% endif %}
</div>
</div>
<div class="price">
{{ product.min_price() }} ₸
</div>
{% if product.in_stock() %}
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
{% else %}
<div class="state-no">
{# TODO: Товар на заказ#}
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товара нет в наличии
</div>
{% endif %}
<div class="in-cart">
{# TODO: Сделать кнопку заказать#}
{% if product.in_stock() %}
<a class="btn btn-warning btn-block" href="/store/cart/add/?pk={{ product.variations.filter(in_stock__gt=0).order_by('price').first().pk }}&count=1&next={{ request.get_full_path()|urlencode }}"><span><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Добавить в корзину</span></a>
{% else %}
<a class=" btn btn-danger btn-block" href="#"><span><span class="glyphicon glyphicon-import" aria-hidden="true"></span> Заказать</span></a>
{% endif %}
</div>
</div>
{% endfor %}
{% else %}
<div class="alert alert-warning alert-dismissable">
<h4>Список товаров пуст</h4>
<p>Товары в данной категории или с выбранными параметрами отсутствуют. Выберите другую
категорию, либо сбросьте фильтр параметров.</p>
<p><a class="btn btn-warning" href="/">Перейти на главную страницу</a> <a class="btn btn-link"
href="{{ category.get_absolute_url() }}">или
отменить фильтрацию</a></p>
</div>
</div>
{% endfor %}
{% else %}
<div class="alert alert-warning alert-dismissable">
<h4>Список товаров пуст</h4>
<p>Товары в данной категории или с выбранными параметрами отсутствуют. Выберите другую категорию, либо сбросьте фильтр параметров.</p>
<p><a class="btn btn-warning" href="/">Перейти на главную страницу</a> <a class="btn btn-link" href="{{ category.get_absolute_url() }}">или отменить фильтрацию</a></p>
</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}
{% endif %}
</div>
</div>
</div>
{% endblock %}

@ -1,55 +1,57 @@
{% if category.childs.all() %}
<div class="category-filter-title">&rarr;&nbsp;&nbsp;&nbsp;Категории</div>
<ul class="attr-filter">
{% for child in category.childs.all() %}
<li>
<a href="{{ child.get_absolute_url() }}">{{ child.title }}</a>
</li>
{% endfor %}
</ul>
<hr class="dashed"/>
<div class="category-filter-title">&rarr;&nbsp;&nbsp;&nbsp;Категории</div>
<ul class="attr-filter">
{% for child in category.childs.all() %}
<li>
<a href="{{ child.get_absolute_url() }}">{{ child.title }}</a>
</li>
{% endfor %}
</ul>
<hr class="dashed"/>
{% endif %}
<div class="category-filter-title">&rarr;&nbsp;&nbsp;&nbsp;Производитель</div>
<ul class="attr-filter">
{% for choise in category.brands() %}
<li>
<label><input type="checkbox" name="brand[{{ loop.index0 }}]" value="{{ choise.pk }}"
{% if choise.pk.__str__() in request.GET.getlist('brand[]') %}
checked="checked"
{% endif %}
/> {{ choise }}</label>
<li>
<label><input type="checkbox" name="brand[{{ loop.index0 }}]" value="{{ choise.pk }}"
{% if choise.pk.__str__() in request.GET.getlist('brand[]') %}
checked="checked"
{% endif %}
/> {{ choise }}</label>
</li>
{% endfor %}
</ul>
{% endfor %}
</ul>
{% for attr in category.attr_cat.all() %}
{% for attr in category.attr_cat.all() %}
<hr class="dashed"/>
<div class="category-filter-title">&rarr;&nbsp;&nbsp;&nbsp;{{ attr.attribute.title }}</div>
{% if attr.field_type == 'select' %}
<ul class="attr-filter">
{% for choise in attr.choises_array %}
<li>
<label><input type="checkbox" name="{{ attr.attribute.slug }}[{{ loop.index0 }}]" value="{{ choise }}"
{% if choise in request.GET.getlist('%s[]'|format(attr.attribute.slug)) %}
checked="checked"
{% endif %}/> {{ choise }}</label>
</li>
<ul class="attr-filter">
{% for choise in attr.choises_array %}
<li>
<label><input type="checkbox" name="{{ attr.attribute.slug }}[{{ loop.index0 }}]"
value="{{ choise }}"
{% if choise in request.GET.getlist('%s[]'|format(attr.attribute.slug)) %}
checked="checked"
{% endif %}/> {{ choise }}</label>
</li>
{% endfor %}
</ul>
{% else %}
{% else %}
<ul class="attr-filter">
{% for value in attr.get_posible_values %}
<li>
<label><input type="checkbox" name="{{ attr.attribute.slug }}[{{ loop.index0 }}]" value="{{ value }}"/> {{ value }}</label>
</li>
{#TODO: Сделать разбор по фильтрам для стринга #}
<li>
<label><input type="checkbox" name="{{ attr.attribute.slug }}[{{ loop.index0 }}]"
value="{{ value }}"/> {{ value }}</label>
</li>
{#TODO: Сделать разбор по фильтрам для стринга #}
{% endfor %}
</ul>
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}

@ -1,236 +1,258 @@
{% extends 'base.jinja' %}
{% block content %}
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
<li data-target="#carousel-example-generic" data-slide-to="3"></li>
<li data-target="#carousel-example-generic" data-slide-to="4"></li>
<li data-target="#carousel-example-generic" data-slide-to="5"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="/static/img/banner1.jpg" alt="">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="/static/img/banner2.jpg" alt="">
<div class="carousel-caption">
</div>
</div>
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
<li data-target="#carousel-example-generic" data-slide-to="3"></li>
<li data-target="#carousel-example-generic" data-slide-to="4"></li>
<li data-target="#carousel-example-generic" data-slide-to="5"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="/static/img/banner1.jpg" alt="">
<div class="item">
<img src="/static/img/banner3.jpg" alt="">
<div class="carousel-caption">
</div>
</div>
<div class="carousel-caption">
<div class="item">
<img src="/static/img/banner4.jpg" alt="">
<div class="carousel-caption">
</div>
</div>
</div>
</div>
<div class="item">
<img src="/static/img/banner2.jpg" alt="">
<div class="item">
<img src="/static/img/banner5.jpg" alt="">
<div class="carousel-caption">
</div>
</div>
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="/static/img/banner6.jpg" alt="">
<div class="carousel-caption">
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Назад</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Вперед</span>
</a>
</div>
<div class="index-goods">
<div class="row">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop1.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Гидрокостюм <br/>STORM 3 мм женский, розовый
</a>
</div>
<div class="price">
6 170,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop2.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Гидрокостюм TX2 BZ <br/>5 мм мужской, оранжевый
</a>
</div>
<div class="price">
13 190,00 ₸
<div class="item">
<img src="/static/img/banner3.jpg" alt="">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="/static/img/banner4.jpg" alt="">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="/static/img/banner5.jpg" alt="">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="/static/img/banner6.jpg" alt="">
<div class="carousel-caption">
</div>
</div>
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop3.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Гидрокостюм <br/>SCORPENA A, 9 мм
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Назад</span>
</a>
</div>
<div class="price">
9 000,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop4.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Гидрокостюм <br/>SCORPENA А, 7 мм
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Вперед</span>
</a>
</div>
<div class="price">
8 400,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop5.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Ружье <br/>Marlin Oceania
</a>
<div class="index-goods">
<div class="row">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop1.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Гидрокостюм <br/>STORM 3 мм женский, розовый
</a>
</div>
<div class="price">
6 170,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span
class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop2.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Гидрокостюм TX2 BZ <br/>5 мм мужской, оранжевый
</a>
</div>
<div class="price">
13 190,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span
class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop3.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Гидрокостюм <br/>SCORPENA A, 9 мм
</a>
</div>
<div class="price">
9 000,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span
class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop4.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Гидрокостюм <br/>SCORPENA А, 7 мм
</a>
</div>
<div class="price">
8 400,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span
class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
</div>
<div class="price">
19 425,00 ₸
<div class="row">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop5.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Ружье <br/>Marlin Oceania
</a>
</div>
<div class="price">
19 425,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span
class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop6.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Экшн камера <br/>Polaroid Cube синяя
</a>
</div>
<div class="price">
6 800,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span
class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop7.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Экшн камера <br/>Polaroid Cube красная
</a>
</div>
<div class="price">
6 800,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span
class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop8.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Гидрокостюм <br/>Marlin Prestige 5 мм
</a>
</div>
<div class="price">
20 990,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span
class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop6.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Экшн камера <br/>Polaroid Cube синяя
</a>
</div>
<div class="price">
6 800,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop7.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Экшн камера <br/>Polaroid Cube красная
</a>
</div>
<div class="price">
6 800,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="thumbnail">
<a href="#"><img src="/static/img/shop8.jpg" alt=""></a>
<div class="caption">
<div class="title">
<a href="#">
Гидрокостюм <br/>Marlin Prestige 5 мм
</a>
</div>
<div class="price">
20 990,00 ₸
</div>
<div class="state-yes">
<span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> Товар есть в наличии
</div>
<div class="in-cart">
<a class="cart-link" href="#"><span>Добавить в корзину <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span></span></a>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

@ -1,69 +1,78 @@
{% extends 'base.jinja' %}
{% block content %}
<div class=" breadcrumbs">
<ol class="breadcrumb breadcrumb-arrow">
<li><a href="/">Главная</a></li>
{% for parent in category.get_parents() %}
<li><a href="{{ parent.get_absolute_url() }}">{{ parent.title }}</a></li>
{% endfor %}
<li class=""><a href="{{ category.get_absolute_url() }}">{{ category.title }}</a></li>
<li class="active"><span>{{ product.title }}</span></li>
</ol>
</div>
<div class="row">
<div class="product-thumbnails col-xs-6">
<div class="product-min-thumbnails col-xs-2">
{% for image in product.images.all() %}
{% set im = image.image|thumbnail("80x80") %}
{% set im_big = image.image|thumbnail("398x398") %}
<a href="/static/{{ im_big.url }}" data-big-url="/static/{{ image.image.url }}"><img src="/static/{{ im.url }}" alt="" class="img-thumbnail"/></a>
<div class=" breadcrumbs">
<ol class="breadcrumb breadcrumb-arrow">
<li><a href="/">Главная</a></li>
{% for parent in category.get_parents() %}
<li><a href="{{ parent.get_absolute_url() }}">{{ parent.title }}</a></li>
{% endfor %}
</div>
<div class="product-big-thumbnail col-xs-10">
<div class="product-big-thumbnail-container">
{% set im = product.main_image()|thumbnail("398x398") %}
<a href="/static/{{ product.main_image().url }}" id="product-big-image-url">
<img src="/static/{{ im.url }}" alt="" class=""/>
</a>
<li class=""><a href="{{ category.get_absolute_url() }}">{{ category.title }}</a></li>
<li class="active"><span>{{ product.title }}</span></li>
</ol>
</div>
<div class="row">
<div class="product-thumbnails col-xs-6">
<div class="product-min-thumbnails col-xs-2">
{% for image in product.images.all() %}
{% set im = image.image|thumbnail("80x80") %}
{% set im_big = image.image|thumbnail("398x398") %}
<a href="/static/{{ im_big.url }}" data-big-url="/static/{{ image.image.url }}"><img
src="/static/{{ im.url }}" alt="" class="img-thumbnail"/></a>
{% endfor %}
</div>
<div class="product-big-thumbnail col-xs-10">
<div class="product-big-thumbnail-container">
{% set im = product.main_image()|thumbnail("398x398") %}
<a href="/static/{{ product.main_image().url }}" id="product-big-image-url">
<img src="/static/{{ im.url }}" alt="" class=""/>
</a>
</div>
</div>
</div>
</div>
<div class="col-xs-6 product-short-description">
<h4>{{ product.title }}</h4> <br/>
<div class="product-detail-price">
<span class="product-detail-price-span">{{ product.min_price() }}</span> ₸</div>
<div class="col-xs-6 product-short-description">
<h4>{{ product.title }}</h4> <br/>
<div class="product-detail-price">
<span class="product-detail-price-span">{{ product.min_price() }}</span> ₸
</div>
<br/>
{% set variant = product.variations.filter(in_stock__gt=0).order_by('price').first() %}
{% if not variant %}
{% set variant = product.variations.order_by('price').first() %}
{% set variant = product.variations.order_by('price').first() %}
{% endif %}
<div class="product-variations">
<p>Варианты товара:</p>
{# TODO: Предусмотреть если всего один вариант#}
<select name="product-variations-selecter" class="product-variations-selecter">
{% for variation in product.variations.order_by('price') %}
<option {% if variation.pk == variant.pk %}selected='selected'{% endif %} value="{{ variation.pk }}" data-price="{{ variation.price }}" data-count="{{ variation.in_stock }}">{{ variation.variation }} - {{ variation.price }} ₸</option>
<option {% if variation.pk == variant.pk %}selected='selected'{% endif %}
value="{{ variation.pk }}" data-price="{{ variation.price }}"
data-count="{{ variation.in_stock }}">{{ variation.variation }} - {{ variation.price }}
</option>
{% endfor %}
</select>
</div>
<br/>
<div class="product-in-stock">
<select name="product-count-selecter" class="product-count-selecter">
{% for count_val in range(variant.in_stock) %}
<option value="{{ count_val + 1 }}">{{ count_val + 1 }} шт.</option>
{% for count_val in range(variant.in_stock) %}
<option value="{{ count_val + 1 }}">{{ count_val + 1 }} шт.</option>
{% endfor %}
</select>
<br/><br/><br/>
<div class="row">
<div class="itogo col-xs-6">
Итого: <span class="itogo-span">{{ product.min_price() }}</span> ₸
</div>
<div class="col-xs-6 text-right">
{# TODO: Сделать кнопку заказать#}
<a href="/store/cart/add/?pk={{ variant.pk }}&count=1&next={{ product.get_absolute_url() }}" class="btn btn-warning btn-block" id="product-add-to-cart-link"><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Добавить в корзину</a>
<a href="/store/cart/add/?pk={{ variant.pk }}&count=1&next={{ product.get_absolute_url() }}"
class="btn btn-warning btn-block" id="product-add-to-cart-link"><span
class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Добавить в корзину</a>
</div>
</div>
@ -76,5 +85,5 @@
</div>
{% endblock %}
{% endblock %}

@ -1,10 +1,14 @@
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.site.site_header = 'Админка Batiskaf.kz'
admin.site.site_title = 'Админка Batiskaf.kz'
admin.site.index_title = 'Модели'
urlpatterns = patterns(
'',
url(r'^$', 'main.views.index',
name='index'),
url(r'^store/', include('store.urls')),
url(r'^admin/', include(admin.site.urls)),
)
'',
url(r'^$', 'main.views.index',
name='index'),
url(r'^store/', include('store.urls')),
url(r'^admin/', include(admin.site.urls)),
)

@ -9,7 +9,7 @@ https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "batiskaf.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "batiskaf.settings")
application = get_wsgi_application()

@ -1,20 +1,16 @@
//@import "bootstrap.less";
@import "../bower_components/bootstrap/less/variables.less";
@import "../bower_components/bootstrap/less/mixins.less";
@import '../bower_components/colors/less/colors.less';
@import '../bower_components/yamm3/yamm/yamm.less';
@brand-yellow: #fed000;
@brand-gray: #434a54;
@brand-gray: #434a54;
@brand-white: @white;
/* Account for fixed navbar */
body,
.navbar{
.navbar {
min-width: 970px !important;
}
@ -22,81 +18,83 @@ body,
font-size: 16px;
}
.container{
.container {
width: 970px !important;
}
span.yellow{
span.yellow {
color: @brand-yellow;
}
.header-top{
.header-top {
background-color: @brand-gray;
height: 40px;
line-height: 40px;
.container{
.container {
line-height: 40px;
height: 40px;
.top-left-links{
.top-left-links {
float: left;
text-align: left;
color: @brand-yellow;
font-size: 10pt;
a{
a {
color: @brand-yellow;
}
}
.top-right-links{
.top-right-links {
float: right;
text-align: right;
color: @brand-white;
font-weight: bold;
font-size: 10pt;
a{
a {
color: @brand-white;
}
}
}
}
.header-middle{
.header-middle {
background-color: @brand-yellow;
height: 130px;
.logo-container{
.logo-container {
line-height: 130px;
float: left;
text-align: left;
}
.quick-access-container{
.quick-access-container {
float: right;
text-align: right;
form{
form {
margin-top: 30px;
input{
input {
background-color: lighten(@brand-yellow, 10%);
border: darken(@brand-yellow, 10%) 1px solid;
width: 245px;
height: 30px;
padding: 5px;
}
button{
button {
background: none;
border: none;
}
}
.small-welcome{
.small-welcome {
font-size: 10pt;
margin-top: 10px;
}
.quick-links{
.quick-links {
font-size: 10pt;
color: @brand-gray;
a{
a {
color: @brand-gray;
}
}
}
}
//.header-bottom{
// #gradient > .vertical(@start-color: @brand-gray; @end-color: lighten(@brand-gray, 15%));
// height: 45px;
@ -120,11 +118,11 @@ span.yellow{
* with disabling the responsiveness.
*/
/* Account for fixed navbar */
/* Account for fixed navbar */
body,
.navbar-static-top,
.navbar-fixed-bottom {
body,
.navbar-static-top,
.navbar-fixed-bottom {
min-width: 970px;
}
@ -137,19 +135,19 @@ span.yellow{
.page-header {
margin-bottom: 30px;
}
.page-header .lead {
margin-bottom: 10px;
}
/* Non-responsive overrides
*
* Utilize the following CSS to disable the responsive-ness of the container,
* grid system, and navbar.
*/
/* Reset the container */
.container {
/* Reset the container */
.container {
width: 970px;
max-width: none !important;
}
@ -187,6 +185,7 @@ span.yellow{
.navbar-toggle {
display: none;
}
.navbar-collapse {
border-top: 0;
}
@ -200,9 +199,11 @@ span.yellow{
float: left;
margin: 0;
}
.navbar-nav > li {
float: left;
}
.navbar-nav > li > a {
padding: 15px;
}
@ -224,16 +225,16 @@ span.yellow{
padding: 0px;
margin: 0px 0 15px 0px;
}
a{
a {
color: @white;
border: none;
font-weight: normal;
font-size: 11px;
&.title{
&.title {
color: lighten(@blue, 30%) !important;
font-weight: bold;
}
&:hover{
&:hover {
text-decoration: underline;
color: @brand-yellow;
}
@ -245,9 +246,11 @@ span.yellow{
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
}
.navbar-default .navbar-nav .open .dropdown-menu > li > a {
color: #333;
}
ul.nav li.dropdown:hover > ul.dropdown-menu {
display: block;
color: #333;
@ -261,16 +264,16 @@ ul.nav li.dropdown:hover > ul.dropdown-menu {
padding: 0px;
margin: 0px 0 15px 0px;
}
a{
a {
color: @white;
border: none;
font-weight: normal;
font-size: 11px;
&.title{
&.title {
color: lighten(@blue, 30%) !important;
font-weight: bold;
}
&:hover{
&:hover {
text-decoration: underline;
color: @brand-yellow;
}
@ -282,6 +285,7 @@ ul.nav li.dropdown:hover > ul.dropdown-menu {
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
}
.navbar .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar .navbar-nav .open .dropdown-menu > li > a:focus,
.navbar .navbar-nav .open .dropdown-menu > .active > a,
@ -290,6 +294,7 @@ ul.nav li.dropdown:hover > ul.dropdown-menu {
color: #fff !important;
background-color: #428bca !important;
}
.navbar .navbar-nav .open .dropdown-menu > .disabled > a,
.navbar .navbar-nav .open .dropdown-menu > .disabled > a:hover,
.navbar .navbar-nav .open .dropdown-menu > .disabled > a:focus {
@ -369,109 +374,117 @@ ul.nav li.dropdown:hover > ul.dropdown-menu {
.navbar-form .has-feedback .form-control-feedback {
top: 0;
}
.navbar-container{
padding:0;
.navbar-container {
padding: 0;
}
.dropdown-menu{
.dropdown-menu {
min-width: 720px !important;
}
.navbar{
margin-bottom:0px !important;
.navbar {
margin-bottom: 0px !important;
}
.main-container{
.main-container {
//border-right: 1px @silver solid;
//border-left: 1px @silver solid;
padding: 20px 0 100px 0;
}
.index-goods{
.thumbnail{
.index-goods {
.thumbnail {
padding-bottom: 10px !important;
.box-shadow(none);
border: 0;
}
.col-xs-3, .col-sm-3, .col-md-3, .col-lg-3{
.col-xs-3, .col-sm-3, .col-md-3, .col-lg-3 {
}
margin-top: 20px;
.title{
a{
.title {
a {
font-weight: bold;
color: @blue;
font-size: 12px;
}
}
.price{
.price {
font-size: 18px;
font-weight: bold;
margin-bottom: 5px;
}
.state-yes{
.state-yes {
color: @green;
font-size: 11px;
margin-bottom: 10px;
}
.state-no{
.state-no {
color: @red;
font-size: 11px;
margin-bottom: 10px;
}
.in-cart span{
.in-cart span {
//background-color: @brand-yellow;
//padding: 5px;
}
a.cart-link{
a.cart-link {
color: @black;
&:hover{
&:hover {
text-decoration: none;
color: @black;
}
}
}
footer{
.footer-col{
footer {
.footer-col {
margin-top: 10px;
background: none;
border-left: 1px darken(@gray,30%) solid;
border-left: 1px darken(@gray, 30%) solid;
height: 150px;
&.col-last{
border-right: 1px darken(@gray,30%) solid;
&.col-last {
border-right: 1px darken(@gray, 30%) solid;
}
}
.footer-top{
.footer-top {
height: 30px;
margin-top: -40px;
background-color: @brand-yellow;
}
.footer-bottom{
.footer-bottom {
height: 380px;
//background-color: @brand-gray;
color: @white;
font-size: 12px;
.title{
.title {
color: @brand-yellow;
font-weight: bold;
}
a{
a {
color: @white;
&:hover{
&:hover {
color: @brand-yellow;
}
}
}
}
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative !important;
min-height: 100% !important;
}
body {
/* Margin bottom by footer height */
margin-bottom: 410px !important;
}
.footer {
position: absolute !important;
bottom: 0 !important;
@ -481,12 +494,12 @@ body {
}
.navbar-inverse {
a{
a {
color: @white !important;
border-right: 1px lighten(@brand-gray, 20%) solid;
font-weight: bold;
font-size: 9pt;
&:hover{
&:hover {
color: @brand-yellow !important;
text-decoration: none;
}
@ -497,65 +510,74 @@ body {
.navbar-nav > .open > a,
.navbar-nav > .active > a {
#gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));
.box-shadow(inset 0 3px 9px rgba(0,0,0,.25));
.box-shadow(inset 0 3px 9px rgba(0, 0, 0, .25));
}
.navbar-brand,
.navbar-nav > li > a {
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
}
}
body{
body {
background-color: rgb(241, 242, 246);
}
h1, h2, h3, h4, h5, h6{
h1, h2, h3, h4, h5, h6 {
text-align: center;
}
.well-lg form{
.well-lg form {
margin: 10px 0;
}
.alert h4{
.alert h4 {
text-align: left;
}
.navbar-container.affix{
.navbar-container.affix {
top: 0;
width: 100%;
z-index: 5000;
}
.navbar-container{
.navbar-container {
width: 100%;
z-index: 5000;
}
.panel-filter{
ul{
.panel-filter {
ul {
text-align: left;
list-style-type: none;
list-style-position: inherit;
padding: 0;
margin: 0;
.icheckbox_square-blue{
.icheckbox_square-blue {
margin-right: 5px;
}
label{
label {
font-weight: normal;
}
}
}
hr.dashed{
hr.dashed {
border: none;
height: 1px;
width: 100%;
border-top:1px dashed #ccc
border-top: 1px dashed #ccc
}
.category-filter-title{
.category-filter-title {
text-transform: uppercase;
font-size: 12px;
font-weight: bold;
margin-bottom: 15px;
}
.category-paginator{
.category-paginator {
font-size: 10px;
line-height: 20px;
background: @brand-gray;
@ -564,17 +586,18 @@ hr.dashed{
margin-bottom: 20px;
.border-right-radius(4px);
.border-left-radius(4px);
.category-paginator-top{
.category-paginator-top {
padding: 0 10px;
height: 20px;
border-bottom: 1px #BDC3C7 solid;
}
.category-paginator-bottom{
.category-paginator-bottom {
height: 20px;
padding: 0 10px;
}
}
.category-items{
.category-items {
margin: 0;
}
@ -582,54 +605,65 @@ hr.dashed{
@bradcrumbs-border: darken(@bradcrumbs-background, 5%);
@bradcrumbs-color: @brand-gray;
.breadcrumb-arrow li a::before{
.breadcrumb-arrow li a::before {
border-left-color: @bradcrumbs-background;
}
.breadcrumb-arrow li a::after{
.breadcrumb-arrow li a::after {
border-left: 11px solid @bradcrumbs-border;
}
.breadcrumb-arrow li a::after{
.breadcrumb-arrow li a::after {
border-left: 11px solid @bradcrumbs-border;
}
.breadcrumb-arrow li a{
.breadcrumb-arrow li a {
background-color: @bradcrumbs-background;
border: 1px solid @bradcrumbs-border;
color: @bradcrumbs-color;
}
.breadcrumb-arrow li a:focus::before, .breadcrumb-arrow li a:hover::before{
.breadcrumb-arrow li a:focus::before, .breadcrumb-arrow li a:hover::before {
border-left-color: @bradcrumbs-background;
}
.breadcrumb-arrow li a:focus, .breadcrumb-arrow li a:hover{
.breadcrumb-arrow li a:focus, .breadcrumb-arrow li a:hover {
background-color: @bradcrumbs-background;
border: 1px solid @bradcrumbs-background;
}
.breadcrumb-arrow li a:active::after, .breadcrumb-arrow li a:active::before{
.breadcrumb-arrow li a:active::after, .breadcrumb-arrow li a:active::before {
border-left-color: @bradcrumbs-background;
}
.breadcrumb-arrow li a:active::after, .breadcrumb-arrow li a:active::before{
.breadcrumb-arrow li a:active::after, .breadcrumb-arrow li a:active::before {
border-left-color: @bradcrumbs-background;
}
.breadcrumb-arrow li a:active{
.breadcrumb-arrow li a:active {
background-color: @bradcrumbs-background;
border: 1px solid @bradcrumbs-background;
}
.category-paginator{
a{
.category-paginator {
a {
color: @brand-yellow;
&:hover, &:active{
&:hover, &:active {
color: @brand-yellow;
}
}
}
.product-min-thumbnails{
img{
.product-min-thumbnails {
img {
margin-bottom: 10px;
}
}
.product-big-thumbnail{
.product-big-thumbnail-container{
.product-big-thumbnail {
.product-big-thumbnail-container {
width: 400px;
height: 400px;
min-width: 400px;
@ -641,51 +675,56 @@ hr.dashed{
border-radius: 4px;
text-align: center;
line-height: 400px;
img{
img {
width: 396px;
margin-top: 2px;
}
}
}
.product-short-description{
.product-short-description {
padding-left: 35px;
h4{
h4 {
text-align: left;
margin-top: 0;
padding-top: 0;
}
.product-detail-price{
.product-detail-price {
font-size: 41px;
font-weight: bold;
}
}
.product-not-in-stock{
.product-not-in-stock {
color: @red;
font-style: italic;
display: none;
}
.product-in-stock{
.itogo{
.product-in-stock {
.itogo {
font-size: 20px;
}
}
table.table-cart{
input{
table.table-cart {
input {
width: 70px;
text-align: left;
float: right;
}
}
.table{
thead{
tr{
.table {
thead {
tr {
//background: @brand-gray;
th{
th {
background: @brand-gray;
color: @brand-white;
border-right: 1px gray solid;
&:last-child{
&:last-child {
border-right: none;
}
&:last-of-type {
@ -697,10 +736,10 @@ table.table-cart{
}
}
}
tbody{
td{
tbody {
td {
border-right: 1px #ddd solid;
&:last-child{
&:last-child {
border-right: none;
}
&:last-of-type {
@ -711,11 +750,12 @@ table.table-cart{
}
}
}
.table-cart-itogo{
.table-cart-itogo {
font-size: 20px;
}
}
ul.messages{
ul.messages {
display: none;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

@ -16,6 +16,7 @@ class BrandAdmin(admin.ModelAdmin):
list_display = ('title',)
prepopulated_fields = {"slug": ("title",)}
# @admin.register(Image)
# class ImageAdmin(admin.ModelAdmin):
# list_display = ('image',)
@ -35,10 +36,10 @@ class AttributeAdmin(admin.ModelAdmin):
class ImageInProductInline(admin.TabularInline):
def render_image(self, obj):
return mark_safe("""<img src="/static/{0}" width='200' />""".format(
obj.image.url))
render_image.short_description = 'Превью'
model = ImageInProduct
@ -60,7 +61,6 @@ class ProductAdmin(admin.ModelAdmin):
inlines = [ImageInProductInline,
ProductVariationInline, AttributesInProductInline]
#
# @admin.register(Category)
# class CategoryAdmin(admin.ModelAdmin):

@ -0,0 +1,51 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('store', '0009_auto_20150526_1021'),
]
operations = [
migrations.AlterModelOptions(
name='attribute',
options={'verbose_name_plural': 'атрибуты', 'verbose_name': 'атрибут'},
),
migrations.AlterModelOptions(
name='attributeforcategory',
options={'verbose_name_plural': 'атрибуты в категориях', 'verbose_name': 'атрибут в категории'},
),
migrations.AlterModelOptions(
name='attributesinproduct',
options={'verbose_name_plural': 'атрибуты в товарах', 'verbose_name': 'атрибут в товаре'},
),
migrations.AlterModelOptions(
name='brand',
options={'verbose_name_plural': 'бренды', 'verbose_name': 'бренд'},
),
migrations.AlterModelOptions(
name='category',
options={'verbose_name_plural': 'категории', 'verbose_name': 'категория'},
),
migrations.AlterModelOptions(
name='imageinproduct',
options={'verbose_name_plural': 'фото товаров', 'verbose_name': 'фото товара'},
),
migrations.AlterModelOptions(
name='product',
options={'verbose_name_plural': 'товары', 'verbose_name': 'товар'},
),
migrations.AlterModelOptions(
name='productvariation',
options={'verbose_name_plural': 'разновидности товаров', 'verbose_name': 'разновидность товара'},
),
migrations.AddField(
model_name='productvariation',
name='article',
field=models.CharField(max_length=32, blank=True, null=True, verbose_name='Артикул', default=''),
),
]

@ -26,6 +26,10 @@ class Category(models.Model):
attributes = models.ManyToManyField(
'Attribute', through='AttributeForCategory')
class Meta:
verbose_name = 'категория'
verbose_name_plural = 'категории'
def __str__(self):
titles = []
for p in self.get_parents():
@ -72,6 +76,10 @@ class Attribute(models.Model):
title = models.CharField('Наименование', max_length=256, default='')
slug = models.SlugField('Ссылка', max_length=256, default='')
class Meta:
verbose_name = 'атрибут'
verbose_name_plural = 'атрибуты'
def __str__(self):
return self.title
@ -89,6 +97,10 @@ class AttributeForCategory(models.Model):
models.CharField(max_length=50), blank=True, default=[])
priority = models.IntegerField('Приоритет', default=0)
class Meta:
verbose_name = 'атрибут в категории'
verbose_name_plural = 'атрибуты в категориях'
def __str__(self):
if self.field_type == FIELD_TYPE_SELECT:
return '{}: {} ({}: {})'.format(
@ -119,9 +131,14 @@ class Brand(models.Model):
title = models.CharField('Наименование', max_length=256, default='')
slug = models.SlugField('Ссылка', max_length=256, default='')
class Meta:
verbose_name = 'бренд'
verbose_name_plural = 'бренды'
def __str__(self):
return self.title
# class Image(models.Model):
# image = models.ImageField('Картинка',
# upload_to=os.path.join(settings.BASE_DIR, "static", 'uploads'))
@ -138,6 +155,10 @@ class Product(models.Model):
attirbutes = models.ManyToManyField(
AttributeForCategory, through='AttributesInProduct')
class Meta:
verbose_name = 'товар'
verbose_name_plural = 'товары'
def __str__(self):
return self.title
@ -174,6 +195,12 @@ class ProductVariation(models.Model):
'Цена (тенге)', default=0, null=False, blank=False)
in_stock = models.IntegerField(
'В наличии (шт.)', default=1, null=False, blank=False)
article = models.CharField(
'Артикул', max_length=32, null=True, blank=True, default='')
class Meta:
verbose_name = 'разновидность товара'
verbose_name_plural = 'разновидности товаров'
def __str__(self):
return self.variation
@ -188,9 +215,14 @@ class AttributesInProduct(models.Model):
value = models.CharField(
'Значение', max_length=64, default=None, blank=True, null=True)
class Meta:
verbose_name = 'атрибут в товаре'
verbose_name_plural = 'атрибуты в товарах'
def photo_filename(instance, filename):
from slugify import slugify_filename
return 'photo_uploads/' + slugify_filename(filename)
@ -203,3 +235,7 @@ class ImageInProduct(models.Model):
product = models.ForeignKey(
Product, verbose_name='Товар', related_name='images')
is_main = models.BooleanField('Главная', default=False)
class Meta:
verbose_name = 'фото товара'
verbose_name_plural = 'фото товаров'

@ -2,7 +2,6 @@ from django.conf.urls import patterns, url
from django.views.generic import RedirectView
from .views import *
urlpatterns = patterns('',
url(r'^$', RedirectView.as_view(
url='/', permanent=True), name='store_index'),

@ -94,9 +94,9 @@ class CategoryView(CategoryBaseView, TemplateView):
preordered_qs = self.products_qs.extra(
select={
'price_min':
'SELECT MIN(price) FROM store_productvariation ' +
'WHERE store_productvariation.product_id ' +
'= store_product.id'
'SELECT MIN(price) FROM store_productvariation ' +
'WHERE store_productvariation.product_id ' +
'= store_product.id'
})
self.products_qs = preordered_qs.order_by(sort_parameter)
@ -125,7 +125,6 @@ class ProductView(CategoryBaseView, DetailView):
class CartAddView(RedirectView):
def dispatch(self, request, *args, **kwargs):
retval = super(CartAddView, self).dispatch(request, args, kwargs)
cart = Cart(self.request)
@ -145,7 +144,6 @@ class CartAddView(RedirectView):
class CartRemoveView(RedirectView):
def dispatch(self, request, *args, **kwargs):
retval = super(CartRemoveView, self).dispatch(request, args, kwargs)
cart = Cart(self.request)

@ -1,15 +1,15 @@
[uwsgi]
plugins=python
virtualenv=/srv/BatiskafENV
chdir=/srv/BatiskafENV/batiskaf
module=batiskaf.wsgi:application
master=True
plugins = python
virtualenv = /srv/BatiskafENV
chdir = /srv/BatiskafENV/batiskaf
module = batiskaf.wsgi:application
master = True
#pidfile=/srv/MSEEnv/mse/master.pid
vacuum=True
socket=/srv/BatiskafENV/batiskaf/master.sock
vacuum = True
socket = /srv/BatiskafENV/batiskaf/master.sock
wsgi_file = /srv/BatiskafENV/batiskaf/batiskaf/wsgi.py
autoload = true
max-requests=2000
processes=1
harakiri=20
chmod-socket=666
max-requests = 2000
processes = 1
harakiri = 20
chmod-socket = 666

Loading…
Cancel
Save