Exemple #1
0
class Migration(migrations.Migration):

    dependencies = [
        ('archive', '0003_problem_hidden'),
    ]

    operations = [
        migrations.AddField(
            model_name='problem',
            name='judge',
            field=models.FileField(blank=True,
                                   default=None,
                                   null=True,
                                   upload_to=archive.models.judge_dir),
        ),
        migrations.AddField(
            model_name='problem',
            name='no_io',
            field=models.BooleanField(default=False),
        ),
        migrations.AlterField(
            model_name='problem',
            name='hidden',
            field=models.BooleanField(default=False),
        ),
    ]
Exemple #2
0
class Migration(migrations.Migration):

    dependencies = [
        ('archive', '0002_archivalinfo_is_published'),
    ]

    operations = [
        migrations.CreateModel(
            name='ExtraFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('f', models.FileField(upload_to=archive.models.ExtraFile.upload_destination)),
            ],
        ),
        migrations.CreateModel(
            name='ProductionPhoto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('img', models.ImageField(height_field='height', upload_to=archive.models.ProductionPhoto.upload_destination, width_field='width')),
            ],
        ),
        migrations.AddField(
            model_name='archivalinfo',
            name='poster',
            field=models.FileField(blank=True, upload_to=archive.models.ArchivalInfo.pub_destination),
        ),
        migrations.AddField(
            model_name='archivalinfo',
            name='program',
            field=models.FileField(blank=True, upload_to=archive.models.ArchivalInfo.pub_destination),
        ),
        migrations.AddField(
            model_name='productionphoto',
            name='show',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='archive.ArchivalInfo'),
        ),
        migrations.AddField(
            model_name='extrafile',
            name='show',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='archive.ArchivalInfo'),
        ),
    ]
Exemple #3
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Comparator',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=40, unique=True)),
                ('file', models.FileField(upload_to='comparators/')),
            ],
        ),
        migrations.CreateModel(
            name='Example',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('input', models.TextField()),
                ('output', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Problem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=40, unique=True)),
                ('code', models.CharField(max_length=40, unique=True)),
                ('statement', models.TextField()),
                ('input_spec', models.TextField(default='')),
                ('output_spec', models.TextField(default='')),
                ('time_limit', models.IntegerField(default=2)),
                ('memory_limit', models.IntegerField(default=256)),
                ('date', models.DateTimeField()),
                ('solution',
                 models.FileField(null=True,
                                  upload_to=archive.models.solution_dir)),
                ('template', models.TextField(default='')),
                ('author', models.CharField(default='', max_length=40)),
                ('comparator',
                 models.ForeignKey(
                     default=None,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='archive.Comparator')),
            ],
            options={
                'ordering': ['date', 'name'],
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Submission',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date', models.DateField(auto_now_add=True)),
                ('time', models.TimeField(auto_now_add=True)),
                ('source', models.TextField()),
                ('problem',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='submissions',
                                   to='archive.Problem')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-date', '-time'],
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Test',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('file',
                 models.FileField(default=None,
                                  upload_to=archive.models.tests_dir)),
                ('problem',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='tests',
                                   to='archive.Problem')),
            ],
        ),
        migrations.CreateModel(
            name='TestInstance',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('evaluated', models.BooleanField(default=False)),
                ('details', models.TextField(default='')),
                ('verdict',
                 models.CharField(choices=[('AC', 'Accepted'),
                                           ('WA', 'Wrong Answer'),
                                           ('TLE', 'Time Limit Exceeded'),
                                           ('MLE', 'Memory Limit Exceeded'),
                                           ('RE', 'Runtime Error'),
                                           ('EE', 'Evaluation Error'),
                                           ('RNG', 'Running...')],
                                  default='RNG',
                                  max_length=5)),
                ('time', models.IntegerField(default=0)),
                ('memory', models.IntegerField(default=0)),
                ('submission',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='tests',
                                   to='archive.Submission')),
                ('test',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='archive.Test')),
            ],
        ),
        migrations.AddField(
            model_name='problem',
            name='tags',
            field=models.ManyToManyField(to='archive.Tag'),
        ),
        migrations.AddField(
            model_name='example',
            name='problem',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='examples',
                to='archive.Problem'),
        ),
    ]
Exemple #4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Artist',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('slug', models.SlugField(unique=True)),
                ('name', models.CharField(max_length=100, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Challenge',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('slug', models.SlugField(unique=True)),
                ('name', models.CharField(max_length=50, unique=True)),
                ('blurb', models.TextField(blank=True, max_length=100)),
                ('description', models.TextField(blank=True)),
                ('copyright_issues', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Session',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('slug', models.SlugField(unique=True)),
                ('date', models.DateField(default=django.utils.timezone.now)),
                ('challenge',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='archive.Challenge')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AudioFile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('slug', models.SlugField(unique=True)),
                ('session_subsection',
                 models.CharField(blank=True, default='', max_length=50)),
                ('data',
                 models.FileField(upload_to=archive.models.get_upload_path)),
                ('name', models.CharField(max_length=200)),
                ('artist',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='archive.Artist')),
                ('session',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='archive.Session')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Exemple #5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Collection',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=250,
                                           verbose_name='Namn')),
                ('type',
                 models.CharField(choices=[('Pictures', 'Bilder'),
                                           ('Documents', 'Dokument')],
                                  max_length=20)),
                ('pub_date',
                 models.DateTimeField(default=datetime.datetime.now,
                                      null=True)),
            ],
            options={
                'verbose_name': 'Samling',
                'verbose_name_plural': 'Samlingar',
            },
        ),
        migrations.CreateModel(
            name='Document',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=250)),
                ('document',
                 models.FileField(upload_to=archive.models.upload_to)),
                ('collection',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='archive.Collection',
                                   verbose_name='samling')),
            ],
            options={
                'verbose_name': 'dokument',
            },
        ),
        migrations.CreateModel(
            name='Picture',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(upload_to=archive.models.upload_to)),
                ('favorite', models.BooleanField(default=False)),
                ('collection',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='archive.Collection',
                                   verbose_name='Galleri')),
            ],
            options={
                'verbose_name': 'bild',
                'verbose_name_plural': 'bilder',
            },
        ),
    ]