diff --git a/apps/course/migrations/0005_course_from_author.py b/apps/course/migrations/0005_course_from_author.py new file mode 100644 index 00000000..cd9d330d --- /dev/null +++ b/apps/course/migrations/0005_course_from_author.py @@ -0,0 +1,18 @@ +# Generated by Django 2.0.1 on 2018-01-29 09:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('course', '0004_auto_20180128_1311'), + ] + + operations = [ + migrations.AddField( + model_name='course', + name='from_author', + field=models.TextField(default='', verbose_name='От автора'), + ), + ] diff --git a/apps/course/models.py b/apps/course/models.py index 1074bdd7..7c7ba259 100644 --- a/apps/course/models.py +++ b/apps/course/models.py @@ -24,6 +24,7 @@ class Course(models.Model): author = models.ForeignKey(User, on_delete=models.SET_NULL, null=True, blank=True) title = models.CharField("Название курса", max_length=100) short_description = models.TextField("Краткое описание курса") + from_author = models.TextField("От автора", default='') cover = models.ImageField("Фон курса", upload_to='courses') price = models.DecimalField("Цена курса", help_text="Если цены нету, то курс бесплатный", max_digits=10, decimal_places=2, null=True, blank=True) is_infinite = models.BooleanField(default=False) diff --git a/apps/course/templates/course/_items.html b/apps/course/templates/course/_items.html index c6df667b..1caf270b 100644 --- a/apps/course/templates/course/_items.html +++ b/apps/course/templates/course/_items.html @@ -1,6 +1,6 @@ {% load static %}