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.
45 lines
2.1 KiB
45 lines
2.1 KiB
# Generated by Django 2.0.1 on 2018-01-22 11:43
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import django.db.models.manager
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Category',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('title', models.CharField(max_length=100, verbose_name='Название категории')),
|
|
],
|
|
managers=[
|
|
('manager', django.db.models.manager.Manager()),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Course',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('created_at', models.DateTimeField(auto_created=True)),
|
|
('title', models.CharField(max_length=100, verbose_name='Название курса')),
|
|
('short_description', models.TextField(verbose_name='Краткое описание курса')),
|
|
('background', models.ImageField(upload_to='courses', verbose_name='Фон курса')),
|
|
('price', models.DecimalField(blank=True, decimal_places=2, help_text='Если цены нету, то курс бесплатный', max_digits=10, null=True, verbose_name='Цена курса')),
|
|
('is_highlighted', models.BooleanField(default=False)),
|
|
('deferred_start', models.DateTimeField(blank=True, help_text='Заполнить если курс отложенный', null=True, verbose_name='Отложенный запуск курса')),
|
|
('update_at', models.DateTimeField(auto_now=True)),
|
|
('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='course.Category')),
|
|
],
|
|
options={
|
|
'verbose_name': 'Курс',
|
|
'verbose_name_plural': 'Курсы',
|
|
},
|
|
),
|
|
]
|
|
|