parent
7980b911f1
commit
86214d8e27
16 changed files with 213 additions and 40 deletions
@ -0,0 +1,24 @@ |
|||||||
|
# Generated by Django 2.0.7 on 2019-09-25 17:23 |
||||||
|
|
||||||
|
from django.db import migrations |
||||||
|
import project.utils.db |
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration): |
||||||
|
|
||||||
|
dependencies = [ |
||||||
|
('content', '0030_auto_20190809_0133'), |
||||||
|
] |
||||||
|
|
||||||
|
operations = [ |
||||||
|
migrations.AlterField( |
||||||
|
model_name='banner', |
||||||
|
name='image', |
||||||
|
field=project.utils.db.SafeImageField(upload_to=''), |
||||||
|
), |
||||||
|
migrations.AlterField( |
||||||
|
model_name='imageobject', |
||||||
|
name='image', |
||||||
|
field=project.utils.db.SafeImageField(upload_to='content/imageobject', verbose_name='Изображение'), |
||||||
|
), |
||||||
|
] |
||||||
@ -0,0 +1,19 @@ |
|||||||
|
from django.core.management.base import BaseCommand |
||||||
|
|
||||||
|
from apps.notification.tasks import send_course_access_expire_email |
||||||
|
|
||||||
|
|
||||||
|
class Command(BaseCommand): |
||||||
|
help = 'Send course access expire email' |
||||||
|
|
||||||
|
def add_arguments(self, parser): |
||||||
|
parser.add_argument( |
||||||
|
'--days', |
||||||
|
dest='days', |
||||||
|
type=int, |
||||||
|
help='Days before access expired', |
||||||
|
) |
||||||
|
|
||||||
|
def handle(self, *args, **options): |
||||||
|
send_course_access_expire_email(options.get('days')) |
||||||
|
|
||||||
@ -0,0 +1,26 @@ |
|||||||
|
# Generated by Django 2.0.7 on 2019-09-25 17:23 |
||||||
|
|
||||||
|
from django.conf import settings |
||||||
|
from django.db import migrations, models |
||||||
|
import django.db.models.deletion |
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration): |
||||||
|
|
||||||
|
dependencies = [ |
||||||
|
('course', '0050_auto_20190818_1043'), |
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL), |
||||||
|
('notification', '0002_usernotification_camp_certificate_last_email'), |
||||||
|
] |
||||||
|
|
||||||
|
operations = [ |
||||||
|
migrations.CreateModel( |
||||||
|
name='CourseNotification', |
||||||
|
fields=[ |
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||||||
|
('access_expire_last_email', models.DateTimeField(blank=True, null=True)), |
||||||
|
('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='course.Course')), |
||||||
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), |
||||||
|
], |
||||||
|
), |
||||||
|
] |
||||||
@ -0,0 +1,8 @@ |
|||||||
|
{% load rupluralize from plural %} |
||||||
|
<p>Добрый день, {{ username }}!</p> |
||||||
|
|
||||||
|
<p>Доступ к видеокурсу «{{ course_title }}», который вы приобретали на платформе lil.school, |
||||||
|
заканчивается через {{ access_duration|rupluralize:'день,дня,дней' }}. Если вы ещё не успели пройти этот курс, самое время это сделать. |
||||||
|
По окончании этого срока система автоматически предложит вам продлить доступ к курсу за 50% от его стоимости.</p> |
||||||
|
|
||||||
|
<p>Команда «Lil School».</p> |
||||||
@ -0,0 +1,24 @@ |
|||||||
|
# Generated by Django 2.0.7 on 2019-09-25 17:23 |
||||||
|
|
||||||
|
from django.db import migrations, models |
||||||
|
import django.db.models.deletion |
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration): |
||||||
|
|
||||||
|
dependencies = [ |
||||||
|
('payment', '0038_auto_20190814_1506'), |
||||||
|
] |
||||||
|
|
||||||
|
operations = [ |
||||||
|
migrations.AlterField( |
||||||
|
model_name='userbonus', |
||||||
|
name='payment', |
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='payment.Payment'), |
||||||
|
), |
||||||
|
migrations.AlterField( |
||||||
|
model_name='userbonus', |
||||||
|
name='referral', |
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='user.Referral'), |
||||||
|
), |
||||||
|
] |
||||||
@ -0,0 +1,23 @@ |
|||||||
|
# Generated by Django 2.0.7 on 2019-09-25 17:23 |
||||||
|
|
||||||
|
from django.db import migrations |
||||||
|
import project.utils.db |
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration): |
||||||
|
|
||||||
|
dependencies = [ |
||||||
|
('user', '0034_auto_20190612_1852'), |
||||||
|
] |
||||||
|
|
||||||
|
operations = [ |
||||||
|
migrations.AlterModelOptions( |
||||||
|
name='child', |
||||||
|
options={'ordering': ('id',)}, |
||||||
|
), |
||||||
|
migrations.AlterField( |
||||||
|
model_name='user', |
||||||
|
name='photo', |
||||||
|
field=project.utils.db.SafeImageField(blank=True, null=True, upload_to='users', verbose_name='Фото'), |
||||||
|
), |
||||||
|
] |
||||||
Loading…
Reference in new issue