You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.1 KiB
29 lines
1.1 KiB
# Generated by Django 2.0.1 on 2018-01-29 14:07
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('course', '0005_course_from_author'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Lesson',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('title', models.CharField(max_length=100, verbose_name='Название урока')),
|
|
('short_description', models.TextField(verbose_name='Краткое описание курса')),
|
|
('cover', models.ImageField(upload_to='lessons', verbose_name='Фон урока')),
|
|
('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lessons', to='course.Course')),
|
|
],
|
|
options={
|
|
'verbose_name': 'Урок',
|
|
'verbose_name_plural': 'Уроки',
|
|
'ordering': ('-title',),
|
|
},
|
|
),
|
|
]
|
|
|