update accounts_ext

remotes/origin/HEAD
Max Yakovenko 8 years ago
parent eb247bd88c
commit ddc0c0dc39
  1. 4
      accounts_ext/models.py
  2. 19
      accounts_ext/utils.py
  3. 14
      blog_ext/urls.py
  4. 10
      templates/bootstrap/forms/cart_checkout.html
  5. 0
      templates/cart/discount_list.html
  6. 42
      templates/emails/html/admin_order_request.html
  7. 17
      templates/emails/txt/admin_order_request.txt
  8. 1
      templates/landing/home.html
  9. 187
      templates/landing/landing.html
  10. 28
      templates/landing/product_item.html
  11. 0
      templates/pinax/blog/blog_post.html

@ -115,6 +115,10 @@ class Profile(AbstractStatusModel):
def is_complete(self):
return self.first_name and self.last_name and self.patronymic and self.birthday
@property
def full_name(self):
return "".join([self.first_name or "", " ", self.last_name or "", " ", self.patronymic or ""])
class Meta:
verbose_name = _('профиль')
verbose_name_plural = _('профили')

@ -1,20 +1 @@
def get_ballances(user):
res = {}
if user:
for wallet in user.wallet_set.all():
info = '%.8f' % wallet.amount
if wallet.amount_blocked:
info += ' (%.8f)' % wallet.amount_blocked
res[wallet.currency.iso] = info
return res
def get_ballances_decimal(user):
res = {}
if user:
for wallet in user.wallet_set.all():
info = wallet.amount
blocked = wallet.amount_blocked
res[wallet.currency.iso] = (info, blocked)
return res

@ -0,0 +1,14 @@
from django.urls import re_path
from . import views
urlpatterns = [
re_path(r'^login/$', views.LoginView.as_view(), name='login'),
re_path(r'^logout/$', views.LogoutView.as_view(), name='logout'),
re_path(r'^register/$', views.RegistrationView.as_view(), name='register'),
re_path(r'^register/done/$', views.RegistrationDoneView.as_view(), name='register_done'),
re_path(r'^password/reset/$', views.ResetPasswordView.as_view(), name='reset_password'),
re_path(r'^password/reset/done/$', views.ResetPasswordDoneView.as_view(), name='reset_password_done'),
re_path(r'^password/reset/change/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$', views.ResetPasswordConfirmView.as_view(), name='reset_password_change'),
re_path(r'^password/reset/complete/$', views.ResetPasswordCompleteView.as_view(), name='reset_password_complete')
]

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>$Title$</title>
</head>
<body>
$END$
</body>
</html>

@ -0,0 +1,42 @@
{% extends 'email_base.html' %}
{% block title %}
Вам пришел заказ
{% endblock title %}
{% block email_body %}
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<p>Пользователь <a href="mailto:{{ order.user.email }}">{{ order.user.profile.full_name|default_if_none:order.user.username }}</a> сделал вам заказ</p>
<p>Заказ № {{ order.order_code }} </p>
<table border="0" cellpadding="0" cellspacing="0" class="btn btn-primary">
<tbody>
<tr>
<td align="left">
<table border="0" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>
Товар
</th>
<th>Колличество</th>
</tr>
</thead>
<tbody>
{% for buying in order.buyings_set %}
<tr>
<td><a href="{{ site.domain }}{% url 'products:product_details' %}">{{ buying.offer.product.name }}</a></td>
<td>{{ buying.amount }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p>С уважением, Администрация сайта {{ site.name }}</p>
</td>
</tr>
</table>
{% endblock email_body %}

@ -0,0 +1,17 @@
=====================================================================
Запрос на обратную связь от пользователя
=====================================================================
----------------------------------------------------------------------
Пользователь {{ name }} отправил вам запрос по продукту {{ subject }}.
Чтобы связаяться для уточнения информации.
Используйте следующий почтовый ящик <a href="mailto:{{ email }}">{{ email }}</a> для ответа.
{% if phone %}
Либо используйте мобильный номер телефона <a href="tel:{{ phone }}">{{ phone }}</a> .
{% endif %}
----------------------------------------------------------------------

@ -1,187 +0,0 @@
{% extends 'base.html' %}
{% load static %}
{% block title %}
News
{% endblock %}
{% block content %}
<div class="row">
<div class="col-12">
<div class="content">
<div class="content__title">Новости</div>
<div class="news">
<div class="news__item">
<div class="row">
<div class="col-md-4 col-12">
<div class="news__image"><img src="./img/test-b.png" alt=""></div>
</div>
<div class="col-lg-6 col-md-8 col-12">
<div class="news__content">
<div class="news__title"><a href="#">Новость 1</a></div>
<div class="news__text">
<p>It is a long established fact that a reader will be distracted by the
readable
content of a page when looking at its layout. The point of using Lorem
Ipsum is
that
it has a more-or-less normal distribution of letters, as opposed to
using
'Content
here, content here', making it look like readable English. Many desktop
publishing
packages and web page editors now use Lorem Ipsum as their default model
text,
and a
search for 'lorem ipsum' will uncover many web sites still in their
infancy.
Various
versions have evolved over the years, sometimes by accident, sometimes
on
purpose
(injected humour and the like).</p>
</div>
</div>
</div>
</div>
</div>
<div class="news__item">
<div class="row">
<div class="col-md-4 col-12">
<div class="news__image"><img src="./img/test-b.png" alt=""></div>
</div>
<div class="col-lg-6 col-md-8 col-12">
<div class="news__content">
<div class="news__title"><a href="#">Новость 1</a></div>
<div class="news__text">
<p>It is a long established fact that a reader will be distracted by the
readable
content of a page when looking at its layout. The point of using Lorem
Ipsum is
that
it has a more-or-less normal distribution of letters, as opposed to
using
'Content
here, content here', making it look like readable English. Many desktop
publishing
packages and web page editors now use Lorem Ipsum as their default model
text,
and a
search for 'lorem ipsum' will uncover many web sites still in their
infancy.
Various
versions have evolved over the years, sometimes by accident, sometimes
on
purpose
(injected humour and the like).</p>
</div>
</div>
</div>
</div>
</div>
<div class="news__item">
<div class="row">
<div class="col-md-4 col-12">
<div class="news__image"><img src="./img/test-b.png" alt=""></div>
</div>
<div class="col-lg-6 col-md-8 col-12">
<div class="news__content">
<div class="news__title"><a href="#">Новость 1</a></div>
<div class="news__text">
<p>It is a long established fact that a reader will be distracted by the
readable
content of a page when looking at its layout. The point of using Lorem
Ipsum is
that
it has a more-or-less normal distribution of letters, as opposed to
using
'Content
here, content here', making it look like readable English. Many desktop
publishing
packages and web page editors now use Lorem Ipsum as their default model
text,
and a
search for 'lorem ipsum' will uncover many web sites still in their
infancy.
Various
versions have evolved over the years, sometimes by accident, sometimes
on
purpose
(injected humour and the like).</p>
</div>
</div>
</div>
</div>
</div>
<div class="news__item">
<div class="row">
<div class="col-md-4 col-12">
<div class="news__image"><img src="./img/test-b.png" alt=""></div>
</div>
<div class="col-lg-6 col-md-8 col-12">
<div class="news__content">
<div class="news__title"><a href="#">Новость 1</a></div>
<div class="news__text">
<p>It is a long established fact that a reader will be distracted by the
readable
content of a page when looking at its layout. The point of using Lorem
Ipsum is
that
it has a more-or-less normal distribution of letters, as opposed to
using
'Content
here, content here', making it look like readable English. Many desktop
publishing
packages and web page editors now use Lorem Ipsum as their default model
text,
and a
search for 'lorem ipsum' will uncover many web sites still in their
infancy.
Various
versions have evolved over the years, sometimes by accident, sometimes
on
purpose
(injected humour and the like).</p>
</div>
</div>
</div>
</div>
</div>
<div class="news__item">
<div class="row">
<div class="col-md-4 col-12">
<div class="news__image"><img src="./img/test-b.png" alt=""></div>
</div>
<div class="col-lg-6 col-md-8 col-12">
<div class="news__content">
<div class="news__title"><a href="#">Новость 1</a></div>
<div class="news__text">
<p>It is a long established fact that a reader will be distracted by the
readable
content of a page when looking at its layout. The point of using Lorem
Ipsum is
that
it has a more-or-less normal distribution of letters, as opposed to
using
'Content
here, content here', making it look like readable English. Many desktop
publishing
packages and web page editors now use Lorem Ipsum as their default model
text,
and a
search for 'lorem ipsum' will uncover many web sites still in their
infancy.
Various
versions have evolved over the years, sometimes by accident, sometimes
on
purpose
(injected humour and the like).</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

@ -1,28 +0,0 @@
<div class="col-lg-3">
<div class="product-item">
<div>
<a href="{% url 'products' product_image.product.id %}">
<img src="{{ product_image.image.url }}" class="img-responsive">
</a>
</div>
{% if product_image.product.discount %}
<div class="discount-container">
<span>{{ product_image.product.discount }}%</span>
</div>
{% endif %}
<h4>{{ product_image.product.name }}</h4>
<p>
{{ product_image.product.description|truncatechars_html:30 }}
</p>
<div>
{{ product_image.product.price }} RUB
</div>
<div class="add-to-card-btn">
<button class="btn btn-success">
Add to basket
</button>
</div>
</div>
</div>
Loading…
Cancel
Save