# Generated by Django 3.0.5 on 2020-11-20 08:07

import ckeditor_uploader.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import my_class.models


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('my_class', '0009_auto_20201120_1031'),
    ]

    operations = [
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=32)),
                ('body', ckeditor_uploader.fields.RichTextUploadingField(blank=True)),
                ('date', models.DateField(auto_now_add=True)),
                ('published_date', models.DateTimeField(blank=True, null=True)),
                ('images', models.ImageField(blank=True, default=None, null=True, upload_to=my_class.models.generate_teacher_filename)),
                ('files', models.FileField(blank=True, default=None, null=True, upload_to=my_class.models.generate_teacher_filename)),
                ('max_mark', models.IntegerField(default=5)),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='class',
            name='tasks',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='my_class.Task'),
        ),
    ]
