|
|
|
|
@ -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) |
|
|
|
|
|