parent
e2c46af6a2
commit
8518d915df
10 changed files with 193 additions and 7 deletions
@ -0,0 +1,38 @@ |
||||
# Generated by Django 2.0.7 on 2019-07-30 20:32 |
||||
|
||||
import django.contrib.postgres.fields |
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('content', '0028_auto_20190726_0106'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.CreateModel( |
||||
name='Package', |
||||
fields=[ |
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||||
('price', models.DecimalField(decimal_places=2, max_digits=10)), |
||||
('high_price', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)), |
||||
('description', models.TextField(db_index=True, default='', verbose_name='Описание')), |
||||
('duration', models.PositiveSmallIntegerField()), |
||||
('options', models.TextField(db_index=True, default='', verbose_name='Описание')), |
||||
], |
||||
options={ |
||||
'ordering': ('duration',), |
||||
}, |
||||
), |
||||
migrations.AlterField( |
||||
model_name='banner', |
||||
name='main_banner', |
||||
field=django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(choices=[(1, 'Главная'), (2, 'Курсы'), (3, 'Школа'), (4, 'Пакеты')]), blank=True, default=[], size=None), |
||||
), |
||||
migrations.AlterField( |
||||
model_name='banner', |
||||
name='pages', |
||||
field=django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(choices=[(1, 'Главная'), (2, 'Курсы'), (3, 'Школа'), (4, 'Пакеты')]), blank=True, default=[], size=None), |
||||
), |
||||
] |
||||
@ -0,0 +1,44 @@ |
||||
{% extends "templates/lilcity/index.html" %} |
||||
{% load static %} |
||||
{% load ruplural from plural %} |
||||
|
||||
{% block content %} |
||||
<div class="section"> |
||||
<div class="section__center center"> |
||||
<div class="packages"> |
||||
{% for package in packages %} |
||||
<div class="package"> |
||||
<div class="package__title subtitle"> |
||||
{% if package.duration == 12 %} |
||||
<b>1</b> год |
||||
{% else %} |
||||
<b>{{ package.duration }}</b> {{ package.duration|ruplural:"месяц,месяца,месяцев" }} |
||||
{% endif %} |
||||
</div> |
||||
<div class="package__desc">{{ package.description }}</div> |
||||
<div class="package__price"> |
||||
{{ package.price|floatformat }}р |
||||
{% if package.high_price %} |
||||
<div class="package__high-price"> {{ package.high_price|floatformat }}р </div> |
||||
{% endif %} |
||||
</div> |
||||
<div class="package__options"> |
||||
<b>Включает</b> |
||||
<div>{{ package.options_html|safe }}</div> |
||||
</div> |
||||
<div> |
||||
<a href="#" class="package__btn btn {% if forloop.counter == 2 %}btn_light{% endif %}" |
||||
{% if forloop.counter == 1 %} |
||||
style="background-image: linear-gradient(104deg, #f8f8f8, #fff2f2)" |
||||
{% endif %} |
||||
{% if forloop.counter == 4 %} |
||||
style="background-image: linear-gradient(to bottom, #ffe790, #f9d055 45%, #f9c155); padding: 12px 9px;" |
||||
{% endif %} |
||||
>{% if forloop.counter == 4 %}Вступить в Lil-Клуб{% else %}Купить{% endif %}</a> |
||||
</div> |
||||
</div> |
||||
{% endfor %} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
{% endblock content %} |
||||
Loading…
Reference in new issue