diff --git a/apps/course/migrations/0019_auto_20180130_1630.py b/apps/course/migrations/0019_auto_20180130_1630.py new file mode 100644 index 00000000..d9e99a77 --- /dev/null +++ b/apps/course/migrations/0019_auto_20180130_1630.py @@ -0,0 +1,23 @@ +# Generated by Django 2.0.1 on 2018-01-30 16:30 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('course', '0018_auto_20180130_1248'), + ] + + operations = [ + migrations.AlterField( + model_name='course', + name='short_description', + field=models.TextField(db_index=True, verbose_name='Краткое описание курса'), + ), + migrations.AlterField( + model_name='course', + name='title', + field=models.CharField(db_index=True, max_length=100, verbose_name='Название курса'), + ), + ] diff --git a/apps/course/models.py b/apps/course/models.py index 42eafe7b..12db9652 100644 --- a/apps/course/models.py +++ b/apps/course/models.py @@ -24,8 +24,8 @@ class Course(models.Model): (2, 'Archived'), ) author = models.ForeignKey(User, on_delete=models.SET_NULL, null=True, blank=True) - title = models.CharField('Название курса', max_length=100) - short_description = models.TextField('Краткое описание курса') + title = models.CharField('Название курса', max_length=100, db_index=True) + short_description = models.TextField('Краткое описание курса', db_index=True) from_author = models.TextField('От автора', default='', null=True, blank=True) cover = models.ImageField('Фон курса', upload_to='courses') price = models.DecimalField('Цена курса', help_text='Если цены нету, то курс бесплатный', max_digits=10, decimal_places=2, null=True, blank=True) diff --git a/apps/course/templates/course/blocks/game.html b/apps/course/templates/course/blocks/game.html new file mode 100644 index 00000000..7a195c8b --- /dev/null +++ b/apps/course/templates/course/blocks/game.html @@ -0,0 +1,14 @@ +{% load static %} + +