Пример #1
0
class Migration(migrations.Migration):

    dependencies = [("challenges", "0074_add_default_meta_attributes_field")]

    operations = [
        migrations.AlterField(
            model_name="challenge",
            name="allowed_email_domains",
            field=django.contrib.postgres.fields.ArrayField(
                base_field=models.CharField(blank=True, max_length=50),
                blank=True,
                default=list,
                size=None,
            ),
        ),
        migrations.AlterField(
            model_name="challenge",
            name="banned_email_ids",
            field=django.contrib.postgres.fields.ArrayField(
                base_field=models.TextField(blank=True, null=True),
                blank=True,
                default=list,
                null=True,
                size=None,
            ),
        ),
        migrations.AlterField(
            model_name="challenge",
            name="blocked_email_domains",
            field=django.contrib.postgres.fields.ArrayField(
                base_field=models.CharField(blank=True, max_length=50),
                blank=True,
                default=list,
                size=None,
            ),
        ),
        migrations.AlterField(
            model_name="challengephase",
            name="allowed_email_ids",
            field=django.contrib.postgres.fields.ArrayField(
                base_field=models.TextField(blank=True, null=True),
                blank=True,
                default=list,
                null=True,
                size=None,
            ),
        ),
        migrations.AlterField(
            model_name="challengetemplate",
            name="eval_metrics",
            field=django.contrib.postgres.fields.ArrayField(
                base_field=models.CharField(blank=True, max_length=200),
                blank=True,
                default=challenges.models.get_default_eval_metric,
                size=None,
            ),
        ),
    ]
Пример #2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Challenges',
            fields=[
                ('name', models.CharField(max_length=250, unique=True)),
                ('challenge_id', models.CharField(max_length=300, primary_key=True, serialize=False)),
                ('category', models.CharField(max_length=100)),
                ('description', models.CharField(blank=True, default='', max_length=1000)),
                ('points', models.IntegerField()),
                ('file', models.FileField(blank=True, null=True, upload_to=challenges.models.get_upload_path)),
                ('flag', models.CharField(max_length=500)),
                ('author', models.CharField(max_length=250)),
            ],
        ),
        migrations.CreateModel(
            name='ChallengesSolvedBy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('challenge_id', models.CharField(max_length=250)),
                ('user_name', models.CharField(max_length=250)),
                ('points', models.IntegerField()),
            ],
        ),
    ]
Пример #3
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Challenge',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('description', models.CharField(max_length=512)),
                ('points', models.IntegerField(default=0)),
                ('flag', models.CharField(max_length=100)),
                ('hosted', models.BooleanField(default=False)),
                ('fileUpload', models.BooleanField(default=False)),
                ('imageName',
                 models.CharField(blank=True,
                                  default=None,
                                  max_length=100,
                                  null=True)),
                ('ports',
                 models.CharField(blank=True,
                                  default=None,
                                  max_length=100,
                                  null=True)),
                ('pathPrefix',
                 models.CharField(blank=True,
                                  default=None,
                                  max_length=100,
                                  null=True)),
                ('upload',
                 models.FileField(
                     blank=True,
                     default=None,
                     null=True,
                     storage=challenges.models.OverwriteStorage(),
                     upload_to=challenges.models.user_directory_path)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('category',
                 models.ForeignKey(default=None,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='categories',
                                   to='categories.Category')),
            ],
        ),
    ]
class Migration(migrations.Migration):

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

    operations = [
        migrations.AddField(
            model_name='question',
            name='type',
            field=models.CharField(default='a', max_length=1),
        ),
        migrations.AlterField(
            model_name='question',
            name='description',
            field=challenges.models.DescriptionField(),
        ),
    ]
Пример #5
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Challenge',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('release',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='date released')),
                ('expire',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='date expired')),
                ('title', models.CharField(blank=True, max_length=1024)),
                ('problem', models.TextField()),
                ('test_file', models.FileField(upload_to='challenge_tests/')),
                ('function_name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='ChallengeSubmission',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date created')),
                ('feedback', models.TextField(blank=True)),
                ('code',
                 models.FileField(
                     upload_to=challenges.models.user_directory_path)),
                ('result',
                 models.CharField(blank=True,
                                  choices=[(challenges.models.Result('Erro'),
                                            'Erro'),
                                           (challenges.models.Result('OK'),
                                            'OK')],
                                  max_length=5)),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('challenge',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='challenges.Challenge')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('challenges', '0016_category'),
    ]

    operations = [
        migrations.AddField(
            model_name='category',
            name='avatar',
            field=models.ImageField(
                blank=True,
                upload_to=challenges.models.challenge_category_directory_path),
        ),
        migrations.AlterField(
            model_name='category',
            name='icon',
            field=models.CharField(blank=True,
                                   choices=[(b'0', b'fa fa-paw fa-fw'),
                                            (b'1', b'fa fa-wrench fa-fw'),
                                            (b'2', b'fa fa-child fa-fw'),
                                            (b'4', b'fa fa-users fa-fw'),
                                            (b'8', b'fa fa-book fa-fw'),
                                            (b'16', b'fa fa-tree fa-fw'),
                                            (b'32', b'fa fa-heartbeat fa-fw'),
                                            (b'64', b'fa fa-bicycle fa-fw'),
                                            (b'128', b'fa fa-home fa-fw')],
                                   help_text='Category Icon',
                                   max_length=4,
                                   null=True,
                                   verbose_name='Icon'),
        ),
        migrations.AlterField(
            model_name='category',
            name='image',
            field=models.CharField(
                blank=True,
                choices=[
                    (b'0', b'/img/challenge-categories/1-animals.jpeg'),
                    (b'1',
                     b'/img/challenge-categories/2-arts-and-culture.jpeg'),
                    (b'2',
                     b'/img/challenge-categories/3-children-and-youth.jpeg'),
                    (b'4', b'/img/challenge-categories/4-community.jpeg'),
                    (b'8',
                     b'/img/challenge-categories/5-education-and-literacy.jpeg'
                     ),
                    (b'16', b'/img/challenge-categories/6-environment-2.jpeg'),
                    (b'32',
                     b'/img/challenge-categories/7-health-and-wellness.jpeg'),
                    (b'64',
                     b'/img/challenge-categories/8-sports-and-recreation.jpeg'
                     ),
                    (b'128',
                     b'/img/challenge-categories/9-veterans-and-seniors.ljpeg')
                ],
                help_text='Category Image',
                max_length=4,
                null=True,
                verbose_name='Image'),
        ),
    ]