Настроить на DEV нормальную работу курсов

remotes/origin/ga-ecommerce-gleb
gzbender 6 years ago
parent 6ddffe6540
commit a928a6cb3a
  1. 10
      apps/auth/views.py
  2. 5
      project/templates/blocks/partners.html
  3. 2
      project/templates/blocks/students.html
  4. 8
      project/templates/lilcity/home.html
  5. BIN
      web/src/img/girl-brushes.jpg
  6. BIN
      web/src/img/uni_mitsubishi.png
  7. 17
      web/src/sass/_common.sass

@ -26,6 +26,8 @@ from .forms import LearnerRegistrationForm
from .tokens import verification_email_token
User = get_user_model()
import logging
logger_roistat = logging.getLogger('roistat')
class LearnerRegistrationView(FormView):
@ -39,11 +41,14 @@ class LearnerRegistrationView(FormView):
last_name = form.cleaned_data['last_name']
email = form.cleaned_data['email'].lower()
password = form.cleaned_data['password']
logger_roistat.debug('start registration %s' % email)
user, created = User.objects.get_or_create(
email=email,
)
logger_roistat.debug('user created %s' % created)
if not created:
if self.request.is_ajax():
return JsonResponse({
@ -61,13 +66,16 @@ class LearnerRegistrationView(FormView):
user.set_password(password)
user.save()
logger_roistat.debug('user saved, id %s' % user.id)
referrer = self.request.session.get('referrer')
if referrer:
logger_roistat.debug('referrer %s' % referrer)
Referral.objects.create(referral=user, referrer_id=referrer, bonus=config.REFERRAL_BONUS,
referrer_bonus=config.REFERRER_BONUS)
# TODO: email admins? мб реферера уже нет, старая ссылка
self.request.session['referrer'] = None
login(self.request, user)
logger_roistat.debug('login ok')
# fixme: change email text
# fixme: async send email
@ -75,7 +83,9 @@ class LearnerRegistrationView(FormView):
http_referer = str(http_referer[0]) + '://' + str(http_referer[1])
token = verification_email_token.make_token(user)
url = http_referer + str(reverse_lazy('lilcity:verification-email', args=[token, user.id]))
logger_roistat.debug('now send email')
send_email('Вы успешно прошли регистрацию', email, "notification/email/verification_email.html", url=url, config=config)
logger_roistat.debug('email sent, end reg')
if self.request.is_ajax():
return JsonResponse({"success": True}, status=201)

@ -37,6 +37,11 @@
<img class="partners__pic" src="{% static 'img/gamma.png' %}">
</a>
</div>
<div class="partners__item">
<a target="_blank" href="http://unipen.ru/">
<img class="partners__pic" src="{% static 'img/uni_mitsubishi.png' %}">
</a>
</div>
</div>
</div>
</div>

@ -23,7 +23,7 @@
<div class="section__quote-name">Злата Пыльцина, 7 лет. Город Волгоград.</div>
</div>
<div class="section__buttons">
<a class="btn js-video-modal" style="width: auto;"
<a class="btn js-video-modal"
data-video-url="https://www.youtube.com/watch?v=QrlR5sL_eGI"
href="#">Видео отзыв</a>
</div>

@ -10,6 +10,14 @@
{% endif %}
{% endblock ogdescription %}
{% block head %}
<style>
.section_main .title {
font-weight: bold;
}
</style>
{% endblock head %}
{% block title %}Lil School{% endblock title %}
{% block body_attr %}class="main-page"{% endblock body_attr %}
{% block content %}

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

@ -1158,12 +1158,12 @@ a[name]
padding-bottom: 0
&_students &__column_img
background-image: url(/static/img/zlata.png)
background-image: url(/static/img/girl-brushes.jpg)
height: 400px
background-position: bottom center
+m
height: auto
flex: 195px
&_students &__center:nth-child(1)
+m
@ -1174,11 +1174,17 @@ a[name]
+m
margin-top: 0
flex-direction: column-reverse
&_students &__center:nth-child(2) &__column_text
+m
padding: 0 0 0 10px
&_students .btn
width: auto
+m
width: 225px
&_course .go
flex-wrap: wrap
@ -1190,6 +1196,7 @@ a[name]
+m
font-size: 14px
padding: 55px 35px 100px 150px
&:before
background-image: url(/static/img/bubble-icon.svg?196dc3af196a)
@ -1203,12 +1210,14 @@ a[name]
top: -3%
z-index: -1
+m
width: 90%;
left: 15%
width: 73%
left: 20%
top: 10%
& &-text
margin-bottom: 20px
+m
margin-bottom: 15px
& &-name
text-decoration: underline

Loading…
Cancel
Save