From 6207fe6c6d5395d05e1ca8574e5d5d33fd20c171 Mon Sep 17 00:00:00 2001 From: Ivlev Denis Date: Wed, 25 Apr 2018 11:14:11 +0300 Subject: [PATCH] LIL-419. Revert galery & teachers blocks on main page --- .../blocks/{authors.html => teachers.html} | 16 ++++++++-------- project/templates/lilcity/main.html | 2 ++ project/views.py | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) rename project/templates/blocks/{authors.html => teachers.html} (73%) diff --git a/project/templates/blocks/authors.html b/project/templates/blocks/teachers.html similarity index 73% rename from project/templates/blocks/authors.html rename to project/templates/blocks/teachers.html index 90a488ef..485359ed 100644 --- a/project/templates/blocks/authors.html +++ b/project/templates/blocks/teachers.html @@ -9,22 +9,22 @@
- {% for author in authors %} + {% for teacher in teachers %}
- {% if author.photo %} - {% else %} + {% if teacher.photo %} + {% else %} {% endif %}
-
{{ author.get_full_name }}, +
{{ teacher.get_full_name }}, #lil_персонаж
- {% if author.instagram %} -
{{ author.instagram }}
- {% endif %} {% if author.about %} + {% if teacher.instagram %} +
{{ teacher.instagram }}
+ {% endif %} {% if teacher.about %}
- {{ author.about }} + {{ teacher.about }}
{% endif %}
diff --git a/project/templates/lilcity/main.html b/project/templates/lilcity/main.html index fc4da5fd..8f4d4b38 100644 --- a/project/templates/lilcity/main.html +++ b/project/templates/lilcity/main.html @@ -8,6 +8,8 @@ {% include "templates/blocks/advantages.html" %} {% include "templates/blocks/arts.html" %} {% include "templates/blocks/last_courses.html" %} + {% include "templates/blocks/gallery.html" %} {% include "templates/blocks/game.html" %} + {% include "templates/blocks/teachers.html" %} {% include "templates/blocks/partners.html" %} {% endblock content %} diff --git a/project/views.py b/project/views.py index 1b1b01f0..9998a27a 100644 --- a/project/views.py +++ b/project/views.py @@ -35,7 +35,7 @@ class IndexView(TemplateView): 'course_items': Course.objects.filter(status=Course.PUBLISHED)[:6], 'school_schedules': SchoolSchedule.objects.all(), 'min_school_price': SchoolSchedule.objects.all().aggregate(Min('month_price'))['month_price__min'], - 'authors': User.objects.filter(role=User.AUTHOR_ROLE, show_in_mainpage=True), + 'teachers': User.objects.filter(role=User.TEACHER_ROLE, show_in_mainpage=True), }) return context