예제 #1
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Standard',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('slug', models.SlugField(blank=True, null=True)),
                ('description', models.TextField(blank=True, max_length=500)),
            ],
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subject_id', models.CharField(max_length=100, unique=True)),
                ('name', models.CharField(max_length=100)),
                ('slug', models.SlugField(blank=True, null=True)),
                ('image', models.ImageField(blank=True, upload_to=curriculum.models.save_subject_image, verbose_name='Subject Image')),
                ('description', models.TextField(blank=True, max_length=500)),
                ('standard', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subjects', to='curriculum.standard')),
            ],
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('lesson_id', models.CharField(max_length=100, unique=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('name', models.CharField(max_length=250)),
                ('position', models.PositiveSmallIntegerField(verbose_name='Chapter no.')),
                ('slug', models.SlugField(blank=True, null=True)),
                ('video', models.FileField(blank=True, null=True, upload_to=curriculum.models.save_lesson_files, verbose_name='Video')),
                ('ppt', models.FileField(blank=True, upload_to=curriculum.models.save_lesson_files, verbose_name='Presentations')),
                ('Notes', models.FileField(blank=True, upload_to=curriculum.models.save_lesson_files, verbose_name='Notes')),
                ('Standard', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='curriculum.standard')),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lessons', to='curriculum.subject')),
            ],
            options={
                'ordering': ['position'],
            },
        ),
    ]
예제 #2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('mission_control', '0020_delete_rover'),
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='State',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('progress', models.SmallIntegerField(choices=[(1, 'AVAILABLE'), (2, 'UNAVAILABLE'), (3, 'IN_PROGRESS'), (4, 'COMPLETE')], default=curriculum.models.ProgressState(1))),
            ],
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sequence_number', models.PositiveSmallIntegerField()),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lessons', to='curriculum.Course')),
                ('reference', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='reference_of', to='mission_control.BlockDiagram')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('curriculum', '0002_auto_20180527_1715'),
    ]

    operations = [
        migrations.CreateModel(
            name='LessonFeedback',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('overall_rating', curriculum.models.FiveStarRatingField(choices=[(1, 'One star'), (2, 'Two stars'), (3, 'Three stars'), (4, 'Four stars'), (5, 'Five stars')])),
                ('strengths', models.TextField(max_length=2500)),
                ('weaknesses', models.TextField(max_length=2500)),
                ('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='WebsiteFeedback',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('overall_rating', curriculum.models.FiveStarRatingField(choices=[(1, 'One star'), (2, 'Two stars'), (3, 'Three stars'), (4, 'Four stars'), (5, 'Five stars')])),
                ('strengths', models.TextField(max_length=2500)),
                ('weaknesses', models.TextField(max_length=2500)),
            ],
        ),
        migrations.AddField(
            model_name='lessonplan',
            name='feedback_enabled',
            field=models.BooleanField(default=True),
        ),
        migrations.AddField(
            model_name='lessonfeedback',
            name='lesson',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='curriculum.LessonPlan'),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=250)),
                ('position', models.PositiveSmallIntegerField()),
                ('slug', models.SlugField()),
                ('image',
                 models.ImageField(blank=True,
                                   upload_to='images/',
                                   verbose_name='Images')),
                ('video',
                 models.FileField(blank=True,
                                  upload_to='images/',
                                  verbose_name='Video')),
                ('ppt',
                 models.FileField(blank=True,
                                  upload_to='images/',
                                  verbose_name='Presentations')),
                ('Notes',
                 models.FileField(blank=True,
                                  upload_to='images/',
                                  verbose_name='Notes')),
            ],
        ),
        migrations.CreateModel(
            name='Standard',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('slug', models.SlugField()),
            ],
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('slug', models.SlugField()),
                ('lesson',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='curriculum.lesson')),
                ('standard',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='curriculum.standard')),
            ],
        ),
    ]
예제 #5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='LessonPlan',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=120, unique=True)),
                ('grade_level',
                 models.CharField(choices=[('ES', 'Elementary School'),
                                           ('MS', 'Middle School'),
                                           ('HS', 'High School')],
                                  max_length=2)),
                ('prep_time', models.DurationField()),
                ('class_time', models.DurationField()),
                ('summary', models.CharField(max_length=2000)),
                ('materials', models.CharField(max_length=2000)),
                ('owner',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='LessonResource',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=60)),
                ('type',
                 models.SmallIntegerField(
                     choices=[(0, 'Student handout'), (
                         1, 'Teacher reference'), (2, 'Slides'), (
                             3, 'Code'), (4, 'Schematic')])),
                ('file',
                 models.FileField(
                     upload_to=curriculum.models.user_upload_directory)),
                ('owner',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=60)),
            ],
        ),
        migrations.AddField(
            model_name='lessonplan',
            name='resources',
            field=models.ManyToManyField(blank=True,
                                         to='curriculum.LessonResource'),
        ),
        migrations.AddField(
            model_name='lessonplan',
            name='tags',
            field=models.ManyToManyField(blank=True, to='curriculum.Tag'),
        ),
    ]