コード例 #1
0
class Migration(migrations.Migration):

    dependencies = [
        ('content', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='YearlyArtwork',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, null=True)),
                ('modified', models.DateTimeField(auto_now=True, null=True)),
                ('title', models.CharField(help_text='Title that summarizes your year of artwork.', max_length=255, null=True, verbose_name='Title')),
                ('year', models.PositiveSmallIntegerField(help_text='The year your artwork is referenced too.', null=True, verbose_name='Year')),
                ('cover_image', cloudinary.models.CloudinaryField(help_text='Cover image that encompasses your year of artwork.', max_length=255, null=True, verbose_name='Cover Image')),
            ],
            options={
                'verbose_name': 'Yearly Artwork',
                'verbose_name_plural': 'Yearly Artworks',
            },
        ),
        migrations.DeleteModel(
            name='Work',
        ),
    ]
コード例 #2
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('photo', cloudinary.models.CloudinaryField(max_length=255, verbose_name='images')),
                ('Bio', models.CharField(max_length=30)),
                ('datecreated', models.DateField(auto_now_add=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Projects',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=30)),
                ('description', models.TextField(max_length=300)),
                ('projectscreenshot', cloudinary.models.CloudinaryField(max_length=255, verbose_name='images')),
                ('projecturl', models.URLField()),
                ('datecreated', models.DateField(auto_now_add=True)),
                ('user', models.ForeignKey(default='', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='author', to='aawards.profile')),
            ],
        ),
        migrations.CreateModel(
            name='Revieww',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(auto_now_add=True)),
                ('text', models.TextField(blank=True, max_length=3000)),
                ('design', models.PositiveSmallIntegerField(choices=[(1, '1- Trash'), (2, '2- Horrible'), (3, '3- Terrible'), (4, '4- Bad'), (5, '5- Ok'), (6, '6- Watchable'), (7, '7- Good'), (8, '8- Very Good'), (9, '9- perfect'), (10, '10- Master Piece')], default=0)),
                ('usability', models.PositiveSmallIntegerField(choices=[(1, '1- Trash'), (2, '2- Horrible'), (3, '3- Terrible'), (4, '4- Bad'), (5, '5- Ok'), (6, '6- Watchable'), (7, '7- Good'), (8, '8- Very Good'), (9, '9- perfect'), (10, '10- Master Piece')], default=0)),
                ('content', models.PositiveSmallIntegerField(choices=[(1, '1- Trash'), (2, '2- Horrible'), (3, '3- Terrible'), (4, '4- Bad'), (5, '5- Ok'), (6, '6- Watchable'), (7, '7- Good'), (8, '8- Very Good'), (9, '9- perfect'), (10, '10- Master Piece')], default=0)),
                ('projects', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='aawards.projects')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #3
0
class Migration(migrations.Migration):

    dependencies = [
        ('app_core', '0013_auto_20180305_1135'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='module',
            options={'ordering': ('-course__id', 'sort_index')},
        ),
        migrations.AlterModelOptions(
            name='page',
            options={'ordering': ('-module__id', 'sort_index')},
        ),
        migrations.AlterField(
            model_name='module',
            name='course',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='modules', to='app_core.Course', verbose_name='Course'),
        ),
        migrations.AlterField(
            model_name='module',
            name='sort_index',
            field=models.PositiveSmallIntegerField(validators=[django.core.validators.MinValueValidator(1)], verbose_name='Sort index'),
        ),
        migrations.AlterField(
            model_name='page',
            name='image_file_reference',
            field=cloudinary.models.CloudinaryField(blank=True, max_length=256, verbose_name='Reference to image'),
        ),
        migrations.AlterField(
            model_name='page',
            name='sort_index',
            field=models.PositiveSmallIntegerField(validators=[django.core.validators.MinValueValidator(1)], verbose_name='Sort index'),
        ),
        migrations.AlterField(
            model_name='studentpagenote',
            name='coord',
            field=models.FloatField(blank=True, null=True, verbose_name='Coordinate'),
        ),
    ]
コード例 #4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Work',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True,
                                                 null=True)),
                ('modified', models.DateTimeField(auto_now=True, null=True)),
                ('title',
                 models.CharField(
                     help_text='Title that summarizes the year of work.',
                     max_length=255,
                     null=True,
                     verbose_name='Title')),
                ('year',
                 models.PositiveSmallIntegerField(help_text='Year of work',
                                                  null=True,
                                                  verbose_name='Year')),
                ('cover_image',
                 cloudinary.models.CloudinaryField(
                     blank=True,
                     help_text='Cover image of work',
                     max_length=255,
                     null=True,
                     verbose_name='Cover Image')),
                ('slug',
                 models.SlugField(blank=True,
                                  max_length=255,
                                  unique=True,
                                  verbose_name='Slug')),
            ],
            options={
                'verbose_name_plural': 'Works',
                'verbose_name': 'Work',
            },
        ),
    ]
コード例 #5
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', cloudinary.models.CloudinaryField(max_length=255, verbose_name='gallery/')),
                ('title', models.CharField(max_length=30)),
                ('description', models.CharField(max_length=400)),
                ('url', models.URLField(max_length=400)),
                ('category', models.CharField(max_length=40)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('photo', cloudinary.models.CloudinaryField(default='default.jpeg', max_length=255, verbose_name='gallery/')),
                ('bio', models.CharField(max_length=300)),
                ('name', models.CharField(blank=True, max_length=120)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-pk'],
            },
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('review', models.TextField(blank=True, max_length=500)),
                ('design', models.PositiveSmallIntegerField(choices=[(1, '1'), (2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6'), (7, '7'), (8, '8'), (9, '9'), (10, '10')])),
                ('usability', models.PositiveSmallIntegerField(choices=[(1, '1'), (2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6'), (7, '7'), (8, '8'), (9, '9'), (10, '10')])),
                ('content', models.PositiveSmallIntegerField(choices=[(1, '1'), (2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6'), (7, '7'), (8, '8'), (9, '9'), (10, '10')])),
                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='review', to='awwards.post')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='review', to='awwards.profile')),
            ],
            options={
                'ordering': ['-pk'],
            },
        ),
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('design', models.IntegerField(choices=[(1, '1'), (2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6'), (7, '7'), (8, '8'), (9, '9'), (10, '10')])),
                ('usability', models.IntegerField(choices=[(1, '1'), (2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6'), (7, '7'), (8, '8'), (9, '9'), (10, '10')])),
                ('content', models.IntegerField(choices=[(1, '1'), (2, '2'), (3, '3'), (4, '4'), (5, '5'), (6, '6'), (7, '7'), (8, '8'), (9, '9'), (10, '10')])),
                ('total', models.FloatField(blank=True, default=0)),
                ('post', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rating', to='awwards.post')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rating', to='awwards.profile')),
            ],
        ),
        migrations.AddField(
            model_name='post',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='post', to='awwards.profile'),
        ),
    ]
コード例 #6
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Food',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('food_name',
                 models.CharField(default='default_food', max_length=50)),
                ('protein', models.FloatField()),
                ('fat', models.FloatField()),
                ('carb', models.FloatField()),
                ('salt', models.FloatField()),
                ('energy', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
            ],
        ),
        migrations.CreateModel(
            name='Receipt',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('receipt_date',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('image',
                 models.OneToOneField(
                     default=0,
                     on_delete=django.db.models.deletion.CASCADE,
                     to='receiptapp.Image')),
                ('user',
                 models.ForeignKey(default=0,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Fooddetail',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('amount', models.PositiveSmallIntegerField()),
                ('food',
                 models.ForeignKey(default=0,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='receiptapp.Food')),
                ('receipt',
                 models.ForeignKey(default=0,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='receiptapp.Receipt')),
            ],
        ),
    ]
コード例 #7
0
class Migration(migrations.Migration):

    dependencies = [
        ('content', '0005_auto_20180918_2313'),
    ]

    operations = [
        migrations.CreateModel(
            name='ArtworkDetail',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 cloudinary.models.CloudinaryField(
                     max_length=255, null=True, verbose_name='Artwork Image')),
                ('name',
                 models.CharField(max_length=255,
                                  null=True,
                                  verbose_name='Artwork Name')),
                ('location',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='Artwork Location')),
                ('material',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='Artwork Material')),
                ('dimensions',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='Artwork Dimensions')),
            ],
            options={
                'verbose_name_plural': 'Artwork Details',
                'ordering': ['-artwork_year'],
                'verbose_name': 'Artwork Detail',
            },
        ),
        migrations.CreateModel(
            name='ArtworkYear',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True,
                                                 null=True)),
                ('modified', models.DateTimeField(auto_now=True, null=True)),
                ('cover_title',
                 models.CharField(
                     help_text='Title that summarizes your year of artwork.',
                     max_length=255,
                     null=True,
                     verbose_name='Cover Title')),
                ('year',
                 models.PositiveSmallIntegerField(
                     choices=[(2000, '2000'), (2001, '2001'), (2002, '2002'),
                              (2003, '2003'), (2004, '2004'), (2005, '2005'),
                              (2006, '2006'), (2007, '2007'), (2008, '2008'),
                              (2009, '2009'), (2010, '2010'), (2011, '2011'),
                              (2012, '2012'), (2013, '2013'), (2014, '2014'),
                              (2015, '2015'), (2016, '2016'), (2017, '2017'),
                              (2018, '2018'), (2019, '2019'), (2020, '2020'),
                              (2021, '2021'), (2022, '2022'), (2023, '2023'),
                              (2024, '2024'), (2025, '2025'), (2026, '2026'),
                              (2027, '2027'), (2028, '2028'), (2029, '2029'),
                              (2030, '2030'), (2031, '2031'), (2032, '2032'),
                              (2033, '2033'), (2034, '2034'), (2035, '2035'),
                              (2036, '2036'), (2037, '2037'), (2038, '2038'),
                              (2039, '2039'), (2040, '2040'), (2041, '2041'),
                              (2042, '2042'), (2043, '2043'), (2044, '2044'),
                              (2045, '2045'), (2046, '2046'), (2047, '2047'),
                              (2048, '2048'), (2049, '2049'), (2050, '2050'),
                              (2051, '2051'), (2052, '2052'), (2053, '2053'),
                              (2054, '2054'), (2055, '2055'), (2056, '2056'),
                              (2057, '2057'), (2058, '2058'), (2059, '2059'),
                              (2060, '2060'), (2061, '2061'), (2062, '2062'),
                              (2063, '2063'), (2064, '2064'), (2065, '2065'),
                              (2066, '2066'), (2067, '2067'), (2068, '2068')],
                     help_text='The year your artworks will be referenced too.',
                     null=True,
                     verbose_name='Year')),
                ('cover_image',
                 cloudinary.models.CloudinaryField(
                     help_text=
                     'Cover image that encompasses your year of artwork.',
                     max_length=255,
                     null=True,
                     verbose_name='Cover Image')),
                ('is_active',
                 models.BooleanField(default=True, verbose_name='Active?')),
            ],
            options={
                'verbose_name_plural': 'Artwork Years',
                'verbose_name': 'Artwork Year',
            },
        ),
        migrations.RemoveField(
            model_name='yearlyartworkdetail',
            name='yearly_artwork',
        ),
        migrations.DeleteModel(name='YearlyArtwork', ),
        migrations.DeleteModel(name='YearlyArtworkDetail', ),
        migrations.AddField(
            model_name='artworkdetail',
            name='artwork_year',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='years',
                to='content.ArtworkYear',
                verbose_name='Artwork Year'),
        ),
    ]
コード例 #8
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('account', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Announcement',
            fields=[
                ('announcement_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=31)),
                ('body', models.TextField()),
                ('post_date', models.DateField(auto_now_add=True, null=True)),
            ],
            options={
                'db_table': 'at_announcements',
            },
        ),
        migrations.CreateModel(
            name='Assignment',
            fields=[
                ('assignment_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('assignment_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('title', models.CharField(max_length=31, null=True)),
                ('description', models.TextField(null=True)),
                ('start_date', models.DateField(null=True)),
                ('due_date', models.DateField(null=True)),
                ('worth',
                 models.PositiveSmallIntegerField(
                     choices=[(0, '0 %'), (10, '10 %'), (15, '15 %'),
                              (20, '20 %'), (25, '25 %'), (30, '30 %'),
                              (35, '35 %'), (40, '40 %'), (45, '45 %'),
                              (50, '50 %'), (55, '55 %'), (60, '60 %'),
                              (65, '65 %'), (70, '70 %'), (75, '75 %'),
                              (80, '80 %'), (85, '85 %'), (90, '90 %'),
                              (95, '95 %'), (100, '100 %')],
                     default=0,
                     validators=[
                         django.core.validators.MinValueValidator(0),
                         django.core.validators.MaxValueValidator(100)
                     ])),
            ],
            options={
                'db_table': 'at_assignments',
            },
        ),
        migrations.CreateModel(
            name='AssignmentSubmission',
            fields=[
                ('submission_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('percent', models.FloatField(default=0)),
                ('earned_marks', models.FloatField(default=0)),
                ('total_marks', models.PositiveSmallIntegerField(default=0)),
                ('submission_date',
                 models.DateTimeField(auto_now=True, null=True)),
                ('is_finished', models.BooleanField(default=False)),
                ('assignment',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Assignment')),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Student')),
            ],
            options={
                'db_table': 'at_assignment_submissions',
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=150)),
                ('slug', models.SlugField(max_length=150, unique=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('image',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
            ],
            options={
                'verbose_name': 'category',
                'verbose_name_plural': 'categories',
                'ordering': ('name', ),
            },
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=127)),
                ('sub_title', models.CharField(max_length=127)),
                ('description', models.TextField(null=True)),
                ('start_date', models.DateField(null=True)),
                ('finish_date', models.DateField(null=True)),
                ('is_official', models.BooleanField(default=False)),
                ('status', models.PositiveSmallIntegerField(default=0)),
                ('image',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
                ('price',
                 models.DecimalField(blank=True,
                                     decimal_places=2,
                                     default=0.0,
                                     max_digits=7)),
                ('discount_price',
                 models.DecimalField(blank=True,
                                     decimal_places=2,
                                     default=0.0,
                                     max_digits=7)),
                ('category',
                 models.ForeignKey(default='Leadership',
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='courses',
                                   to='registrar.Category')),
                ('students', models.ManyToManyField(to='account.Student')),
                ('teacher',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Teacher')),
            ],
            options={
                'db_table': 'at_courses',
            },
        ),
        migrations.CreateModel(
            name='CourseDiscussionPost',
            fields=[
                ('post_id', models.AutoField(primary_key=True,
                                             serialize=False)),
                ('title', models.CharField(max_length=127)),
                ('text', models.TextField(blank=True, null=True)),
                ('date', models.DateTimeField(auto_now=True, null=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'at_course_discussion_posts',
            },
        ),
        migrations.CreateModel(
            name='CourseDiscussionThread',
            fields=[
                ('thread_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=127)),
                ('text', models.TextField(blank=True, null=True)),
                ('date', models.DateTimeField(auto_now=True, null=True)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Course')),
                ('posts',
                 models.ManyToManyField(to='registrar.CourseDiscussionPost')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'at_course_discussion_threads',
            },
        ),
        migrations.CreateModel(
            name='CourseFinalMark',
            fields=[
                ('credit_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('percent',
                 models.FloatField(
                     default=0,
                     validators=[
                         django.core.validators.MinValueValidator(0),
                         django.core.validators.MaxValueValidator(100)
                     ])),
                ('is_public', models.BooleanField(default=False)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Course')),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Student')),
            ],
            options={
                'db_table': 'at_course_final_marks',
            },
        ),
        migrations.CreateModel(
            name='CourseSetting',
            fields=[
                ('settings_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('final_exam_percent',
                 models.FloatField(
                     default=50,
                     validators=[
                         django.core.validators.MinValueValidator(0),
                         django.core.validators.MaxValueValidator(100)
                     ])),
                ('course_percent',
                 models.FloatField(
                     default=50,
                     validators=[
                         django.core.validators.MinValueValidator(0),
                         django.core.validators.MaxValueValidator(100)
                     ])),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Course')),
            ],
            options={
                'db_table': 'at_course_settings',
            },
        ),
        migrations.CreateModel(
            name='CourseSubmission',
            fields=[
                ('review_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('status', models.PositiveSmallIntegerField(default=2)),
                ('from_submitter', models.TextField(null=True)),
                ('from_reviewer', models.TextField(null=True)),
                ('review_date', models.DateField(auto_now=True, null=True)),
                ('submission_date', models.DateField(auto_now=True,
                                                     null=True)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Course')),
            ],
            options={
                'db_table': 'at_course_submissions',
            },
        ),
        migrations.CreateModel(
            name='EssayQuestion',
            fields=[
                ('question_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('question_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('title', models.CharField(default='', max_length=31)),
                ('description', models.TextField(default='')),
                ('marks',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('assignment',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Assignment')),
            ],
            options={
                'db_table': 'at_essay_questions',
            },
        ),
        migrations.CreateModel(
            name='EssaySubmission',
            fields=[
                ('submission_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('file', models.FileField(upload_to='uploads')),
                ('submission_date',
                 models.DateTimeField(auto_now=True, null=True)),
                ('marks',
                 models.FloatField(
                     default=0,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
                ('question',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.EssayQuestion')),
            ],
            options={
                'db_table': 'at_essay_submissions',
            },
        ),
        migrations.CreateModel(
            name='Exam',
            fields=[
                ('exam_id', models.AutoField(primary_key=True,
                                             serialize=False)),
                ('exam_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('title', models.CharField(max_length=31, null=True)),
                ('description', models.TextField(null=True)),
                ('start_date', models.DateField(null=True)),
                ('due_date', models.DateField(null=True)),
                ('worth',
                 models.PositiveSmallIntegerField(
                     choices=[(0, '0 %'), (10, '10 %'), (15, '15 %'),
                              (20, '20 %'), (25, '25 %'), (30, '30 %'),
                              (35, '35 %'), (40, '40 %'), (45, '45 %'),
                              (50, '50 %'), (55, '55 %'), (60, '60 %'),
                              (65, '65 %'), (70, '70 %'), (75, '75 %'),
                              (80, '80 %'), (85, '85 %'), (90, '90 %'),
                              (95, '95 %'), (100, '100 %')],
                     default=0,
                     validators=[
                         django.core.validators.MinValueValidator(0),
                         django.core.validators.MaxValueValidator(100)
                     ])),
                ('is_final', models.BooleanField(default=False)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='exams',
                                   to='registrar.Course')),
            ],
            options={
                'db_table': 'at_exams',
            },
        ),
        migrations.CreateModel(
            name='ExamSubmission',
            fields=[
                ('submission_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('percent', models.FloatField(default=0)),
                ('earned_marks', models.FloatField(default=0)),
                ('total_marks', models.PositiveSmallIntegerField(default=0)),
                ('submission_date', models.DateField(auto_now=True,
                                                     null=True)),
                ('is_finished', models.BooleanField(default=False)),
                ('exam',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Exam')),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Student')),
            ],
            options={
                'db_table': 'at_exam_submissions',
            },
        ),
        migrations.CreateModel(
            name='FileUpload',
            fields=[
                ('upload_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('type', models.PositiveSmallIntegerField(default=0)),
                ('title', models.CharField(max_length=127, null=True)),
                ('description', models.TextField(null=True)),
                ('upload_date', models.DateField(auto_now=True, null=True)),
                ('file',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   null=True,
                                                   verbose_name='fileupload')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'at_file_uploads',
            },
        ),
        migrations.CreateModel(
            name='Lecture',
            fields=[
                ('lecture_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('lecture_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('week_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('title', models.CharField(default='',
                                           max_length=63,
                                           null=True)),
                ('description', models.TextField(default='', null=True)),
                ('youtube_url', models.URLField(blank=True, null=True)),
                ('vimeo_url', models.URLField(blank=True, null=True)),
                ('bliptv_url', models.URLField(blank=True, null=True)),
                ('preferred_service',
                 models.CharField(choices=[('1', 'YouTube'), ('2', 'Vimeo')],
                                  default='1',
                                  max_length=1)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='lectures',
                                   to='registrar.Course')),
                ('notes', models.ManyToManyField(to='registrar.FileUpload')),
            ],
            options={
                'db_table': 'at_lectures',
            },
        ),
        migrations.CreateModel(
            name='Module',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('module_number',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('module_title', models.CharField(max_length=80)),
                ('module_duration', models.CharField(max_length=191)),
                ('module_description', models.TextField()),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='modules',
                                   to='registrar.Course')),
            ],
            options={
                'db_table': 'at_modules',
            },
        ),
        migrations.CreateModel(
            name='MultipleChoiceQuestion',
            fields=[
                ('question_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('question_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('title',
                 models.CharField(blank=True, default='', max_length=31)),
                ('description', models.TextField(default='')),
                ('a', models.CharField(max_length=255, null=True)),
                ('a_is_correct', models.BooleanField(default=False)),
                ('b', models.CharField(max_length=255, null=True)),
                ('b_is_correct', models.BooleanField(default=False)),
                ('c', models.CharField(blank=True, max_length=255, null=True)),
                ('c_is_correct', models.BooleanField(default=False)),
                ('d', models.CharField(blank=True, max_length=255, null=True)),
                ('d_is_correct', models.BooleanField(default=False)),
                ('e', models.CharField(blank=True, max_length=255, null=True)),
                ('e_is_correct', models.BooleanField(default=False)),
                ('f', models.CharField(blank=True, max_length=255, null=True)),
                ('f_is_correct', models.BooleanField(default=False)),
                ('marks',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('assignment',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Assignment')),
                ('exam',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Exam')),
            ],
            options={
                'db_table': 'at_multiple_choice_questions',
            },
        ),
        migrations.CreateModel(
            name='MultipleChoiceSubmission',
            fields=[
                ('submission_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('a', models.BooleanField(default=False)),
                ('b', models.BooleanField(default=False)),
                ('c', models.BooleanField(default=False)),
                ('d', models.BooleanField(default=False)),
                ('e', models.BooleanField(default=False)),
                ('f', models.BooleanField(default=False)),
                ('marks',
                 models.FloatField(
                     default=0,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
                ('submission_date',
                 models.DateTimeField(auto_now=True, null=True)),
                ('question',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.MultipleChoiceQuestion')),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Student')),
            ],
            options={
                'db_table': 'at_multiple_choice_submissions',
            },
        ),
        migrations.CreateModel(
            name='PeerReview',
            fields=[
                ('review_id',
                 models.AutoField(max_length=11,
                                  primary_key=True,
                                  serialize=False)),
                ('marks',
                 models.PositiveSmallIntegerField(
                     choices=[(0, '0 Star'), (1, '1 Star'), (2, '2 Stars'),
                              (3, '3 Stars'), (4, '4 Stars'), (5, '5 Stars')],
                     default=0,
                     validators=[
                         django.core.validators.MinValueValidator(0),
                         django.core.validators.MaxValueValidator(5)
                     ])),
                ('text', models.TextField(blank=True, null=True)),
                ('date', models.DateTimeField(auto_now=True, null=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'at_peer_reviews',
            },
        ),
        migrations.CreateModel(
            name='Policy',
            fields=[
                ('policy_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('file',
                 cloudinary.models.CloudinaryField(
                     max_length=255, null=True, verbose_name='policyfiles')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Course')),
            ],
            options={
                'db_table': 'at_policys',
            },
        ),
        migrations.CreateModel(
            name='Quick_Overview',
            fields=[
                ('quickoverview_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('description',
                 models.TextField(default='', max_length=60, null=True)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='quickoverview',
                                   to='registrar.Course')),
            ],
            options={
                'db_table': 'at_quickoverview',
            },
        ),
        migrations.CreateModel(
            name='Quiz',
            fields=[
                ('quiz_id', models.AutoField(primary_key=True,
                                             serialize=False)),
                ('quiz_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
                ('title', models.CharField(max_length=31, null=True)),
                ('description', models.TextField(null=True)),
                ('start_date', models.DateField(null=True)),
                ('due_date', models.DateField(null=True)),
                ('worth',
                 models.PositiveSmallIntegerField(
                     choices=[(0, '0 %'), (10, '10 %'), (15, '15 %'),
                              (20, '20 %'), (25, '25 %'), (30, '30 %'),
                              (35, '35 %'), (40, '40 %'), (45, '45 %'),
                              (50, '50 %'), (55, '55 %'), (60, '60 %'),
                              (65, '65 %'), (70, '70 %'), (75, '75 %'),
                              (80, '80 %'), (85, '85 %'), (90, '90 %'),
                              (95, '95 %'), (100, '100 %')],
                     default=0,
                     validators=[
                         django.core.validators.MinValueValidator(0),
                         django.core.validators.MaxValueValidator(100)
                     ])),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Course')),
            ],
            options={
                'db_table': 'at_quizzes',
            },
        ),
        migrations.CreateModel(
            name='QuizSubmission',
            fields=[
                ('submission_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('percent', models.FloatField(default=0)),
                ('earned_marks', models.FloatField(default=0)),
                ('total_marks', models.PositiveSmallIntegerField(default=0)),
                ('submission_date', models.DateField(auto_now=True,
                                                     null=True)),
                ('is_finished', models.BooleanField(default=False)),
                ('quiz',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Quiz')),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Student')),
            ],
            options={
                'db_table': 'at_quiz_submissions',
            },
        ),
        migrations.CreateModel(
            name='ResponseQuestion',
            fields=[
                ('question_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('question_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('title', models.CharField(default='', max_length=31)),
                ('description', models.TextField(default='')),
                ('answer', models.TextField(default='')),
                ('marks',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('assignment',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Assignment')),
                ('exam',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Exam')),
                ('quiz',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Quiz')),
            ],
            options={
                'db_table': 'at_response_questions',
            },
        ),
        migrations.CreateModel(
            name='ResponseSubmission',
            fields=[
                ('submission_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('answer', models.TextField(default='')),
                ('marks',
                 models.FloatField(
                     default=0,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
                ('submission_date',
                 models.DateTimeField(auto_now=True, null=True)),
                ('question',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.ResponseQuestion')),
                ('reviews', models.ManyToManyField(to='registrar.PeerReview')),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Student')),
            ],
            options={
                'db_table': 'at_response_submissions',
            },
        ),
        migrations.CreateModel(
            name='Syllabus',
            fields=[
                ('syllabus_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('file',
                 cloudinary.models.CloudinaryField(
                     max_length=255, null=True, verbose_name='syllabusfiles')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Course')),
            ],
            options={
                'db_table': 'at_syllabus',
            },
        ),
        migrations.CreateModel(
            name='TrueFalseQuestion',
            fields=[
                ('question_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('question_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('title', models.CharField(default='', max_length=31)),
                ('description', models.TextField(default='')),
                ('true_choice', models.CharField(max_length=127, null=True)),
                ('false_choice', models.CharField(max_length=127, null=True)),
                ('answer', models.BooleanField(default=False)),
                ('marks',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('assignment',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Assignment')),
                ('exam',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Exam')),
                ('quiz',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Quiz')),
            ],
            options={
                'db_table': 'at_true_false_questions',
            },
        ),
        migrations.CreateModel(
            name='TrueFalseSubmission',
            fields=[
                ('submission_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('answer', models.BooleanField(default=False)),
                ('submission_date',
                 models.DateTimeField(auto_now=True, null=True)),
                ('marks',
                 models.FloatField(
                     default=0,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
                ('question',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.TrueFalseQuestion')),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Student')),
            ],
            options={
                'db_table': 'at_true_false_submissions',
            },
        ),
        migrations.CreateModel(
            name='Unit',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('unit_number',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('unit_title', models.CharField(max_length=191)),
                ('unit_description', models.TextField()),
                ('module',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='units',
                                   to='registrar.Module')),
            ],
            options={
                'db_table': 'at_units',
            },
        ),
        migrations.AddField(
            model_name='multiplechoicequestion',
            name='quiz',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='registrar.Quiz'),
        ),
        migrations.AddField(
            model_name='essaysubmission',
            name='reviews',
            field=models.ManyToManyField(to='registrar.PeerReview'),
        ),
        migrations.AddField(
            model_name='essaysubmission',
            name='student',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='account.Student'),
        ),
        migrations.AddField(
            model_name='essayquestion',
            name='exam',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='registrar.Exam'),
        ),
        migrations.AddField(
            model_name='essayquestion',
            name='quiz',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='registrar.Quiz'),
        ),
        migrations.AddField(
            model_name='assignment',
            name='course',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='registrar.Course'),
        ),
        migrations.AddField(
            model_name='announcement',
            name='course',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='registrar.Course'),
        ),
    ]
コード例 #9
0
ファイル: 0001_initial.py プロジェクト: EUGINELETHAL/ICYLMS
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Announcement',
            fields=[
                ('announcement_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=31)),
                ('body', models.TextField()),
                ('post_date', models.DateField(auto_now_add=True, null=True)),
            ],
            options={
                'db_table': 'at_announcements',
            },
        ),
        migrations.CreateModel(
            name='Assignment',
            fields=[
                ('assignment_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('assignment_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('title', models.CharField(max_length=31, null=True)),
                ('description', models.TextField(null=True)),
                ('start_date', models.DateField(null=True)),
                ('due_date', models.DateField(null=True)),
                ('worth',
                 models.PositiveSmallIntegerField(
                     choices=[(0, '0 %'), (10, '10 %'), (15, '15 %'),
                              (20, '20 %'), (25, '25 %'), (30, '30 %'),
                              (35, '35 %'), (40, '40 %'), (45, '45 %'),
                              (50, '50 %'), (55, '55 %'), (60, '60 %'),
                              (65, '65 %'), (70, '70 %'), (75, '75 %'),
                              (80, '80 %'), (85, '85 %'), (90, '90 %'),
                              (95, '95 %'), (100, '100 %')],
                     default=0,
                     validators=[
                         django.core.validators.MinValueValidator(0),
                         django.core.validators.MaxValueValidator(100)
                     ])),
            ],
            options={
                'db_table': 'at_assignments',
            },
        ),
        migrations.CreateModel(
            name='AssignmentSubmission',
            fields=[
                ('submission_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('percent', models.FloatField(default=0)),
                ('earned_marks', models.FloatField(default=0)),
                ('total_marks', models.PositiveSmallIntegerField(default=0)),
                ('submission_date',
                 models.DateTimeField(auto_now=True, null=True)),
                ('is_finished', models.BooleanField(default=False)),
                ('assignment',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Assignment')),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Student')),
            ],
            options={
                'db_table': 'at_assignment_submissions',
            },
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=127)),
                ('sub_title', models.CharField(max_length=127)),
                ('category',
                 models.CharField(choices=[
                     ('Aeronautics & Astronautics',
                      'Aeronautics & Astronautics'),
                     ('Anesthesia', 'Anesthesia'),
                     ('Anthropology', 'Anthropology'),
                     ('Applied Physics', 'Applied Physics'),
                     ('Art or Art History', 'Art & Art History'),
                     ('Astrophysics', 'Astrophysics'),
                     ('Biochemistry', 'Biochemistry'),
                     ('Bioengineering', 'Bioengineering'),
                     ('Biology', 'Biology'), ('Business', 'Business'),
                     ('Cardiothoracic Surgery', 'Cardiothoracic Surgery'),
                     ('Chemical and Systems Biology',
                      'Chemical and Systems Biology'),
                     ('Chemical Engineering', 'Chemical Engineering'),
                     ('Chemistry', 'Chemistry'),
                     ('Civil and Environmental Engineering',
                      'Civil and Environmental Engineering'),
                     ('Classics', 'Classics'),
                     ('Communication', 'Communication'),
                     ('Comparative Literature', 'Comparative Literature'),
                     ('Comparative Medicine', 'Comparative Medicine'),
                     ('Computer Science', 'Computer Science'),
                     ('Dermatology', 'Dermatology'),
                     ('Developmental Biology', 'Developmental Biology'),
                     ('East Asian Languages and Cultures',
                      'East Asian Languages and Cultures'),
                     ('Economics', 'Economics'), ('Education', 'Education'),
                     ('Electrical Engineering', 'Electrical Engineering'),
                     ('English', 'English'), ('French', 'French'),
                     ('Genetics', 'Genetics'),
                     ('General Eduction', 'General Education'),
                     ('Geological and Environmental Sciences',
                      'Geological and Environmental Sciences'),
                     ('Geophysics', 'Geophysics'), ('Health', 'Health'),
                     ('History', 'History'),
                     ('Latin American Cultures', 'Latin American Cultures'),
                     ('Law School', 'Law School'),
                     ('Linguistics', 'Linguistics'),
                     ('Management', 'Management'),
                     ('Materials Science', 'Materials Science'),
                     ('Mathematics', 'Mathematics'),
                     ('Mechanical Engineering', 'Mechanical Engineering'),
                     ('Medicine', 'Medicine'),
                     ('Microbiology and Immunology',
                      'Microbiology and Immunology'),
                     ('Molecular and Cellular Physiology',
                      'Molecular and Cellular Physiology'), ('Music', 'Music'),
                     ('Neurobiology', 'Neurobiology'),
                     ('Neurology', 'Neurology'),
                     ('Neurosurgery', 'Neurosurgery'),
                     ('Obstetrics and Gynecology',
                      'Obstetrics and Gynecology'),
                     ('Ophthalmology', 'Ophthalmology'),
                     ('Orthopaedic Surgery', 'Orthopaedic Surgery'),
                     ('Other', 'Other'), ('Otolaryngology', 'Otolaryngology'),
                     ('Pathology', 'Pathology'), ('Pediatrics', 'Pediatrics'),
                     ('Philosophy', 'Philosophy'), ('Physics', 'Physics'),
                     ('Political Science', 'Political Science'),
                     ('Psychiatry', 'Psychiatry'),
                     ('Psychology', 'Psychology'),
                     ('Radiation Oncology', 'Radiation Oncology'),
                     ('Radiology', 'Radiology'),
                     ('Religious Studies', 'Religious Studies'),
                     ('Slavic Languages and Literature',
                      'Slavic Languages and Literature'),
                     ('Sociology', 'Sociology'), ('Statistics', 'Statistics'),
                     ('Surgery', 'Surgery'),
                     ('Theater and Performance Studies',
                      'Theater and Performance Studies'),
                     ('Urology', 'Urology')
                 ],
                                  default='General Education',
                                  max_length=127)),
                ('description', models.TextField(null=True)),
                ('start_date', models.DateField(null=True)),
                ('finish_date', models.DateField(null=True)),
                ('is_official', models.BooleanField(default=False)),
                ('status', models.PositiveSmallIntegerField(default=0)),
                ('image',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
                ('students', models.ManyToManyField(to='account.Student')),
                ('teacher',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Teacher')),
            ],
            options={
                'db_table': 'at_courses',
            },
        ),
        migrations.CreateModel(
            name='CourseDiscussionPost',
            fields=[
                ('post_id', models.AutoField(primary_key=True,
                                             serialize=False)),
                ('title', models.CharField(max_length=127)),
                ('text', models.TextField(blank=True, null=True)),
                ('date', models.DateTimeField(auto_now=True, null=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'at_course_discussion_posts',
            },
        ),
        migrations.CreateModel(
            name='CourseDiscussionThread',
            fields=[
                ('thread_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=127)),
                ('text', models.TextField(blank=True, null=True)),
                ('date', models.DateTimeField(auto_now=True, null=True)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Course')),
                ('posts',
                 models.ManyToManyField(to='registrar.CourseDiscussionPost')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'at_course_discussion_threads',
            },
        ),
        migrations.CreateModel(
            name='CourseFinalMark',
            fields=[
                ('credit_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('percent',
                 models.FloatField(
                     default=0,
                     validators=[
                         django.core.validators.MinValueValidator(0),
                         django.core.validators.MaxValueValidator(100)
                     ])),
                ('is_public', models.BooleanField(default=False)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Course')),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Student')),
            ],
            options={
                'db_table': 'at_course_final_marks',
            },
        ),
        migrations.CreateModel(
            name='CourseSetting',
            fields=[
                ('settings_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('final_exam_percent',
                 models.FloatField(
                     default=50,
                     validators=[
                         django.core.validators.MinValueValidator(0),
                         django.core.validators.MaxValueValidator(100)
                     ])),
                ('course_percent',
                 models.FloatField(
                     default=50,
                     validators=[
                         django.core.validators.MinValueValidator(0),
                         django.core.validators.MaxValueValidator(100)
                     ])),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Course')),
            ],
            options={
                'db_table': 'at_course_settings',
            },
        ),
        migrations.CreateModel(
            name='CourseSubmission',
            fields=[
                ('review_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('status', models.PositiveSmallIntegerField(default=2)),
                ('from_submitter', models.TextField(null=True)),
                ('from_reviewer', models.TextField(null=True)),
                ('review_date', models.DateField(auto_now=True, null=True)),
                ('submission_date', models.DateField(auto_now=True,
                                                     null=True)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Course')),
            ],
            options={
                'db_table': 'at_course_submissions',
            },
        ),
        migrations.CreateModel(
            name='EssayQuestion',
            fields=[
                ('question_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('question_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('title', models.CharField(default='', max_length=31)),
                ('description', models.TextField(default='')),
                ('marks',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('assignment',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Assignment')),
            ],
            options={
                'db_table': 'at_essay_questions',
            },
        ),
        migrations.CreateModel(
            name='EssaySubmission',
            fields=[
                ('submission_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('file', models.FileField(upload_to='uploads')),
                ('submission_date',
                 models.DateTimeField(auto_now=True, null=True)),
                ('marks',
                 models.FloatField(
                     default=0,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
                ('question',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.EssayQuestion')),
            ],
            options={
                'db_table': 'at_essay_submissions',
            },
        ),
        migrations.CreateModel(
            name='Exam',
            fields=[
                ('exam_id', models.AutoField(primary_key=True,
                                             serialize=False)),
                ('exam_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('title', models.CharField(max_length=31, null=True)),
                ('description', models.TextField(null=True)),
                ('start_date', models.DateField(null=True)),
                ('due_date', models.DateField(null=True)),
                ('worth',
                 models.PositiveSmallIntegerField(
                     choices=[(0, '0 %'), (10, '10 %'), (15, '15 %'),
                              (20, '20 %'), (25, '25 %'), (30, '30 %'),
                              (35, '35 %'), (40, '40 %'), (45, '45 %'),
                              (50, '50 %'), (55, '55 %'), (60, '60 %'),
                              (65, '65 %'), (70, '70 %'), (75, '75 %'),
                              (80, '80 %'), (85, '85 %'), (90, '90 %'),
                              (95, '95 %'), (100, '100 %')],
                     default=0,
                     validators=[
                         django.core.validators.MinValueValidator(0),
                         django.core.validators.MaxValueValidator(100)
                     ])),
                ('is_final', models.BooleanField(default=False)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Course')),
            ],
            options={
                'db_table': 'at_exams',
            },
        ),
        migrations.CreateModel(
            name='ExamSubmission',
            fields=[
                ('submission_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('percent', models.FloatField(default=0)),
                ('earned_marks', models.FloatField(default=0)),
                ('total_marks', models.PositiveSmallIntegerField(default=0)),
                ('submission_date', models.DateField(auto_now=True,
                                                     null=True)),
                ('is_finished', models.BooleanField(default=False)),
                ('exam',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Exam')),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Student')),
            ],
            options={
                'db_table': 'at_exam_submissions',
            },
        ),
        migrations.CreateModel(
            name='FileUpload',
            fields=[
                ('upload_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('type', models.PositiveSmallIntegerField(default=0)),
                ('title', models.CharField(max_length=127, null=True)),
                ('description', models.TextField(null=True)),
                ('upload_date', models.DateField(auto_now=True, null=True)),
                ('file',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   null=True,
                                                   verbose_name='fileupload')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'at_file_uploads',
            },
        ),
        migrations.CreateModel(
            name='Lecture',
            fields=[
                ('lecture_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('lecture_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('week_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('title', models.CharField(default='',
                                           max_length=63,
                                           null=True)),
                ('description', models.TextField(default='', null=True)),
                ('youtube_url', models.URLField(blank=True, null=True)),
                ('vimeo_url', models.URLField(blank=True, null=True)),
                ('bliptv_url', models.URLField(blank=True, null=True)),
                ('preferred_service',
                 models.CharField(choices=[('1', 'YouTube'), ('2', 'Vimeo')],
                                  default='1',
                                  max_length=1)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Course')),
                ('notes', models.ManyToManyField(to='registrar.FileUpload')),
            ],
            options={
                'db_table': 'at_lectures',
            },
        ),
        migrations.CreateModel(
            name='MultipleChoiceQuestion',
            fields=[
                ('question_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('question_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('title',
                 models.CharField(blank=True, default='', max_length=31)),
                ('description', models.TextField(default='')),
                ('a', models.CharField(max_length=255, null=True)),
                ('a_is_correct', models.BooleanField(default=False)),
                ('b', models.CharField(max_length=255, null=True)),
                ('b_is_correct', models.BooleanField(default=False)),
                ('c', models.CharField(blank=True, max_length=255, null=True)),
                ('c_is_correct', models.BooleanField(default=False)),
                ('d', models.CharField(blank=True, max_length=255, null=True)),
                ('d_is_correct', models.BooleanField(default=False)),
                ('e', models.CharField(blank=True, max_length=255, null=True)),
                ('e_is_correct', models.BooleanField(default=False)),
                ('f', models.CharField(blank=True, max_length=255, null=True)),
                ('f_is_correct', models.BooleanField(default=False)),
                ('marks',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('assignment',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Assignment')),
                ('exam',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Exam')),
            ],
            options={
                'db_table': 'at_multiple_choice_questions',
            },
        ),
        migrations.CreateModel(
            name='MultipleChoiceSubmission',
            fields=[
                ('submission_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('a', models.BooleanField(default=False)),
                ('b', models.BooleanField(default=False)),
                ('c', models.BooleanField(default=False)),
                ('d', models.BooleanField(default=False)),
                ('e', models.BooleanField(default=False)),
                ('f', models.BooleanField(default=False)),
                ('marks',
                 models.FloatField(
                     default=0,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
                ('submission_date',
                 models.DateTimeField(auto_now=True, null=True)),
                ('question',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.MultipleChoiceQuestion')),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Student')),
            ],
            options={
                'db_table': 'at_multiple_choice_submissions',
            },
        ),
        migrations.CreateModel(
            name='PeerReview',
            fields=[
                ('review_id',
                 models.AutoField(max_length=11,
                                  primary_key=True,
                                  serialize=False)),
                ('marks',
                 models.PositiveSmallIntegerField(
                     choices=[(0, '0 Star'), (1, '1 Star'), (2, '2 Stars'),
                              (3, '3 Stars'), (4, '4 Stars'), (5, '5 Stars')],
                     default=0,
                     validators=[
                         django.core.validators.MinValueValidator(0),
                         django.core.validators.MaxValueValidator(5)
                     ])),
                ('text', models.TextField(blank=True, null=True)),
                ('date', models.DateTimeField(auto_now=True, null=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'at_peer_reviews',
            },
        ),
        migrations.CreateModel(
            name='Policy',
            fields=[
                ('policy_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('file',
                 cloudinary.models.CloudinaryField(
                     max_length=255, null=True, verbose_name='policyfiles')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Course')),
            ],
            options={
                'db_table': 'at_policys',
            },
        ),
        migrations.CreateModel(
            name='Quiz',
            fields=[
                ('quiz_id', models.AutoField(primary_key=True,
                                             serialize=False)),
                ('quiz_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
                ('title', models.CharField(max_length=31, null=True)),
                ('description', models.TextField(null=True)),
                ('start_date', models.DateField(null=True)),
                ('due_date', models.DateField(null=True)),
                ('worth',
                 models.PositiveSmallIntegerField(
                     choices=[(0, '0 %'), (10, '10 %'), (15, '15 %'),
                              (20, '20 %'), (25, '25 %'), (30, '30 %'),
                              (35, '35 %'), (40, '40 %'), (45, '45 %'),
                              (50, '50 %'), (55, '55 %'), (60, '60 %'),
                              (65, '65 %'), (70, '70 %'), (75, '75 %'),
                              (80, '80 %'), (85, '85 %'), (90, '90 %'),
                              (95, '95 %'), (100, '100 %')],
                     default=0,
                     validators=[
                         django.core.validators.MinValueValidator(0),
                         django.core.validators.MaxValueValidator(100)
                     ])),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Course')),
            ],
            options={
                'db_table': 'at_quizzes',
            },
        ),
        migrations.CreateModel(
            name='QuizSubmission',
            fields=[
                ('submission_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('percent', models.FloatField(default=0)),
                ('earned_marks', models.FloatField(default=0)),
                ('total_marks', models.PositiveSmallIntegerField(default=0)),
                ('submission_date', models.DateField(auto_now=True,
                                                     null=True)),
                ('is_finished', models.BooleanField(default=False)),
                ('quiz',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Quiz')),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Student')),
            ],
            options={
                'db_table': 'at_quiz_submissions',
            },
        ),
        migrations.CreateModel(
            name='ResponseQuestion',
            fields=[
                ('question_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('question_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('title', models.CharField(default='', max_length=31)),
                ('description', models.TextField(default='')),
                ('answer', models.TextField(default='')),
                ('marks',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('assignment',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Assignment')),
                ('exam',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Exam')),
                ('quiz',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Quiz')),
            ],
            options={
                'db_table': 'at_response_questions',
            },
        ),
        migrations.CreateModel(
            name='ResponseSubmission',
            fields=[
                ('submission_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('answer', models.TextField(default='')),
                ('marks',
                 models.FloatField(
                     default=0,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
                ('submission_date',
                 models.DateTimeField(auto_now=True, null=True)),
                ('question',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.ResponseQuestion')),
                ('reviews', models.ManyToManyField(to='registrar.PeerReview')),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Student')),
            ],
            options={
                'db_table': 'at_response_submissions',
            },
        ),
        migrations.CreateModel(
            name='Syllabus',
            fields=[
                ('syllabus_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('file',
                 cloudinary.models.CloudinaryField(
                     max_length=255, null=True, verbose_name='syllabusfiles')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Course')),
            ],
            options={
                'db_table': 'at_syllabus',
            },
        ),
        migrations.CreateModel(
            name='TrueFalseQuestion',
            fields=[
                ('question_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('question_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('title', models.CharField(default='', max_length=31)),
                ('description', models.TextField(default='')),
                ('true_choice', models.CharField(max_length=127, null=True)),
                ('false_choice', models.CharField(max_length=127, null=True)),
                ('answer', models.BooleanField(default=False)),
                ('marks',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('assignment',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Assignment')),
                ('exam',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Exam')),
                ('quiz',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.Quiz')),
            ],
            options={
                'db_table': 'at_true_false_questions',
            },
        ),
        migrations.CreateModel(
            name='TrueFalseSubmission',
            fields=[
                ('submission_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('answer', models.BooleanField(default=False)),
                ('submission_date',
                 models.DateTimeField(auto_now=True, null=True)),
                ('marks',
                 models.FloatField(
                     default=0,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
                ('question',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='registrar.TrueFalseQuestion')),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Student')),
            ],
            options={
                'db_table': 'at_true_false_submissions',
            },
        ),
        migrations.AddField(
            model_name='multiplechoicequestion',
            name='quiz',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='registrar.Quiz'),
        ),
        migrations.AddField(
            model_name='essaysubmission',
            name='reviews',
            field=models.ManyToManyField(to='registrar.PeerReview'),
        ),
        migrations.AddField(
            model_name='essaysubmission',
            name='student',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='account.Student'),
        ),
        migrations.AddField(
            model_name='essayquestion',
            name='exam',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='registrar.Exam'),
        ),
        migrations.AddField(
            model_name='essayquestion',
            name='quiz',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='registrar.Quiz'),
        ),
        migrations.AddField(
            model_name='assignment',
            name='course',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='registrar.Course'),
        ),
        migrations.AddField(
            model_name='announcement',
            name='course',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='registrar.Course'),
        ),
    ]
コード例 #10
0
class Migration(migrations.Migration):

    initial = True

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

    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=200, unique=True)),
                ('description', models.TextField(blank=True, max_length=500)),
            ],
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('image',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
                ('description', models.TextField(blank=True, max_length=500)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='subjects',
                                   to='curriculum.course')),
            ],
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id',
                 models.AutoField(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=300)),
                ('position',
                 models.PositiveSmallIntegerField(verbose_name='Chapter no.')),
                ('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='Presentation')),
                ('notes',
                 models.FileField(
                     blank=True,
                     upload_to=curriculum.models.save_lesson_files,
                     verbose_name='Notes')),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='curriculum.course')),
                ('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'],
            },
        ),
        migrations.CreateModel(
            name='CoursePayment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('order_id',
                 models.CharField(blank=True, max_length=40, null=True)),
                ('paid', models.BooleanField(default=False)),
                ('course',
                 models.ForeignKey(blank=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='curriculum.course')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('content', models.TextField(max_length=500)),
                ('publish', models.DateTimeField(auto_now_add=True)),
                ('lft', models.PositiveIntegerField(editable=False)),
                ('rght', models.PositiveIntegerField(editable=False)),
                ('tree_id',
                 models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(editable=False)),
                ('author',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('lesson',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='comments',
                                   to='curriculum.lesson')),
                ('parent',
                 mptt.fields.TreeForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='children',
                     to='curriculum.comment')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
コード例 #11
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('objects', '0005_auto_20150403_2339'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='AccountHistory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('xp_earned', models.SmallIntegerField(blank=0, default=0)),
                ('gm_notes', models.TextField(blank=True, null=True)),
                ('start_date', models.DateTimeField(blank=True, null=True)),
                ('end_date', models.DateTimeField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Chapter',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True,
                                          max_length=255,
                                          null=True)),
                ('synopsis', models.TextField(blank=True, null=True)),
                ('start_date', models.DateTimeField(blank=True, null=True)),
                ('end_date', models.DateTimeField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Clue',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=255)),
                ('rating',
                 models.PositiveSmallIntegerField(
                     blank=0,
                     default=0,
                     help_text=b'Value required to get this clue')),
                ('desc',
                 models.TextField(
                     blank=True,
                     help_text=b'Description of the clue given to the player',
                     verbose_name=b'Description')),
                ('red_herring',
                 models.BooleanField(
                     default=False,
                     help_text=b'Whether this revelation is totally fake')),
                ('allow_investigation',
                 models.BooleanField(
                     default=False,
                     help_text=b'Can be gained through investigation rolls')),
                ('allow_exploration',
                 models.BooleanField(
                     default=False,
                     help_text=b'Can be gained through exploration rolls')),
                ('allow_trauma',
                 models.BooleanField(
                     default=False,
                     help_text=b'Can be gained through combat rolls')),
                ('investigation_tags',
                 models.TextField(
                     blank=True,
                     help_text=
                     b'List keywords separated by semicolons for investigation',
                     verbose_name=b'Keywords for investigation')),
            ],
        ),
        migrations.CreateModel(
            name='ClueDiscovery',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('message',
                 models.TextField(
                     blank=True,
                     help_text=
                     b"Message for the player's records about how they discovered this."
                 )),
                ('date', models.DateTimeField(blank=True, null=True)),
                ('discovery_method',
                 models.CharField(
                     help_text=
                     b'How this was discovered - exploration, trauma, etc',
                     max_length=255)),
                ('roll', models.PositiveSmallIntegerField(blank=0, default=0)),
            ],
        ),
        migrations.CreateModel(
            name='ClueForRevelation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('required_for_revelation',
                 models.BooleanField(
                     default=True,
                     help_text=
                     b'Whether this must be discovered for the revelation to finish'
                 )),
                ('tier',
                 models.PositiveSmallIntegerField(
                     blank=0,
                     default=0,
                     help_text=
                     b'How high in the hierarchy of discoveries this clue is, lower number discovered first'
                 )),
                ('clue',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='usage',
                                   to='character.Clue')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('text', models.TextField(blank=True, null=True)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('gamedate',
                 models.CharField(blank=True, max_length=80, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Episode',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True,
                                          max_length=255,
                                          null=True)),
                ('synopsis', models.TextField(blank=True, null=True)),
                ('gm_notes', models.TextField(blank=True, null=True)),
                ('date', models.DateTimeField(blank=True, null=True)),
                ('chapter',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='episodes',
                     to='character.Chapter')),
            ],
        ),
        migrations.CreateModel(
            name='Investigation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ongoing',
                 models.BooleanField(
                     default=True,
                     help_text=b'Whether this investigation is finished or not'
                 )),
                ('active',
                 models.BooleanField(
                     default=False,
                     help_text=
                     b'Whether this is the investigation for the week. Only one allowed'
                 )),
                ('automate_result',
                 models.BooleanField(
                     default=True,
                     help_text=
                     b"Whether to generate a result during weekly maintenance. Set false if GM'd"
                 )),
                ('results',
                 models.TextField(
                     blank=True,
                     default=b"You didn't find anything.",
                     help_text=
                     b'The text to send the player, either set by GM or generated automatically by script if automate_result is set.'
                 )),
                ('actions',
                 models.TextField(
                     blank=True,
                     help_text=
                     b'The writeup the player submits of their actions, used for GMing.'
                 )),
                ('topic',
                 models.CharField(
                     blank=True,
                     help_text=b'Keyword to try to search for clues against',
                     max_length=255)),
                ('stat_used',
                 models.CharField(
                     blank=True,
                     default=b'perception',
                     help_text=b'The stat the player chose to use',
                     max_length=80)),
                ('skill_used',
                 models.CharField(
                     blank=True,
                     default=b'investigation',
                     help_text=b'The skill the player chose to use',
                     max_length=80)),
                ('silver',
                 models.PositiveSmallIntegerField(
                     blank=0,
                     default=0,
                     help_text=b'Additional silver added by the player')),
                ('economic',
                 models.PositiveSmallIntegerField(
                     blank=0,
                     default=0,
                     help_text=
                     b'Additional economic resources added by the player')),
                ('military',
                 models.PositiveSmallIntegerField(
                     blank=0,
                     default=0,
                     help_text=
                     b'Additional military resources added by the player')),
                ('social',
                 models.PositiveSmallIntegerField(
                     blank=0,
                     default=0,
                     help_text=
                     b'Additional social resources added by the player')),
            ],
        ),
        migrations.CreateModel(
            name='Milestone',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True,
                                          max_length=255,
                                          null=True)),
                ('synopsis', models.TextField(blank=True, null=True)),
                ('secret', models.BooleanField(default=False)),
                ('gm_notes', models.TextField(blank=True, null=True)),
                ('importance',
                 models.PositiveSmallIntegerField(blank=0, default=0)),
                ('chapter',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='milestones',
                     to='character.Chapter')),
                ('episode',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='milestones',
                     to='character.Episode')),
            ],
        ),
        migrations.CreateModel(
            name='Mystery',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('desc',
                 models.TextField(
                     blank=True,
                     help_text=
                     b'Description of the mystery given to the player when fully revealed',
                     verbose_name=b'Description')),
                ('category',
                 models.CharField(
                     blank=True,
                     help_text=
                     b'Type of mystery this is - ability-related, metaplot, etc',
                     max_length=80)),
            ],
            options={
                'verbose_name_plural': 'Mysteries',
            },
        ),
        migrations.CreateModel(
            name='MysteryDiscovery',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('message',
                 models.TextField(
                     blank=True,
                     help_text=
                     b"Message for the player's records about how they discovered this."
                 )),
                ('date', models.DateTimeField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Participant',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('xp_earned',
                 models.PositiveSmallIntegerField(blank=0, default=0)),
                ('karma_earned',
                 models.PositiveSmallIntegerField(blank=0, default=0)),
                ('gm_notes', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Photo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('create_time', models.DateTimeField(auto_now_add=True)),
                ('title',
                 models.CharField(
                     blank=True,
                     max_length=200,
                     verbose_name=
                     b'Name or description of the picture (optional)')),
                ('alt_text',
                 models.CharField(
                     blank=True,
                     max_length=200,
                     verbose_name=
                     b"Optional 'alt' text when mousing over your image")),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name=b'image')),
                ('owner',
                 models.ForeignKey(
                     blank=True,
                     help_text=b'a Character owner of this image, if any.',
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to='objects.ObjectDB',
                     verbose_name=b'owner')),
            ],
        ),
        migrations.CreateModel(
            name='PlayerAccount',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('karma', models.PositiveSmallIntegerField(blank=0,
                                                           default=0)),
                ('gm_notes', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Revelation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=255)),
                ('desc',
                 models.TextField(
                     blank=True,
                     help_text=
                     b'Description of the revelation given to the player',
                     verbose_name=b'Description')),
                ('required_clue_value',
                 models.PositiveSmallIntegerField(
                     blank=0,
                     default=0,
                     help_text=b'The total value of clues to trigger this')),
                ('red_herring',
                 models.BooleanField(
                     default=False,
                     help_text=b'Whether this revelation is totally fake')),
            ],
        ),
        migrations.CreateModel(
            name='RevelationDiscovery',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('message',
                 models.TextField(
                     blank=True,
                     help_text=
                     b"Message for the player's records about how they discovered this."
                 )),
                ('date', models.DateTimeField(blank=True, null=True)),
                ('discovery_method',
                 models.CharField(
                     help_text=
                     b'How this was discovered - exploration, trauma, etc',
                     max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='RevelationForMystery',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('required_for_mystery',
                 models.BooleanField(
                     default=True,
                     help_text=
                     b'Whether this must be discovered for the mystery to finish'
                 )),
                ('tier',
                 models.PositiveSmallIntegerField(
                     blank=0,
                     default=0,
                     help_text=
                     b'How high in the hierarchy of discoveries this revelation is, lower number discovered first'
                 )),
                ('mystery',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='revelations_used',
                                   to='character.Mystery')),
                ('revelation',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='usage',
                                   to='character.Revelation')),
            ],
        ),
        migrations.CreateModel(
            name='Roster',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True,
                                          max_length=255,
                                          null=True)),
                ('lock_storage',
                 models.TextField(blank=True,
                                  help_text=b'defined in setup_utils',
                                  verbose_name=b'locks')),
            ],
        ),
        migrations.CreateModel(
            name='RosterEntry',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('gm_notes', models.TextField(blank=True)),
                ('inactive', models.BooleanField(default=False)),
                ('frozen', models.BooleanField(default=False)),
                ('sheet_style', models.TextField(blank=True)),
                ('lock_storage',
                 models.TextField(blank=True,
                                  help_text=b'defined in setup_utils',
                                  verbose_name=b'locks')),
                ('character',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='roster',
                     to='objects.ObjectDB')),
                ('current_account',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='characters',
                     to='character.PlayerAccount')),
                ('player',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='roster',
                     to=settings.AUTH_USER_MODEL)),
                ('previous_accounts',
                 models.ManyToManyField(blank=True,
                                        through='character.AccountHistory',
                                        to='character.PlayerAccount')),
                ('profile_picture',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='character.Photo')),
                ('roster',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='entries',
                     to='character.Roster')),
            ],
            options={
                'verbose_name_plural': 'Roster Entries',
            },
        ),
        migrations.CreateModel(
            name='RPScene',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(max_length=80,
                                  verbose_name=b'title of the scene')),
                ('synopsis',
                 models.TextField(
                     verbose_name=b'Description of the scene written by player'
                 )),
                ('date', models.DateTimeField(blank=True, null=True)),
                ('log',
                 models.TextField(verbose_name=b'Text log of the scene')),
                ('lock_storage',
                 models.TextField(blank=True,
                                  help_text=b'defined in setup_utils',
                                  verbose_name=b'locks')),
                ('character',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='logs',
                                   to='character.RosterEntry')),
                ('milestone',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='log',
                     to='character.Milestone')),
            ],
            options={
                'verbose_name_plural': 'RP Scenes',
            },
        ),
        migrations.CreateModel(
            name='Story',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True,
                                          max_length=255,
                                          null=True)),
                ('synopsis', models.TextField(blank=True, null=True)),
                ('season', models.PositiveSmallIntegerField(blank=0,
                                                            default=0)),
                ('start_date', models.DateTimeField(blank=True, null=True)),
                ('end_date', models.DateTimeField(blank=True, null=True)),
                ('current_chapter',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='current_chapter_story',
                     to='character.Chapter')),
            ],
            options={
                'verbose_name_plural': 'Stories',
            },
        ),
        migrations.CreateModel(
            name='StoryEmit',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('text', models.TextField(blank=True, null=True)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('chapter',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='emits',
                     to='character.Chapter')),
                ('episode',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='emits',
                     to='character.Episode')),
                ('sender',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='emits',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='revelationdiscovery',
            name='character',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='revelations',
                to='character.RosterEntry'),
        ),
        migrations.AddField(
            model_name='revelationdiscovery',
            name='investigation',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='revelations',
                to='character.Investigation'),
        ),
        migrations.AddField(
            model_name='revelationdiscovery',
            name='milestone',
            field=models.OneToOneField(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='revelation',
                to='character.Milestone'),
        ),
        migrations.AddField(
            model_name='revelationdiscovery',
            name='revealed_by',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='revelations_spoiled',
                to='character.RosterEntry'),
        ),
        migrations.AddField(
            model_name='revelationdiscovery',
            name='revelation',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='discoveries',
                to='character.Revelation'),
        ),
        migrations.AddField(
            model_name='revelation',
            name='characters',
            field=models.ManyToManyField(
                blank=True,
                through='character.RevelationDiscovery',
                to='character.RosterEntry'),
        ),
        migrations.AddField(
            model_name='revelation',
            name='mysteries',
            field=models.ManyToManyField(
                through='character.RevelationForMystery',
                to='character.Mystery'),
        ),
        migrations.AddField(
            model_name='participant',
            name='character',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='character.RosterEntry'),
        ),
        migrations.AddField(
            model_name='participant',
            name='milestone',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='character.Milestone'),
        ),
        migrations.AddField(
            model_name='mysterydiscovery',
            name='character',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='mysteries',
                to='character.RosterEntry'),
        ),
        migrations.AddField(
            model_name='mysterydiscovery',
            name='investigation',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='mysteries',
                to='character.Investigation'),
        ),
        migrations.AddField(
            model_name='mysterydiscovery',
            name='milestone',
            field=models.OneToOneField(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='mystery',
                to='character.Milestone'),
        ),
        migrations.AddField(
            model_name='mysterydiscovery',
            name='mystery',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='discoveries',
                to='character.Mystery'),
        ),
        migrations.AddField(
            model_name='mystery',
            name='characters',
            field=models.ManyToManyField(blank=True,
                                         through='character.MysteryDiscovery',
                                         to='character.RosterEntry'),
        ),
        migrations.AddField(
            model_name='milestone',
            name='image',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='milestones',
                to='character.Photo'),
        ),
        migrations.AddField(
            model_name='milestone',
            name='participants',
            field=models.ManyToManyField(blank=True,
                                         through='character.Participant',
                                         to='character.RosterEntry'),
        ),
        migrations.AddField(
            model_name='milestone',
            name='protagonist',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='milestones',
                to='character.RosterEntry'),
        ),
        migrations.AddField(
            model_name='investigation',
            name='character',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='investigations',
                to='character.RosterEntry'),
        ),
        migrations.AddField(
            model_name='investigation',
            name='clue_target',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='character.Clue'),
        ),
        migrations.AddField(
            model_name='comment',
            name='milestone',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='comments',
                to='character.Milestone'),
        ),
        migrations.AddField(
            model_name='comment',
            name='poster',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='comments',
                to='character.RosterEntry'),
        ),
        migrations.AddField(
            model_name='comment',
            name='reply_to',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='character.Comment'),
        ),
        migrations.AddField(
            model_name='comment',
            name='target',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='comments_upon',
                to='character.RosterEntry'),
        ),
        migrations.AddField(
            model_name='clueforrevelation',
            name='revelation',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='clues_used',
                to='character.Revelation'),
        ),
        migrations.AddField(
            model_name='cluediscovery',
            name='character',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='clues',
                to='character.RosterEntry'),
        ),
        migrations.AddField(
            model_name='cluediscovery',
            name='clue',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='discoveries',
                to='character.Clue'),
        ),
        migrations.AddField(
            model_name='cluediscovery',
            name='investigation',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='clues',
                to='character.Investigation'),
        ),
        migrations.AddField(
            model_name='cluediscovery',
            name='milestone',
            field=models.OneToOneField(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='clue',
                to='character.Milestone'),
        ),
        migrations.AddField(
            model_name='cluediscovery',
            name='revealed_by',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='clues_spoiled',
                to='character.RosterEntry'),
        ),
        migrations.AddField(
            model_name='clue',
            name='characters',
            field=models.ManyToManyField(blank=True,
                                         through='character.ClueDiscovery',
                                         to='character.RosterEntry'),
        ),
        migrations.AddField(
            model_name='clue',
            name='revelations',
            field=models.ManyToManyField(through='character.ClueForRevelation',
                                         to='character.Revelation'),
        ),
        migrations.AddField(
            model_name='chapter',
            name='story',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='previous_chapters',
                to='character.Story'),
        ),
        migrations.AddField(
            model_name='accounthistory',
            name='account',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='character.PlayerAccount'),
        ),
        migrations.AddField(
            model_name='accounthistory',
            name='entry',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='character.RosterEntry'),
        ),
    ]
コード例 #12
0
ファイル: 0001_initial.py プロジェクト: EnockOMONDI/ICYLMS
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('account', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='CartItem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('cart_id', models.CharField(max_length=50)),
                ('price', models.DecimalField(decimal_places=2, max_digits=7)),
                ('quantity', models.IntegerField()),
                ('date_added', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='LineItem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('price', models.DecimalField(decimal_places=2, max_digits=7)),
                ('quantity', models.IntegerField()),
                ('date_added', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.TextField(blank=True, max_length=50,
                                          null=True)),
                ('email', models.TextField(blank=True,
                                           max_length=50,
                                           null=True)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('paid', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=191)),
                ('price', models.DecimalField(decimal_places=2, max_digits=7)),
                ('slug', models.SlugField()),
                ('description', models.TextField()),
                ('image',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
                ('Validator_image',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
                ('Validator_name', models.CharField(max_length=191)),
                ('Course_module_file',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='file')),
                ('duration', models.CharField(max_length=191)),
                ('Delivery',
                 models.CharField(blank=True, max_length=191, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ShortCourse',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=191)),
                ('sub_title', models.CharField(max_length=127)),
                ('price',
                 models.DecimalField(blank=True,
                                     decimal_places=2,
                                     max_digits=7,
                                     null=True)),
                ('slug', models.SlugField()),
                ('image',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
                ('Validator_image',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
                ('Validator_name',
                 models.CharField(blank=True, max_length=191, null=True)),
                ('Course_module_file',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='file')),
                ('duration', models.CharField(max_length=191)),
                ('category',
                 models.CharField(choices=[('leadership', 'leadership'),
                                           ('SDGs', 'SDGs')],
                                  default='General Education',
                                  max_length=127)),
                ('description', models.TextField(null=True)),
                ('start_date', models.DateField(null=True)),
                ('finish_date', models.DateField(null=True)),
                ('is_official', models.BooleanField(default=False)),
                ('status', models.PositiveSmallIntegerField(default=0)),
                ('students', models.ManyToManyField(to='account.Student')),
                ('teacher',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Teacher')),
            ],
        ),
        migrations.CreateModel(
            name='ShortCourseLecture',
            fields=[
                ('lecture_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('lecture_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('week_num',
                 models.PositiveSmallIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('title', models.CharField(default='',
                                           max_length=63,
                                           null=True)),
                ('description', models.TextField(default='', null=True)),
                ('youtube_url', models.URLField(blank=True, null=True)),
                ('vimeo_url', models.URLField(blank=True, null=True)),
                ('bliptv_url', models.URLField(blank=True, null=True)),
                ('preferred_service',
                 models.CharField(choices=[('1', 'YouTube'), ('2', 'Vimeo')],
                                  default='1',
                                  max_length=1)),
                ('shortcourse',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='shortcourselectures',
                                   to='ecommerce_app.ShortCourse')),
            ],
        ),
        migrations.CreateModel(
            name='ShortCourseModules',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Module_name', models.CharField(max_length=80)),
                ('Module_duration', models.CharField(max_length=191)),
                ('module_image',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
                ('module_file',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='file')),
                ('module_description', models.TextField()),
                ('ShortCourse',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='modules',
                                   to='ecommerce_app.ShortCourse')),
            ],
        ),
        migrations.AddField(
            model_name='lineitem',
            name='order',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='ecommerce_app.Order'),
        ),
        migrations.AddField(
            model_name='lineitem',
            name='product',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='ecommerce_app.Product'),
        ),
        migrations.AddField(
            model_name='cartitem',
            name='product',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to='ecommerce_app.Product'),
        ),
    ]
コード例 #13
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='PrivateMessage',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=127)),
                ('text', models.TextField()),
                ('sent_date', models.DateField(auto_now_add=True, null=True)),
                ('to_address', models.CharField(max_length=255)),
                ('from_address', models.CharField(max_length=255)),
            ],
            options={
                'db_table': 'at_private_messages',
            },
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('student_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('profile_pic',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
                ('bio', models.TextField(blank=True, max_length=500,
                                         null=True)),
                ('country',
                 models.CharField(blank=True,
                                  choices=[('Algeria', 'Algeria'),
                                           ('Angola', 'Angola'),
                                           ('Benin', 'Benin'),
                                           ('Botswana', 'Botswana'),
                                           ('Burkina Faso', 'Burkina Faso'),
                                           ('Burundi', 'Burundi'),
                                           ('Cape Verde', 'Cape Verde'),
                                           ('Cameroon', 'Cameroon'),
                                           ('Central African Republic',
                                            'Central African Republic'),
                                           ('Chad', 'Chad'),
                                           ('Comoros', 'Comoros'),
                                           ('Congo Democratic Republic',
                                            'Congo Democratic Republic'),
                                           ('Congo, Republic of the',
                                            'Congo, Republic of the'),
                                           ('Cote dIvoire', 'Cote dIvoire'),
                                           ('Djibouti', 'Djibouti'),
                                           ('Egypt', 'Egypt'),
                                           ('Equatorial Guinea',
                                            'Equatorial Guinea'),
                                           ('Eritrea', 'Eritrea'),
                                           ('Eswatini', 'Eswatini'),
                                           ('Ethiopia', 'Ethiopia'),
                                           ('Gabon', 'Gabon'),
                                           ('Gambia', 'Gambia'),
                                           ('Ghana', 'Ghana'),
                                           ('Guinea', 'Guinea'),
                                           ('Guinea-Bissau', 'Guinea-Bissau'),
                                           ('Kenya', 'Kenya'),
                                           ('Lesotho', 'Lesotho'),
                                           ('Liberia', 'Liberia'),
                                           ('Libya', 'Libya'),
                                           ('Madagascar', 'Madagascar'),
                                           ('Malawi', 'Malawi'),
                                           ('Mali', 'Mali'),
                                           ('Mauritania', 'Mauritania'),
                                           ('Mauritius', 'Mauritius'),
                                           ('Morocco', 'Morocco'),
                                           ('Mozambique', 'Mozambique'),
                                           ('Namibia', 'Namibia'),
                                           ('Niger', 'Niger'),
                                           ('Nigeria', 'Nigeria'),
                                           ('Rwanda', 'Rwanda'),
                                           ('Sao Tome and Principe',
                                            'Sao Tome and Principe'),
                                           ('Senegal', 'Senegal'),
                                           ('Seychelles', 'Seychelles'),
                                           ('Sierra Leone', 'Sierra Leone'),
                                           ('Somalia', 'Somalia'),
                                           ('South Africa', 'South Africa'),
                                           ('South Sudan', 'South Sudan'),
                                           ('Sudan', 'Sudan'),
                                           ('Tanzania', 'Tanzania'),
                                           ('Togo', 'Togo'),
                                           ('Tunisia', 'Tunisia'),
                                           ('Uganda', 'Uganda'),
                                           ('Zambia', 'Zambia')],
                                  default='Kenya',
                                  max_length=127,
                                  null=True)),
                ('age',
                 models.PositiveSmallIntegerField(default='18', null=True)),
                ('interests',
                 models.CharField(choices=[('Leadership', 'Leadership')],
                                  default='Leadership',
                                  max_length=70,
                                  null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'at_students',
            },
        ),
        migrations.CreateModel(
            name='Teacher',
            fields=[
                ('teacher_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'at_teachers',
            },
        ),
    ]
コード例 #14
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('paper_uploads', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='CloudinaryFile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('owner_app_label',
                 models.CharField(editable=False, max_length=100)),
                ('owner_model_name',
                 models.CharField(editable=False, max_length=100)),
                ('owner_fieldname',
                 models.CharField(editable=False, max_length=255)),
                ('created_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      editable=False,
                                      verbose_name='created at')),
                ('modified_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='changed at')),
                ('basename',
                 models.CharField(editable=False,
                                  help_text='Human-readable resource name',
                                  max_length=255,
                                  verbose_name='basename')),
                ('extension',
                 models.CharField(editable=False,
                                  help_text='Lowercase, without leading dot',
                                  max_length=32,
                                  verbose_name='extension')),
                ('size',
                 models.PositiveIntegerField(default=0,
                                             editable=False,
                                             verbose_name='size')),
                ('checksum',
                 models.CharField(editable=False,
                                  max_length=64,
                                  verbose_name='checksum')),
                ('uploaded_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      editable=False,
                                      verbose_name='uploaded at')),
                ('file',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='file')),
                ('display_name',
                 models.CharField(blank=True,
                                  max_length=255,
                                  verbose_name='display name')),
            ],
            options={
                'verbose_name': 'file',
                'verbose_name_plural': 'files',
                'abstract': False,
                'default_permissions': (),
            },
            bases=(paper_uploads.cloudinary.models.mixins.
                   ReadonlyCloudinaryFileProxyMixin,
                   paper_uploads.models.mixins.FileProxyMixin, models.Model),
        ),
        migrations.CreateModel(
            name='CloudinaryFileItem',
            fields=[
                ('collectionitembase_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='paper_uploads.CollectionItemBase')),
                ('owner_app_label',
                 models.CharField(editable=False, max_length=100)),
                ('owner_model_name',
                 models.CharField(editable=False, max_length=100)),
                ('owner_fieldname',
                 models.CharField(editable=False, max_length=255)),
                ('created_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      editable=False,
                                      verbose_name='created at')),
                ('modified_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='changed at')),
                ('basename',
                 models.CharField(editable=False,
                                  help_text='Human-readable resource name',
                                  max_length=255,
                                  verbose_name='basename')),
                ('extension',
                 models.CharField(editable=False,
                                  help_text='Lowercase, without leading dot',
                                  max_length=32,
                                  verbose_name='extension')),
                ('size',
                 models.PositiveIntegerField(default=0,
                                             editable=False,
                                             verbose_name='size')),
                ('checksum',
                 models.CharField(editable=False,
                                  max_length=64,
                                  verbose_name='checksum')),
                ('uploaded_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      editable=False,
                                      verbose_name='uploaded at')),
                ('file',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='file')),
                ('display_name',
                 models.CharField(blank=True,
                                  max_length=255,
                                  verbose_name='display name')),
            ],
            options={
                'verbose_name': 'File item',
                'verbose_name_plural': 'File items',
                'abstract': False,
            },
            bases=('paper_uploads.collectionitembase', paper_uploads.
                   cloudinary.models.mixins.ReadonlyCloudinaryFileProxyMixin,
                   paper_uploads.models.mixins.FileProxyMixin, models.Model),
        ),
        migrations.CreateModel(
            name='CloudinaryImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('owner_app_label',
                 models.CharField(editable=False, max_length=100)),
                ('owner_model_name',
                 models.CharField(editable=False, max_length=100)),
                ('owner_fieldname',
                 models.CharField(editable=False, max_length=255)),
                ('created_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      editable=False,
                                      verbose_name='created at')),
                ('modified_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='changed at')),
                ('basename',
                 models.CharField(editable=False,
                                  help_text='Human-readable resource name',
                                  max_length=255,
                                  verbose_name='basename')),
                ('extension',
                 models.CharField(editable=False,
                                  help_text='Lowercase, without leading dot',
                                  max_length=32,
                                  verbose_name='extension')),
                ('size',
                 models.PositiveIntegerField(default=0,
                                             editable=False,
                                             verbose_name='size')),
                ('checksum',
                 models.CharField(editable=False,
                                  max_length=64,
                                  verbose_name='checksum')),
                ('uploaded_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      editable=False,
                                      verbose_name='uploaded at')),
                ('title',
                 models.CharField(
                     blank=True,
                     help_text=
                     'The title is being used as a tooltip when the user hovers the mouse over the image',
                     max_length=255,
                     verbose_name='title')),
                ('description',
                 models.TextField(
                     blank=True,
                     help_text=
                     'This text will be used by screen readers, search engines, or when the image cannot be loaded',
                     verbose_name='description')),
                ('width',
                 models.PositiveSmallIntegerField(default=0,
                                                  editable=False,
                                                  verbose_name='width')),
                ('height',
                 models.PositiveSmallIntegerField(default=0,
                                                  editable=False,
                                                  verbose_name='height')),
                ('cropregion',
                 models.CharField(blank=True,
                                  editable=False,
                                  max_length=24,
                                  verbose_name='crop region')),
                ('file',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='file')),
            ],
            options={
                'verbose_name': 'image',
                'verbose_name_plural': 'images',
                'abstract': False,
                'default_permissions': (),
            },
            bases=(paper_uploads.cloudinary.models.mixins.
                   ReadonlyCloudinaryFileProxyMixin,
                   paper_uploads.models.mixins.FileProxyMixin, models.Model),
        ),
        migrations.CreateModel(
            name='CloudinaryImageItem',
            fields=[
                ('collectionitembase_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='paper_uploads.CollectionItemBase')),
                ('owner_app_label',
                 models.CharField(editable=False, max_length=100)),
                ('owner_model_name',
                 models.CharField(editable=False, max_length=100)),
                ('owner_fieldname',
                 models.CharField(editable=False, max_length=255)),
                ('created_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      editable=False,
                                      verbose_name='created at')),
                ('modified_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='changed at')),
                ('basename',
                 models.CharField(editable=False,
                                  help_text='Human-readable resource name',
                                  max_length=255,
                                  verbose_name='basename')),
                ('extension',
                 models.CharField(editable=False,
                                  help_text='Lowercase, without leading dot',
                                  max_length=32,
                                  verbose_name='extension')),
                ('size',
                 models.PositiveIntegerField(default=0,
                                             editable=False,
                                             verbose_name='size')),
                ('checksum',
                 models.CharField(editable=False,
                                  max_length=64,
                                  verbose_name='checksum')),
                ('uploaded_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      editable=False,
                                      verbose_name='uploaded at')),
                ('title',
                 models.CharField(
                     blank=True,
                     help_text=
                     'The title is being used as a tooltip when the user hovers the mouse over the image',
                     max_length=255,
                     verbose_name='title')),
                ('description',
                 models.TextField(
                     blank=True,
                     help_text=
                     'This text will be used by screen readers, search engines, or when the image cannot be loaded',
                     verbose_name='description')),
                ('width',
                 models.PositiveSmallIntegerField(default=0,
                                                  editable=False,
                                                  verbose_name='width')),
                ('height',
                 models.PositiveSmallIntegerField(default=0,
                                                  editable=False,
                                                  verbose_name='height')),
                ('cropregion',
                 models.CharField(blank=True,
                                  editable=False,
                                  max_length=24,
                                  verbose_name='crop region')),
                ('file',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='file')),
            ],
            options={
                'verbose_name': 'Image item',
                'verbose_name_plural': 'Image items',
                'abstract': False,
            },
            bases=('paper_uploads.collectionitembase', paper_uploads.
                   cloudinary.models.mixins.ReadonlyCloudinaryFileProxyMixin,
                   paper_uploads.models.mixins.FileProxyMixin, models.Model),
        ),
        migrations.CreateModel(
            name='CloudinaryMedia',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('owner_app_label',
                 models.CharField(editable=False, max_length=100)),
                ('owner_model_name',
                 models.CharField(editable=False, max_length=100)),
                ('owner_fieldname',
                 models.CharField(editable=False, max_length=255)),
                ('created_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      editable=False,
                                      verbose_name='created at')),
                ('modified_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='changed at')),
                ('basename',
                 models.CharField(editable=False,
                                  help_text='Human-readable resource name',
                                  max_length=255,
                                  verbose_name='basename')),
                ('extension',
                 models.CharField(editable=False,
                                  help_text='Lowercase, without leading dot',
                                  max_length=32,
                                  verbose_name='extension')),
                ('size',
                 models.PositiveIntegerField(default=0,
                                             editable=False,
                                             verbose_name='size')),
                ('checksum',
                 models.CharField(editable=False,
                                  max_length=64,
                                  verbose_name='checksum')),
                ('uploaded_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      editable=False,
                                      verbose_name='uploaded at')),
                ('file',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='file')),
                ('display_name',
                 models.CharField(blank=True,
                                  max_length=255,
                                  verbose_name='display name')),
            ],
            options={
                'verbose_name': 'media',
                'verbose_name_plural': 'media',
                'abstract': False,
                'default_permissions': (),
            },
            bases=(paper_uploads.cloudinary.models.mixins.
                   ReadonlyCloudinaryFileProxyMixin,
                   paper_uploads.models.mixins.FileProxyMixin, models.Model),
        ),
        migrations.CreateModel(
            name='CloudinaryMediaItem',
            fields=[
                ('collectionitembase_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='paper_uploads.CollectionItemBase')),
                ('owner_app_label',
                 models.CharField(editable=False, max_length=100)),
                ('owner_model_name',
                 models.CharField(editable=False, max_length=100)),
                ('owner_fieldname',
                 models.CharField(editable=False, max_length=255)),
                ('created_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      editable=False,
                                      verbose_name='created at')),
                ('modified_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='changed at')),
                ('basename',
                 models.CharField(editable=False,
                                  help_text='Human-readable resource name',
                                  max_length=255,
                                  verbose_name='basename')),
                ('extension',
                 models.CharField(editable=False,
                                  help_text='Lowercase, without leading dot',
                                  max_length=32,
                                  verbose_name='extension')),
                ('size',
                 models.PositiveIntegerField(default=0,
                                             editable=False,
                                             verbose_name='size')),
                ('checksum',
                 models.CharField(editable=False,
                                  max_length=64,
                                  verbose_name='checksum')),
                ('uploaded_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      editable=False,
                                      verbose_name='uploaded at')),
                ('file',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='file')),
                ('display_name',
                 models.CharField(blank=True,
                                  max_length=255,
                                  verbose_name='display name')),
            ],
            options={
                'verbose_name': 'Media item',
                'verbose_name_plural': 'Media items',
                'abstract': False,
            },
            bases=('paper_uploads.collectionitembase', paper_uploads.
                   cloudinary.models.mixins.ReadonlyCloudinaryFileProxyMixin,
                   paper_uploads.models.mixins.FileProxyMixin, models.Model),
        ),
        migrations.CreateModel(
            name='CloudinaryCollection',
            fields=[],
            options={
                'proxy': True,
                'indexes': [],
            },
            bases=('paper_uploads.collection', ),
            managers=[
                ('default_mgr', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='CloudinaryImageCollection',
            fields=[],
            options={
                'proxy': True,
                'indexes': [],
            },
            bases=('paper_uploads.collection', ),
            managers=[
                ('default_mgr', django.db.models.manager.Manager()),
            ],
        ),
    ]