Exemplo n.º 1
0
class Migration(migrations.Migration):

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Banque',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('cib',
                 models.CharField(db_index=True, max_length=5, blank=True)),
                ('nom',
                 models.CharField(unique=True, max_length=40, db_index=True)),
                ('notes', models.TextField(default=b'', blank=True)),
                ('lastupdate', gsb.model_field.ModificationDateTimeField()),
                ('uuid',
                 gsb.model_field.uuidfield(unique=True,
                                           max_length=36,
                                           editable=False,
                                           blank=True)),
            ],
            options={
                'ordering': ['nom'],
                'db_table': 'gsb_banque',
            },
        ),
        migrations.CreateModel(
            name='Cat',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('nom',
                 models.CharField(unique=True,
                                  max_length=50,
                                  verbose_name='nom de la cat\xe9gorie',
                                  db_index=True)),
                ('type',
                 models.CharField(default=b'd',
                                  max_length=1,
                                  verbose_name='type de la cat\xe9gorie',
                                  choices=[(b'r', 'recette'),
                                           (b'd', 'd\xe9pense'),
                                           (b'v', 'virement')])),
                ('lastupdate', gsb.model_field.ModificationDateTimeField()),
                ('date_created', gsb.model_field.CreationDateTimeField()),
                ('uuid',
                 gsb.model_field.uuidfield(unique=True,
                                           max_length=36,
                                           editable=False,
                                           blank=True)),
                ('couleur',
                 colorful.fields.RGBColorField(default=b'#FFFFFF',
                                               max_length=7)),
            ],
            options={
                'ordering': ['nom'],
                'db_table': 'gsb_cat',
                'verbose_name': 'cat\xe9gorie',
            },
        ),
        migrations.CreateModel(
            name='Compte',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('nom',
                 models.CharField(unique=True, max_length=40, db_index=True)),
                ('titulaire',
                 models.CharField(default=b'', max_length=40, blank=True)),
                ('type',
                 models.CharField(default=b'b',
                                  max_length=1,
                                  choices=[(b'b', 'bancaire'),
                                           (b'e', 'espece'), (b'p', 'passif'),
                                           (b't', 'titre'),
                                           (b'a', 'autre actifs')])),
                ('guichet',
                 models.CharField(default=b'', max_length=15, blank=True)),
                ('num_compte',
                 models.CharField(default=b'',
                                  max_length=20,
                                  db_index=True,
                                  blank=True)),
                ('cle_compte',
                 models.IntegerField(default=0, null=True, blank=True)),
                ('solde_init',
                 gsb.model_field.CurField(default=Decimal('0.00'),
                                          max_digits=15,
                                          decimal_places=2)),
                ('solde_mini_voulu',
                 gsb.model_field.CurField(default=0.0,
                                          null=True,
                                          max_digits=15,
                                          decimal_places=2,
                                          blank=True)),
                ('solde_mini_autorise',
                 gsb.model_field.CurField(default=0.0,
                                          null=True,
                                          max_digits=15,
                                          decimal_places=2,
                                          blank=True)),
                ('ouvert', models.BooleanField(default=True)),
                ('notes', models.TextField(default=b'', blank=True)),
                ('lastupdate', gsb.model_field.ModificationDateTimeField()),
                ('date_created', gsb.model_field.CreationDateTimeField()),
                ('uuid',
                 gsb.model_field.uuidfield(unique=True,
                                           max_length=36,
                                           editable=False,
                                           blank=True)),
                ('couleur',
                 colorful.fields.RGBColorField(default=b'#FFFFFF',
                                               max_length=7)),
                ('banque',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.SET_NULL,
                     default=None,
                     blank=True,
                     to='gsb.Banque',
                     null=True)),
            ],
            options={
                'ordering': ['nom'],
                'db_table': 'gsb_compte',
            },
        ),
        migrations.CreateModel(
            name='Config',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('derniere_import_money_journal',
                 models.DateTimeField(
                     default=datetime.datetime(1970, 1, 1, 0, 0))),
            ],
            options={
                'db_table': 'gsb_config',
            },
        ),
        migrations.CreateModel(
            name='Cours',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('date',
                 models.DateField(default=gsb.utils.today, db_index=True)),
                ('valeur',
                 gsb.model_field.CurField(default=1.0,
                                          max_digits=15,
                                          decimal_places=3)),
                ('lastupdate', gsb.model_field.ModificationDateTimeField()),
                ('date_created', gsb.model_field.CreationDateTimeField()),
                ('uuid',
                 gsb.model_field.uuidfield(unique=True,
                                           max_length=36,
                                           editable=False,
                                           blank=True)),
            ],
            options={
                'ordering': ['-date'],
                'db_table': 'gsb_cours',
                'verbose_name_plural': 'cours',
                'get_latest_by': 'date',
            },
        ),
        migrations.CreateModel(
            name='Db_log',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('date_time_action', gsb.model_field.CreationDateTimeField()),
                ('datamodel', models.CharField(max_length=20)),
                ('id_model', models.IntegerField()),
                ('uuid', models.CharField(max_length=255)),
                ('type_action', models.CharField(max_length=255)),
                ('memo', models.CharField(max_length=255)),
                ('date_ref', models.DateField(default=datetime.date.today)),
            ],
        ),
        migrations.CreateModel(
            name='Echeance',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('date',
                 models.DateField(default=gsb.utils.today, db_index=True)),
                ('date_limite',
                 models.DateField(default=None,
                                  null=True,
                                  db_index=True,
                                  blank=True)),
                ('intervalle', models.IntegerField(default=1)),
                ('periodicite',
                 models.CharField(default=b'u',
                                  max_length=1,
                                  choices=[(b'u', 'unique'), (b's', 'semaine'),
                                           (b'm', 'mois'), (b'a', 'ann\xe9e'),
                                           (b'j', 'jour')])),
                ('valide', models.BooleanField(default=True)),
                ('montant',
                 gsb.model_field.CurField(default=0.0,
                                          max_digits=15,
                                          decimal_places=2)),
                ('notes', models.TextField(default=b'', blank=True)),
                ('inscription_automatique',
                 models.BooleanField(default=False, help_text='inutile')),
                ('lastupdate', gsb.model_field.ModificationDateTimeField()),
                ('date_created', gsb.model_field.CreationDateTimeField()),
                ('uuid',
                 gsb.model_field.uuidfield(unique=True,
                                           max_length=36,
                                           editable=False,
                                           blank=True)),
                ('cat',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   verbose_name='cat\xe9gorie',
                                   to='gsb.Cat')),
                ('compte', models.ForeignKey(to='gsb.Compte')),
                ('compte_virement',
                 models.ForeignKey(related_name='echeance_virement_set',
                                   default=None,
                                   blank=True,
                                   to='gsb.Compte',
                                   null=True)),
            ],
            options={
                'ordering': ['date'],
                'db_table': 'gsb_echeance',
                'verbose_name': '\xe9ch\xe9ance',
                'verbose_name_plural': 'ech\xe9ances',
                'get_latest_by': 'date',
            },
        ),
        migrations.CreateModel(
            name='Exercice',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('date_debut', models.DateField(default=gsb.utils.today)),
                ('date_fin', models.DateField(null=True, blank=True)),
                ('nom',
                 models.CharField(unique=True, max_length=40, db_index=True)),
                ('lastupdate', gsb.model_field.ModificationDateTimeField()),
                ('date_created', gsb.model_field.CreationDateTimeField()),
                ('uuid',
                 gsb.model_field.uuidfield(unique=True,
                                           max_length=36,
                                           editable=False,
                                           blank=True)),
            ],
            options={
                'ordering': ['-date_debut'],
                'db_table': 'gsb_exercice',
                'get_latest_by': 'date_debut',
            },
        ),
        migrations.CreateModel(
            name='Ib',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('nom',
                 models.CharField(unique=True, max_length=40, db_index=True)),
                ('type',
                 models.CharField(default='d',
                                  max_length=1,
                                  choices=[(b'r', 'recette'),
                                           (b'd', 'd\xe9pense'),
                                           (b'v', 'virement')])),
                ('lastupdate', gsb.model_field.ModificationDateTimeField()),
                ('date_created', gsb.model_field.CreationDateTimeField()),
                ('uuid',
                 gsb.model_field.uuidfield(unique=True,
                                           max_length=36,
                                           editable=False,
                                           blank=True)),
            ],
            options={
                'ordering': ['type', 'nom'],
                'db_table': 'gsb_ib',
                'verbose_name': 'imputation budg\xe9taire',
                'verbose_name_plural': 'imputations budg\xe9taires',
            },
        ),
        migrations.CreateModel(
            name='Moyen',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('nom',
                 models.CharField(unique=True, max_length=40, db_index=True)),
                ('type',
                 models.CharField(default=b'd',
                                  max_length=1,
                                  choices=[(b'v', 'virement'),
                                           (b'd', 'depense'),
                                           (b'r', 'recette')])),
                ('lastupdate', gsb.model_field.ModificationDateTimeField()),
                ('date_created', gsb.model_field.CreationDateTimeField()),
                ('uuid',
                 gsb.model_field.uuidfield(unique=True,
                                           max_length=36,
                                           editable=False,
                                           blank=True)),
            ],
            options={
                'ordering': ['nom'],
                'db_table': 'gsb_moyen',
                'verbose_name': 'moyen de paiment',
                'verbose_name_plural': 'moyens de paiment',
            },
        ),
        migrations.CreateModel(
            name='Ope',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('date',
                 models.DateField(default=gsb.utils.today, db_index=True)),
                ('date_val',
                 models.DateField(default=None, null=True, blank=True)),
                ('montant',
                 gsb.model_field.CurField(default=0.0,
                                          max_digits=15,
                                          decimal_places=2)),
                ('notes', models.TextField(default=b'', blank=True)),
                ('num_cheque',
                 models.CharField(default=b'', max_length=20, blank=True)),
                ('pointe', models.BooleanField(default=False)),
                ('automatique',
                 models.BooleanField(
                     default=False,
                     help_text=
                     "si cette op\xe9ration est cr\xe9e \xe0 cause d'une \xe9cheance"
                 )),
                ('piece_comptable',
                 models.CharField(default=b'', max_length=20, blank=True)),
                ('lastupdate', gsb.model_field.ModificationDateTimeField()),
                ('date_created', gsb.model_field.CreationDateTimeField()),
                ('uuid',
                 gsb.model_field.uuidfield(unique=True,
                                           max_length=36,
                                           editable=False,
                                           blank=True)),
                ('cat',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   default=None,
                                   blank=True,
                                   to='gsb.Cat',
                                   null=True,
                                   verbose_name='Cat\xe9gorie')),
                ('compte', models.ForeignKey(to='gsb.Compte')),
                ('exercice',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.SET_NULL,
                     default=None,
                     blank=True,
                     to='gsb.Exercice',
                     null=True)),
                ('ib',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.SET_NULL,
                     default=None,
                     blank=True,
                     to='gsb.Ib',
                     null=True,
                     verbose_name='projet')),
                ('jumelle',
                 models.OneToOneField(related_name='jumelle_set',
                                      null=True,
                                      default=None,
                                      editable=False,
                                      to='gsb.Ope',
                                      blank=True)),
                ('mere',
                 models.ForeignKey(related_name='filles_set',
                                   default=None,
                                   blank=True,
                                   to='gsb.Ope',
                                   null=True,
                                   verbose_name='Mere')),
                ('moyen',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.SET_NULL,
                     default=None,
                     blank=True,
                     to='gsb.Moyen',
                     null=True)),
            ],
            options={
                'ordering': ['-date'],
                'db_table': 'gsb_ope',
                'verbose_name': 'op\xe9ration',
                'get_latest_by': 'date',
            },
        ),
        migrations.CreateModel(
            name='Ope_titre',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('nombre',
                 gsb.model_field.CurField(default=0,
                                          max_digits=15,
                                          decimal_places=6)),
                ('date', models.DateField(db_index=True)),
                ('cours',
                 gsb.model_field.CurField(default=1,
                                          max_digits=15,
                                          decimal_places=6)),
                ('lastupdate', gsb.model_field.ModificationDateTimeField()),
                ('date_created', gsb.model_field.CreationDateTimeField()),
                ('uuid',
                 gsb.model_field.uuidfield(unique=True,
                                           max_length=36,
                                           editable=False,
                                           blank=True)),
                ('compte',
                 models.ForeignKey(verbose_name='compte titre',
                                   to='gsb.Compte')),
            ],
            options={
                'ordering': ['-date'],
                'db_table': 'gsb_ope_titre',
                'verbose_name': 'Op\xe9ration titres(compta_matiere)',
                'verbose_name_plural': 'Op\xe9rations titres(compta_matiere)',
            },
        ),
        migrations.CreateModel(
            name='Rapp',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('nom',
                 models.CharField(unique=True, max_length=40, db_index=True)),
                ('date',
                 models.DateField(default=gsb.utils.today,
                                  null=True,
                                  blank=True)),
                ('lastupdate', gsb.model_field.ModificationDateTimeField()),
                ('date_created', gsb.model_field.CreationDateTimeField()),
                ('uuid',
                 gsb.model_field.uuidfield(unique=True,
                                           max_length=36,
                                           editable=False,
                                           blank=True)),
            ],
            options={
                'ordering': ['-date'],
                'db_table': 'gsb_rapp',
                'verbose_name': 'rapprochement',
                'get_latest_by': 'date',
            },
        ),
        migrations.CreateModel(
            name='Tiers',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('nom',
                 models.CharField(unique=True, max_length=40, db_index=True)),
                ('notes', models.TextField(default=b'', blank=True)),
                ('is_titre', models.BooleanField(default=False)),
                ('lastupdate', gsb.model_field.ModificationDateTimeField()),
                ('date_created', gsb.model_field.CreationDateTimeField()),
                ('uuid',
                 gsb.model_field.uuidfield(unique=True,
                                           max_length=36,
                                           editable=False,
                                           blank=True)),
                ('sort_nom', models.CharField(max_length=40, db_index=True)),
            ],
            options={
                'ordering': ['sort_nom'],
                'db_table': 'gsb_tiers',
                'verbose_name_plural': 'tiers',
            },
        ),
        migrations.CreateModel(
            name='Titre',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('nom',
                 models.CharField(unique=True, max_length=40, db_index=True)),
                ('isin',
                 models.CharField(unique=True, max_length=12, db_index=True)),
                ('type',
                 models.CharField(default=b'ZZZ',
                                  max_length=3,
                                  choices=[(b'ACT', 'action'),
                                           (b'OPC', 'opcvm'),
                                           (b'CSL', 'compte sur livret'),
                                           (b'OBL', 'obligation'),
                                           (b'ZZZ', 'autre')])),
                ('lastupdate', gsb.model_field.ModificationDateTimeField()),
                ('date_created', gsb.model_field.CreationDateTimeField()),
                ('uuid',
                 gsb.model_field.uuidfield(unique=True,
                                           max_length=36,
                                           editable=False,
                                           blank=True)),
            ],
            options={
                'ordering': ['nom'],
                'db_table': 'gsb_titre',
            },
        ),
        migrations.AddField(
            model_name='tiers',
            name='titre',
            field=models.OneToOneField(null=True,
                                       blank=True,
                                       editable=False,
                                       to='gsb.Titre'),
        ),
        migrations.AddField(
            model_name='ope_titre',
            name='titre',
            field=models.ForeignKey(to='gsb.Titre'),
        ),
        migrations.AddField(
            model_name='ope',
            name='ope_titre_ost',
            field=models.OneToOneField(related_name='ope_ost',
                                       null=True,
                                       editable=False,
                                       to='gsb.Ope_titre'),
        ),
        migrations.AddField(
            model_name='ope',
            name='ope_titre_pmv',
            field=models.OneToOneField(related_name='ope_pmv',
                                       null=True,
                                       editable=False,
                                       to='gsb.Ope_titre'),
        ),
        migrations.AddField(
            model_name='ope',
            name='rapp',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.SET_NULL,
                default=None,
                blank=True,
                to='gsb.Rapp',
                null=True,
                verbose_name='Rapprochement'),
        ),
        migrations.AddField(
            model_name='ope',
            name='tiers',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.SET_NULL,
                default=None,
                blank=True,
                to='gsb.Tiers',
                null=True),
        ),
        migrations.AddField(
            model_name='echeance',
            name='exercice',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.SET_NULL,
                default=None,
                blank=True,
                to='gsb.Exercice',
                null=True),
        ),
        migrations.AddField(
            model_name='echeance',
            name='ib',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.SET_NULL,
                default=None,
                blank=True,
                to='gsb.Ib',
                null=True,
                verbose_name='imputation'),
        ),
        migrations.AddField(
            model_name='echeance',
            name='moyen',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                default=None,
                to='gsb.Moyen'),
        ),
        migrations.AddField(
            model_name='echeance',
            name='moyen_virement',
            field=models.ForeignKey(related_name='echeance_moyen_virement_set',
                                    blank=True,
                                    to='gsb.Moyen',
                                    null=True),
        ),
        migrations.AddField(
            model_name='echeance',
            name='tiers',
            field=models.ForeignKey(
                to='gsb.Tiers', on_delete=django.db.models.deletion.PROTECT),
        ),
        migrations.AddField(
            model_name='cours',
            name='titre',
            field=models.ForeignKey(to='gsb.Titre'),
        ),
        migrations.AddField(
            model_name='compte',
            name='moyen_credit_defaut',
            field=models.ForeignKey(
                related_name='compte_moyen_credit_set',
                on_delete=django.db.models.deletion.PROTECT,
                default=None,
                blank=True,
                to='gsb.Moyen',
                null=True),
        ),
        migrations.AddField(
            model_name='compte',
            name='moyen_debit_defaut',
            field=models.ForeignKey(
                related_name='compte_moyen_debit_set',
                on_delete=django.db.models.deletion.PROTECT,
                default=None,
                blank=True,
                to='gsb.Moyen',
                null=True),
        ),
        migrations.AddField(
            model_name='compte',
            name='titre',
            field=models.ManyToManyField(to='gsb.Titre',
                                         through='gsb.Ope_titre'),
        ),
        migrations.AlterOrderWithRespectTo(
            name='ope',
            order_with_respect_to='compte',
        ),
        migrations.AlterUniqueTogether(
            name='cours',
            unique_together=set([('titre', 'date')]),
        ),
    ]
Exemplo n.º 2
0
class Migration(migrations.Migration):

    dependencies = [
        ('events', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('leaflets', '0001_initial'),
        ('schools', '0001_initial'),
        ('competitions', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='OrgSolution',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('added_at',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='added at')),
                ('modified_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='modified at')),
                ('added_by',
                 models.ForeignKey(related_name='OrgSolution_created',
                                   blank=True,
                                   editable=False,
                                   to=settings.AUTH_USER_MODEL,
                                   null=True,
                                   verbose_name='author')),
                ('modified_by',
                 models.ForeignKey(related_name='OrgSolution_modified',
                                   blank=True,
                                   editable=False,
                                   to=settings.AUTH_USER_MODEL,
                                   null=True,
                                   verbose_name='last modified by')),
                ('organizer',
                 models.ForeignKey(verbose_name='organizer',
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'organizer solution',
                'verbose_name_plural': 'organizer solutions',
            },
            bases=(models.Model, ),
        ),
        migrations.CreateModel(
            name='Problem',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('text',
                 models.TextField(
                     help_text=
                     'The problem itself. Please insert it in a valid TeX formatting.',
                     verbose_name='problem text')),
                ('result',
                 models.TextField(
                     help_text=
                     'The result of the problem. For problems that do not have simple results, a hint or short outline of the solution.',
                     null=True,
                     verbose_name='Result / short solution outline',
                     blank=True)),
                ('source',
                 models.CharField(
                     help_text=
                     'Source where you found the problem(if not original).',
                     max_length=500,
                     null=True,
                     verbose_name='problem source',
                     blank=True)),
                ('image',
                 models.ImageField(
                     storage=base.storage.OverwriteFileSystemStorage(),
                     upload_to=b'problems/',
                     blank=True,
                     help_text='Image added to the problem text.',
                     null=True,
                     verbose_name='image')),
                ('additional_files',
                 models.FileField(
                     storage=base.storage.OverwriteFileSystemStorage(),
                     upload_to=b'problems/',
                     blank=True,
                     help_text=
                     'Additional files stored with the problem (such as editable images).',
                     null=True,
                     verbose_name='additional files')),
                ('rating_votes',
                 models.PositiveIntegerField(default=0,
                                             editable=False,
                                             blank=True)),
                ('rating_score',
                 models.IntegerField(default=0, editable=False, blank=True)),
                ('added_at',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='added at')),
                ('modified_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='modified at')),
                ('added_by',
                 models.ForeignKey(related_name='Problem_created',
                                   blank=True,
                                   editable=False,
                                   to=settings.AUTH_USER_MODEL,
                                   null=True,
                                   verbose_name='author')),
            ],
            options={
                'verbose_name': 'problem',
                'verbose_name_plural': 'problems',
            },
            bases=(models.Model, ),
        ),
        migrations.CreateModel(
            name='ProblemCategory',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('name', models.CharField(max_length=50, verbose_name='name')),
                ('competition',
                 models.ForeignKey(
                     verbose_name='competition',
                     to='competitions.Competition',
                     help_text=
                     'The reference to the competition that uses this category. It makes sense to have categories specific to each competition, since problem types in competitions may differ significantly.'
                 )),
            ],
            options={
                'ordering': ['name'],
                'verbose_name': 'category',
                'verbose_name_plural': 'categories',
            },
            bases=(models.Model, ),
        ),
        migrations.CreateModel(
            name='ProblemInSet',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('position',
                 models.PositiveSmallIntegerField(verbose_name='position')),
                ('problem',
                 models.ForeignKey(verbose_name='problem',
                                   to='problems.Problem')),
            ],
            options={
                'ordering': ['position'],
                'verbose_name': 'problem',
                'verbose_name_plural': 'problems',
            },
            bases=(models.Model, ),
        ),
        migrations.CreateModel(
            name='ProblemSet',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('name', models.CharField(max_length=100,
                                          verbose_name=b'name')),
                ('description',
                 models.CharField(max_length=400,
                                  null=True,
                                  verbose_name=b'description',
                                  blank=True)),
                ('added_at',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='added at')),
                ('modified_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='modified at')),
                ('added_by',
                 models.ForeignKey(related_name='ProblemSet_created',
                                   blank=True,
                                   editable=False,
                                   to=settings.AUTH_USER_MODEL,
                                   null=True,
                                   verbose_name='author')),
                ('competition',
                 models.ForeignKey(verbose_name='competition',
                                   to='competitions.Competition')),
                ('event',
                 models.ForeignKey(verbose_name='event',
                                   blank=True,
                                   to='events.Event',
                                   null=True)),
                ('leaflet',
                 models.ForeignKey(verbose_name='leaflet',
                                   blank=True,
                                   to='leaflets.Leaflet',
                                   null=True)),
                ('modified_by',
                 models.ForeignKey(related_name='ProblemSet_modified',
                                   blank=True,
                                   editable=False,
                                   to=settings.AUTH_USER_MODEL,
                                   null=True,
                                   verbose_name='last modified by')),
                ('problems',
                 sortedm2m.fields.SortedManyToManyField(
                     help_text=None,
                     to='problems.Problem',
                     sort_value_field_name=b'position',
                     verbose_name='problems',
                     through='problems.ProblemInSet')),
            ],
            options={
                'verbose_name': 'Problem set',
                'verbose_name_plural': 'Problem sets',
            },
            bases=(models.Model, ),
        ),
        migrations.CreateModel(
            name='ProblemSeverity',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('name', models.CharField(max_length=50, verbose_name='name')),
                ('level', models.IntegerField(verbose_name='level')),
                ('competition',
                 models.ForeignKey(
                     verbose_name='competition',
                     to='competitions.Competition',
                     help_text=
                     'The reference to the competition that uses this severity. It makes sense to have severities specific to each competition, since organizers might have different ways of sorting the problems regarding their severity.'
                 )),
            ],
            options={
                'ordering': ['level'],
                'verbose_name': 'severity',
                'verbose_name_plural': 'severities',
            },
            bases=(models.Model, ),
        ),
        migrations.CreateModel(
            name='UserSolution',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('solution',
                 base.models.ContentTypeRestrictedFileField(
                     storage=base.storage.OverwriteFileSystemStorage(
                         base_url=b'/protected/',
                         location=
                         b'/home/tbabej/Projects/roots-env/roots/protected/'),
                     upload_to=problems.models.get_solution_path_global,
                     null=True,
                     verbose_name='solution')),
                ('corrected_solution',
                 base.models.ContentTypeRestrictedFileField(
                     storage=base.storage.OverwriteFileSystemStorage(
                         base_url=b'/protected/',
                         location=
                         b'/home/tbabej/Projects/roots-env/roots/protected/'),
                     upload_to=problems.models.
                     get_corrected_solution_path_global,
                     null=True,
                     verbose_name='corrected solution',
                     blank=True)),
                ('score',
                 models.IntegerField(null=True,
                                     verbose_name='score',
                                     blank=True)),
                ('classlevel',
                 models.CharField(
                     blank=True,
                     max_length=2,
                     null=True,
                     verbose_name='class level at the time of submission',
                     choices=[(b'Z2', b'Z2'), (b'Z3', b'Z3'), (b'Z4', b'Z4'),
                              (b'Z5', b'Z5'), (b'Z6', b'Z6'), (b'Z7', b'Z7'),
                              (b'Z8', b'Z8'), (b'Z9', b'Z9'), (b'S1', b'S1'),
                              (b'S2', b'S2'), (b'S3', b'S3'),
                              (b'S4', b'S4')])),
                ('school_class',
                 models.CharField(max_length=20,
                                  null=True,
                                  verbose_name='school class',
                                  blank=True)),
                ('note', models.CharField(max_length=200,
                                          null=True,
                                          blank=True)),
                ('user_modified_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='last user modification')),
                ('added_at',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='added at')),
                ('modified_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='modified at')),
                ('added_by',
                 models.ForeignKey(related_name='UserSolution_created',
                                   blank=True,
                                   editable=False,
                                   to=settings.AUTH_USER_MODEL,
                                   null=True,
                                   verbose_name='author')),
                ('corrected_by',
                 models.ManyToManyField(
                     related_name='usersolutions_corrected_set',
                     verbose_name='corrected by',
                     to=settings.AUTH_USER_MODEL)),
                ('modified_by',
                 models.ForeignKey(related_name='UserSolution_modified',
                                   blank=True,
                                   editable=False,
                                   to=settings.AUTH_USER_MODEL,
                                   null=True,
                                   verbose_name='last modified by')),
                ('problem',
                 models.ForeignKey(verbose_name='problem',
                                   to='problems.Problem')),
                ('school',
                 models.ForeignKey(verbose_name='school',
                                   blank=True,
                                   to='schools.School',
                                   null=True)),
                ('user',
                 models.ForeignKey(verbose_name='user',
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'user solution',
                'verbose_name_plural': 'user solutions',
            },
            bases=(base.models.MediaRemovalMixin,
                   downloads.models.AccessFilePermissionMixin, models.Model),
        ),
        migrations.AlterUniqueTogether(
            name='usersolution',
            unique_together=set([('user', 'problem')]),
        ),
        migrations.AlterOrderWithRespectTo(
            name='usersolution',
            order_with_respect_to='problem',
        ),
        migrations.AddField(
            model_name='probleminset',
            name='problemset',
            field=models.ForeignKey(verbose_name='problem set',
                                    to='problems.ProblemSet'),
            preserve_default=True,
        ),
        migrations.AlterUniqueTogether(
            name='probleminset',
            unique_together=set([('problem', 'problemset')]),
        ),
        migrations.AddField(
            model_name='problem',
            name='category',
            field=models.ForeignKey(verbose_name='category',
                                    to='problems.ProblemCategory'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='problem',
            name='competition',
            field=models.ForeignKey(verbose_name='competition',
                                    to='competitions.Competition'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='problem',
            name='modified_by',
            field=models.ForeignKey(related_name='Problem_modified',
                                    blank=True,
                                    editable=False,
                                    to=settings.AUTH_USER_MODEL,
                                    null=True,
                                    verbose_name='last modified by'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='problem',
            name='severity',
            field=models.ForeignKey(verbose_name='severity',
                                    to='problems.ProblemSeverity'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='orgsolution',
            name='problem',
            field=models.ForeignKey(verbose_name='problem',
                                    to='problems.Problem'),
            preserve_default=True,
        ),
        migrations.AlterOrderWithRespectTo(
            name='orgsolution',
            order_with_respect_to='problem',
        ),
    ]
Exemplo n.º 3
0
class Migration(migrations.Migration):

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='AdministrativeArea',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  verbose_name='ID',
                                  serialize=False,
                                  primary_key=True)),
                ('uuid',
                 uuidfield.fields.UUIDField(help_text='unique id',
                                            unique=True,
                                            editable=False,
                                            blank=True,
                                            default=b'',
                                            max_length=32)),
                ('name',
                 models.CharField(max_length=255,
                                  verbose_name='Name',
                                  db_index=True)),
                ('code',
                 models.CharField(help_text=b'ISO 3166-2 code',
                                  verbose_name='Code',
                                  db_index=True,
                                  blank=True,
                                  null=True,
                                  max_length=10)),
                ('lft',
                 models.PositiveIntegerField(editable=False, db_index=True)),
                ('rght',
                 models.PositiveIntegerField(editable=False, db_index=True)),
                ('tree_id',
                 models.PositiveIntegerField(editable=False, db_index=True)),
                ('level',
                 models.PositiveIntegerField(editable=False, db_index=True)),
                ('parent',
                 mptt.fields.TreeForeignKey(to='geo.AdministrativeArea',
                                            blank=True,
                                            default=None,
                                            null=True)),
            ],
            options={
                'verbose_name_plural': 'Administrative Areas',
                'ordering': [b'name'],
                'verbose_name': 'Administrative Area',
            },
            bases=(models.Model, ),
        ),
        migrations.CreateModel(
            name='AdministrativeAreaType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  verbose_name='ID',
                                  serialize=False,
                                  primary_key=True)),
                ('uuid',
                 uuidfield.fields.UUIDField(help_text='unique id',
                                            unique=True,
                                            editable=False,
                                            blank=True,
                                            default=b'',
                                            max_length=32)),
                ('name',
                 models.CharField(max_length=100,
                                  verbose_name='Name',
                                  db_index=True)),
                ('lft',
                 models.PositiveIntegerField(editable=False, db_index=True)),
                ('rght',
                 models.PositiveIntegerField(editable=False, db_index=True)),
                ('tree_id',
                 models.PositiveIntegerField(editable=False, db_index=True)),
                ('level',
                 models.PositiveIntegerField(editable=False, db_index=True)),
                ('parent',
                 mptt.fields.TreeForeignKey(to='geo.AdministrativeAreaType',
                                            blank=True,
                                            null=True)),
            ],
            options={
                'verbose_name_plural': 'Administrative Area Types',
                'ordering': [b'name'],
                'verbose_name': 'Administrative Area Type',
            },
            bases=(models.Model, ),
        ),
        migrations.AddField(
            model_name='administrativearea',
            name='type',
            field=models.ForeignKey(to='geo.AdministrativeAreaType'),
            preserve_default=True,
        ),
        migrations.CreateModel(
            name='Country',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  verbose_name='ID',
                                  serialize=False,
                                  primary_key=True)),
                ('iso_code',
                 models.CharField(
                     max_length=2,
                     db_index=True,
                     unique=True,
                     help_text=b'ISO 3166-1 alpha 2',
                     validators=[django.core.validators.MinLengthValidator(2)
                                 ])),
                ('iso_code3',
                 models.CharField(
                     max_length=3,
                     db_index=True,
                     unique=True,
                     help_text=b'ISO 3166-1 alpha 3',
                     validators=[django.core.validators.MinLengthValidator(3)
                                 ])),
                ('iso_num',
                 models.CharField(
                     max_length=3,
                     unique=True,
                     help_text=b'ISO 3166-1 numeric',
                     validators=[
                         django.core.validators.RegexValidator(b'\\d\\d\\d')
                     ])),
                ('uuid',
                 uuidfield.fields.UUIDField(help_text='unique id',
                                            unique=True,
                                            editable=False,
                                            blank=True,
                                            default=b'',
                                            max_length=32)),
                ('undp',
                 models.CharField(
                     validators=[django.core.validators.MinLengthValidator(3)],
                     help_text=b'UNDP code',
                     unique=True,
                     blank=True,
                     max_length=3,
                     null=True)),
                ('nato3',
                 models.CharField(
                     validators=[django.core.validators.MinLengthValidator(3)],
                     help_text=b'NATO3 code',
                     unique=True,
                     blank=True,
                     max_length=3,
                     null=True)),
                ('fips',
                 models.CharField(blank=True,
                                  max_length=255,
                                  help_text=b'fips code',
                                  null=True)),
                ('itu',
                 models.CharField(blank=True,
                                  max_length=255,
                                  help_text=b'ITU code',
                                  null=True)),
                ('icao',
                 models.CharField(blank=True,
                                  max_length=255,
                                  help_text=b'ICAO code',
                                  null=True)),
                ('name', models.CharField(max_length=100, db_index=True)),
                ('fullname', models.CharField(max_length=100, db_index=True)),
                ('continent',
                 models.CharField(choices=[(b'AF', 'Africa'),
                                           (b'AN', 'Antartica'),
                                           (b'AS', 'Asia'), (b'EU', 'Europe'),
                                           (b'NA', 'North America'),
                                           (b'OC', 'Oceania'),
                                           (b'SA', 'South America')],
                                  max_length=2)),
                ('tld',
                 models.CharField(blank=True,
                                  max_length=5,
                                  help_text=b'Internet tld',
                                  null=True)),
                ('phone_prefix',
                 models.CharField(blank=True,
                                  max_length=20,
                                  help_text=b'Phone prefix number',
                                  null=True)),
                ('timezone',
                 timezone_field.fields.TimeZoneField(blank=True,
                                                     default=None,
                                                     max_length=63,
                                                     choices=None,
                                                     null=True)),
                ('expired',
                 models.DateField(blank=True, default=None, null=True)),
                ('lat',
                 models.DecimalField(blank=True,
                                     decimal_places=12,
                                     verbose_name=b'Latitude',
                                     max_digits=18,
                                     null=True)),
                ('lng',
                 models.DecimalField(blank=True,
                                     decimal_places=12,
                                     verbose_name=b'Longitude',
                                     max_digits=18,
                                     null=True)),
                ('last_update', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': [b'name'],
                'verbose_name_plural': 'Countries',
            },
            bases=(models.Model, ),
        ),
        migrations.AddField(
            model_name='administrativeareatype',
            name='country',
            field=models.ForeignKey(to='geo.Country'),
            preserve_default=True,
        ),
        migrations.AlterOrderWithRespectTo(
            name='administrativeareatype',
            order_with_respect_to=b'country',
        ),
        migrations.AlterUniqueTogether(
            name='administrativeareatype',
            unique_together=set([(b'country', b'name')]),
        ),
        migrations.AddField(
            model_name='administrativearea',
            name='country',
            field=models.ForeignKey(to='geo.Country'),
            preserve_default=True,
        ),
        migrations.AlterOrderWithRespectTo(
            name='administrativearea',
            order_with_respect_to=b'country',
        ),
        migrations.AlterUniqueTogether(
            name='administrativearea',
            unique_together=set([(b'name', b'country', b'type')]),
        ),
        migrations.CreateModel(
            name='Currency',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  verbose_name='ID',
                                  serialize=False,
                                  primary_key=True)),
                ('uuid',
                 uuidfield.fields.UUIDField(help_text='unique id',
                                            unique=True,
                                            editable=False,
                                            blank=True,
                                            default=b'',
                                            max_length=32)),
                ('iso_code',
                 models.CharField(max_length=5,
                                  unique=True,
                                  help_text=b'ISO 4217 code',
                                  db_index=True)),
                ('numeric_code',
                 models.CharField(unique=True,
                                  help_text=b'ISO 4217 code',
                                  max_length=5)),
                ('decimals', models.IntegerField(default=0)),
                ('name', models.CharField(max_length=100)),
                ('symbol', models.CharField(blank=True,
                                            max_length=5,
                                            null=True)),
            ],
            options={
                'ordering': [b'iso_code'],
                'verbose_name_plural': b'Currencies',
            },
            bases=(models.Model, ),
        ),
        migrations.AddField(
            model_name='country',
            name='currency',
            field=models.ForeignKey(to='geo.Currency', blank=True, null=True),
            preserve_default=True,
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  verbose_name='ID',
                                  serialize=False,
                                  primary_key=True)),
                ('is_capital',
                 models.BooleanField(
                     default=False,
                     help_text=b'True if is the capital of `country`')),
                ('is_administrative',
                 models.BooleanField(
                     default=False,
                     help_text=b'True if is administrative for `area`')),
                ('uuid',
                 uuidfield.fields.UUIDField(help_text='unique id',
                                            unique=True,
                                            editable=False,
                                            blank=True,
                                            default=b'',
                                            max_length=32)),
                ('name',
                 models.CharField(max_length=255,
                                  verbose_name='Name',
                                  db_index=True)),
                ('loccode',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='UN LOCODE',
                                  db_index=True)),
                ('description',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('lat',
                 models.DecimalField(blank=True,
                                     decimal_places=12,
                                     max_digits=18,
                                     null=True)),
                ('lng',
                 models.DecimalField(blank=True,
                                     decimal_places=12,
                                     max_digits=18,
                                     null=True)),
                ('acc',
                 models.IntegerField(
                     blank=True,
                     default=0,
                     choices=[(0, 'None'), (10, 'Country'), (20, 'Exact')],
                     help_text=b'Define the level of accuracy of lat/lng infos',
                     null=True)),
                ('flags', bitfield.models.BitField(default=0, flags=[])),
                ('status',
                 models.CharField(
                     blank=True,
                     max_length=2,
                     choices=
                     [(b'AA',
                       b'Approved by competent national government agency'),
                      (b'AC',
                       b'Approved by Customs Authority'),
                      (b'AF',
                       b'Approved by national facilitation body'),
                      (b'AI',
                       b'Code adopted by international organisation (IATA or ECLAC)'
                       ),
                      (b'RL',
                       b'Recognised location - Existence and representation of location name confirmed by check against nominated gazetteer or other reference work'
                       ),
                      (b'RN',
                       b'Request from credible national sources for locations in their own country'
                       ), (b'RQ', b'Request under consideration'),
                      (b'RR', b'Request rejected'),
                      (b'QQ',
                       b'Original entry not verified since date indicated'),
                      (b'XX',
                       b'Entry that will be removed from the next issue of UN/LOCODE'
                       )],
                     null=True)),
                ('area',
                 models.ForeignKey(to='geo.AdministrativeArea',
                                   blank=True,
                                   null=True)),
                ('country', models.ForeignKey(to='geo.Country')),
            ],
            options={
                'verbose_name_plural': 'Locations',
                'ordering': (b'name', b'country'),
                'verbose_name': 'Location',
            },
            bases=(models.Model, ),
        ),
        migrations.AlterOrderWithRespectTo(
            name='location',
            order_with_respect_to=b'country',
        ),
        migrations.CreateModel(
            name='LocationType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  verbose_name='ID',
                                  serialize=False,
                                  primary_key=True)),
                ('uuid',
                 uuidfield.fields.UUIDField(help_text='unique id',
                                            unique=True,
                                            editable=False,
                                            blank=True,
                                            default=b'',
                                            max_length=32)),
                ('description', models.CharField(unique=True, max_length=100)),
            ],
            options={
                'verbose_name_plural': 'Location Types',
                'verbose_name': 'Location Type',
            },
            bases=(models.Model, ),
        ),
        migrations.AddField(
            model_name='location',
            name='type',
            field=models.ForeignKey(to='geo.LocationType',
                                    blank=True,
                                    null=True),
            preserve_default=True,
        ),
        migrations.AlterUniqueTogether(
            name='location',
            unique_together=set([(b'area', b'name')]),
        ),
        migrations.CreateModel(
            name='UNRegion',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  verbose_name='ID',
                                  serialize=False,
                                  primary_key=True)),
                ('code',
                 models.CharField(max_length=5, unique=True, db_index=True)),
                ('name', models.CharField(max_length=100)),
                ('last_update', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': [b'name'],
                'verbose_name_plural': 'UN Regions',
            },
            bases=(models.Model, ),
        ),
        migrations.AddField(
            model_name='country',
            name='region',
            field=models.ForeignKey(to='geo.UNRegion',
                                    blank=True,
                                    default=None,
                                    null=True),
            preserve_default=True,
        ),
    ]
Exemplo n.º 4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Blurb',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('identifier',
                 models.CharField(blank=True,
                                  max_length=256,
                                  null=True,
                                  unique=True)),
                ('label', models.TextField(blank=True, null=True)),
                ('content',
                 dt_content.fields.SummernoteField(blank=True, null=True)),
                ('plain_text',
                 models.BooleanField(default=False, editable=False)),
                ('last_known_location',
                 models.CharField(blank=True, max_length=200, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ContentBlock',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('disabled', models.BooleanField(default=False)),
                ('key',
                 models.CharField(blank=True,
                                  db_index=True,
                                  max_length=256,
                                  null=True)),
                ('static_location', models.URLField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='CarouselBlock',
            fields=[
                ('base',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='dt_content.ContentBlock')),
            ],
            bases=('dt_content.contentblock', ),
        ),
        migrations.CreateModel(
            name='RichTextBlock',
            fields=[
                ('base',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='dt_content.ContentBlock')),
                ('content',
                 dt_content.fields.SummernoteField(blank=True, default='')),
            ],
            bases=('dt_content.contentblock', ),
        ),
        migrations.CreateModel(
            name='Menu',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(db_index=True, max_length=256)),
                ('url_slug', models.SlugField(max_length=32)),
                ('disabled', models.BooleanField(default=False)),
                ('redirect_to', models.URLField(blank=True, null=True)),
                ('parent',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='children',
                                   to='dt_content.Menu')),
            ],
        ),
        migrations.CreateModel(
            name='ContentSection',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('key', models.CharField(db_index=True, max_length=256)),
                ('static_location', models.URLField(null=True)),
                ('menu',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='content_section',
                     to='dt_content.Menu')),
            ],
        ),
        migrations.AddField(
            model_name='contentblock',
            name='section',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='_blocks',
                to='dt_content.ContentSection'),
        ),
        migrations.AddIndex(
            model_name='blurb',
            index=models.Index(fields=['identifier'],
                               name='dt_content__identif_a63e57_idx'),
        ),
        migrations.AddIndex(
            model_name='blurb',
            index=models.Index(fields=['last_known_location', 'identifier'],
                               name='dt_content__last_kn_1368e9_idx'),
        ),
        migrations.AddIndex(
            model_name='menu',
            index=models.Index(fields=['parent', 'url_slug'],
                               name='dt_content__parent__8e384f_idx'),
        ),
        migrations.AddConstraint(
            model_name='menu',
            constraint=models.UniqueConstraint(
                condition=models.Q(parent__isnull=True),
                fields=('url_slug', ),
                name='unique_parent_url_slug'),
        ),
        migrations.AddConstraint(
            model_name='menu',
            constraint=models.UniqueConstraint(fields=('parent', 'url_slug'),
                                               name='unique_child_url_slug'),
        ),
        migrations.AlterOrderWithRespectTo(
            name='menu',
            order_with_respect_to='parent',
        ),
        migrations.AlterOrderWithRespectTo(
            name='contentblock',
            order_with_respect_to='section',
        ),
    ]
Exemplo n.º 5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 models.DateTimeField(auto_now_add=True, db_index=True)),
                ('modified', models.DateTimeField(blank=True, null=True)),
                ('text', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='QuestionChoice',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 models.DateTimeField(auto_now_add=True, db_index=True)),
                ('modified', models.DateTimeField(blank=True, null=True)),
                ('text', models.CharField(max_length=255)),
                ('question',
                 models.ForeignKey(editable=False,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='choices',
                                   to='questions.Question')),
            ],
        ),
        migrations.CreateModel(
            name='QuestionList',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 models.DateTimeField(auto_now_add=True, db_index=True)),
                ('modified', models.DateTimeField(blank=True, null=True)),
                ('name', models.CharField(max_length=255)),
                ('has_published', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='question',
            name='question_list',
            field=models.ForeignKey(
                editable=False,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='questions',
                to='questions.QuestionList'),
        ),
        migrations.AlterOrderWithRespectTo(
            name='questionchoice',
            order_with_respect_to='question',
        ),
        migrations.AlterOrderWithRespectTo(
            name='question',
            order_with_respect_to='question_list',
        ),
    ]
Exemplo n.º 6
0
 def test_create_alter_owrt_delete_model(self):
     self._test_create_alter_foo_delete_model(migrations.AlterOrderWithRespectTo("Foo", "a"))
Exemplo n.º 7
0
 def test_create_alter_owrt_field(self):
     self._test_create_alter_foo_field(migrations.AlterOrderWithRespectTo("Foo", "b"))
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.AddField(
            model_name='product',
            name='features',
            field=models.ManyToManyField(blank=True,
                                         related_name='features_for_product',
                                         to='specs.ProductFeatures'),
        ),
        migrations.AlterOrderWithRespectTo(
            name='product',
            order_with_respect_to='slug',
        ),
        migrations.AddField(
            model_name='order',
            name='cart',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='mainapp.Cart',
                verbose_name='Корзина'),
        ),
        migrations.AddField(
            model_name='order',
            name='customer',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='related_orders',
                to='mainapp.Customer',
                verbose_name='Покупатель'),
        ),
        migrations.AddField(
            model_name='customer',
            name='orders',
            field=models.ManyToManyField(related_name='related_order',
                                         to='mainapp.Order',
                                         verbose_name='Заказы покупателя'),
        ),
        migrations.AddField(
            model_name='customer',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL,
                verbose_name='Пользователь'),
        ),
        migrations.AddField(
            model_name='category',
            name='parent',
            field=mptt.fields.TreeForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='children',
                to='mainapp.Category'),
        ),
        migrations.AddField(
            model_name='cartproduct',
            name='cart',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='related_products',
                to='mainapp.Cart',
                verbose_name='Корзина'),
        ),
        migrations.AddField(
            model_name='cartproduct',
            name='product',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='mainapp.Product',
                verbose_name='Товар'),
        ),
        migrations.AddField(
            model_name='cartproduct',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='mainapp.Customer',
                verbose_name='Покупатель'),
        ),
        migrations.AddField(
            model_name='cart',
            name='owner',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='mainapp.Customer',
                verbose_name='Владелец'),
        ),
        migrations.AddField(
            model_name='cart',
            name='products',
            field=models.ManyToManyField(blank=True,
                                         related_name='related_cart',
                                         to='mainapp.CartProduct'),
        ),
    ]
Exemplo n.º 9
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Acceleration',
            fields=[
                ('temp_inv_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=3, null=True)),
                ('temp_inv_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=3, null=True)),
                ('temp_bat_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=3, null=True)),
                ('temp_bat_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=3, null=True)),
                ('temp_pneu_FL_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_FR_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_RL_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_RR_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_FL_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_FR_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_RL_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_RR_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_motor_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_motor_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('volt_min_ini', models.DecimalField(blank=True, decimal_places=0, default='', max_digits=4, null=True)),
                ('volt_min_end', models.DecimalField(blank=True, decimal_places=0, default='', max_digits=4, null=True)),
                ('comments', models.TextField(blank=True, default='', max_length=20000)),
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('time', models.DecimalField(decimal_places=3, default='', max_digits=5)),
                ('date', models.DateTimeField(auto_now=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AutoX',
            fields=[
                ('temp_inv_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=3, null=True)),
                ('temp_inv_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=3, null=True)),
                ('temp_bat_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=3, null=True)),
                ('temp_bat_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=3, null=True)),
                ('temp_pneu_FL_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_FR_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_RL_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_RR_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_FL_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_FR_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_RL_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_RR_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_motor_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_motor_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('volt_min_ini', models.DecimalField(blank=True, decimal_places=0, default='', max_digits=4, null=True)),
                ('volt_min_end', models.DecimalField(blank=True, decimal_places=0, default='', max_digits=4, null=True)),
                ('comments', models.TextField(blank=True, default='', max_length=20000)),
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('length_lap', models.DecimalField(decimal_places=2, default=100, max_digits=6)),
                ('time', models.DecimalField(decimal_places=3, default='', max_digits=7)),
                ('date', models.DateTimeField(auto_now=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Driver',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=200)),
                ('surname', models.CharField(default='', max_length=200)),
                ('email', models.EmailField(max_length=254)),
                ('weight', models.DecimalField(decimal_places=2, default=None, max_digits=4)),
                ('height', models.DecimalField(decimal_places=1, default=None, max_digits=4)),
                ('gender', models.TextField(choices=[(None, 'Select a gender'), ('M', 'Male'), ('F', 'Female')], default=None)),
                ('birthday', models.DateField()),
                ('creation', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Endurance',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('length_lap', models.DecimalField(decimal_places=2, default=100, max_digits=6)),
                ('number_laps', models.DecimalField(decimal_places=0, default=11, max_digits=3)),
            ],
        ),
        migrations.CreateModel(
            name='Lap_time',
            fields=[
                ('temp_inv_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=3, null=True)),
                ('temp_inv_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=3, null=True)),
                ('temp_bat_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=3, null=True)),
                ('temp_bat_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=3, null=True)),
                ('temp_pneu_FL_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_FR_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_RL_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_RR_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_FL_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_FR_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_RL_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_RR_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_motor_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_motor_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('volt_min_ini', models.DecimalField(blank=True, decimal_places=0, default='', max_digits=4, null=True)),
                ('volt_min_end', models.DecimalField(blank=True, decimal_places=0, default='', max_digits=4, null=True)),
                ('comments', models.TextField(blank=True, default='', max_length=20000)),
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('time', models.DecimalField(decimal_places=3, default='', max_digits=6)),
                ('driver', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='testing.Driver')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Skid_Pad',
            fields=[
                ('temp_inv_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=3, null=True)),
                ('temp_inv_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=3, null=True)),
                ('temp_bat_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=3, null=True)),
                ('temp_bat_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=3, null=True)),
                ('temp_pneu_FL_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_FR_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_RL_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_RR_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_FL_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_FR_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_RL_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_pneu_RR_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_motor_ini', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('temp_motor_end', models.DecimalField(blank=True, decimal_places=1, default='', max_digits=4, null=True)),
                ('volt_min_ini', models.DecimalField(blank=True, decimal_places=0, default='', max_digits=4, null=True)),
                ('volt_min_end', models.DecimalField(blank=True, decimal_places=0, default='', max_digits=4, null=True)),
                ('comments', models.TextField(blank=True, default='', max_length=20000)),
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('l1_time', models.DecimalField(decimal_places=3, default='', max_digits=5)),
                ('l2_time', models.DecimalField(decimal_places=3, default='', max_digits=5)),
                ('r1_time', models.DecimalField(decimal_places=3, default='', max_digits=5)),
                ('r2_time', models.DecimalField(decimal_places=3, default='', max_digits=5)),
                ('date', models.DateTimeField(auto_now=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Testing',
            fields=[
                ('front_camber', models.DecimalField(decimal_places=2, default=0, max_digits=3)),
                ('rear_camber', models.DecimalField(decimal_places=2, default=0, max_digits=3)),
                ('front_toe', models.DecimalField(decimal_places=2, default=0, max_digits=3)),
                ('rear_toe', models.DecimalField(decimal_places=2, default=0, max_digits=3)),
                ('front_pressure', models.DecimalField(decimal_places=2, default=0, max_digits=3)),
                ('rear_pressure', models.DecimalField(decimal_places=2, default=0, max_digits=3)),
                ('front_weight', models.DecimalField(decimal_places=2, default=0, max_digits=4)),
                ('rear_weight', models.DecimalField(decimal_places=2, default=0, max_digits=4)),
                ('front_height', models.DecimalField(decimal_places=2, default=0, max_digits=4)),
                ('rear_height', models.DecimalField(decimal_places=2, default=0, max_digits=4)),
                ('roll_bar', models.DecimalField(decimal_places=0, default=0, max_digits=2)),
                ('antiroll_bar', models.DecimalField(decimal_places=0, default=0, max_digits=2)),
                ('fw_flap1_degrees', models.DecimalField(decimal_places=1, default=0, max_digits=3)),
                ('fw_flap2_degrees', models.DecimalField(decimal_places=1, default=0, max_digits=3)),
                ('rw_flap1_degrees', models.DecimalField(decimal_places=1, default=0, max_digits=3)),
                ('rw_flap2_degrees', models.DecimalField(decimal_places=1, default=0, max_digits=3)),
                ('drs', models.BooleanField(default=True)),
                ('mode', models.DecimalField(decimal_places=0, default=0, max_digits=2)),
                ('cont_current_p', models.DecimalField(decimal_places=1, default=0, max_digits=3)),
                ('peak_current_p', models.DecimalField(decimal_places=1, default=0, max_digits=3)),
                ('kp_current', models.DecimalField(decimal_places=0, default=0, max_digits=5)),
                ('ti_current', models.DecimalField(decimal_places=0, default=0, max_digits=5)),
                ('kp_speed', models.DecimalField(decimal_places=0, default=0, max_digits=5)),
                ('ti_speed', models.DecimalField(decimal_places=0, default=0, max_digits=5)),
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('date', models.DateTimeField(auto_now=True)),
                ('location', models.CharField(default='', max_length=200)),
                ('event', models.TextField(choices=[('Acceleration', 'Acceleration'), ('Skid Pad', 'Skid Pad'), ('Autocross', 'Autocross'), ('Endurance', 'Endurance')], default='Acceleration')),
                ('comments', models.TextField(blank=True, default='', max_length=20000)),
                ('driver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_query_name='driver', to='testing.Driver')),
            ],
        ),
        migrations.AlterOrderWithRespectTo(
            name='testing',
            order_with_respect_to='id',
        ),
        migrations.AddField(
            model_name='skid_pad',
            name='params',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='testing.Testing'),
        ),
        migrations.AddField(
            model_name='endurance',
            name='setup_ini',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='setup_ini', to='testing.Testing'),
        ),
        migrations.AddField(
            model_name='endurance',
            name='setup_mid',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='setup_mid', to='testing.Testing'),
        ),
        migrations.AddField(
            model_name='endurance',
            name='time_lap',
            field=models.ManyToManyField(related_name='endurance', to='testing.Lap_time'),
        ),
        migrations.AddField(
            model_name='autox',
            name='params',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='testing.Testing'),
        ),
        migrations.AddField(
            model_name='acceleration',
            name='params',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='testing.Testing'),
        ),
    ]
Exemplo n.º 10
0
class Migration(migrations.Migration):

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='CognateClass',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('alias', models.CharField(max_length=3)),
                ('notes', models.TextField(blank=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('name',
                 cobl.lexicon.models.CharNullField(
                     blank=True,
                     max_length=128,
                     unique=True,
                     null=True,
                     validators=[cobl.lexicon.validators.suitable_for_url])),
            ],
            options={
                'ordering': ['alias'],
            },
        ),
        migrations.CreateModel(
            name='CognateClassCitation',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('pages', models.CharField(max_length=128, blank=True)),
                ('reliability',
                 models.CharField(
                     max_length=1,
                     choices=[(b'A', b'High'),
                              (b'B', b'Good (e.g. should be double checked)'),
                              (b'C', b'Doubtful'), (b'L', b'Loanword'),
                              (b'X', b'Exclude (e.g. not the Swadesh term)')
                              ])),
                ('comment', models.TextField(blank=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('cognate_class',
                 models.ForeignKey(to='lexicon.CognateClass')),
            ],
        ),
        migrations.CreateModel(
            name='CognateJudgement',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('cognate_class',
                 models.ForeignKey(to='lexicon.CognateClass')),
            ],
        ),
        migrations.CreateModel(
            name='CognateJudgementCitation',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('pages', models.CharField(max_length=128, blank=True)),
                ('reliability',
                 models.CharField(
                     max_length=1,
                     choices=[(b'A', b'High'),
                              (b'B', b'Good (e.g. should be double checked)'),
                              (b'C', b'Doubtful'), (b'L', b'Loanword'),
                              (b'X', b'Exclude (e.g. not the Swadesh term)')
                              ])),
                ('comment', models.TextField(blank=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('cognate_judgement',
                 models.ForeignKey(to='lexicon.CognateJudgement')),
            ],
        ),
        migrations.CreateModel(
            name='DyenCognateSet',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('name', models.CharField(max_length=8)),
                ('doubtful', models.BooleanField(default=0)),
                ('cognate_class',
                 models.ForeignKey(to='lexicon.CognateClass')),
            ],
        ),
        migrations.CreateModel(
            name='DyenName',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('name', models.CharField(max_length=128)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Language',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('iso_code', models.CharField(max_length=3, blank=True)),
                ('ascii_name',
                 models.CharField(
                     unique=True,
                     max_length=128,
                     validators=[cobl.lexicon.validators.suitable_for_url])),
                ('utf8_name', models.CharField(unique=True, max_length=128)),
                ('description', models.TextField(null=True, blank=True)),
            ],
            options={
                'ordering': ['ascii_name'],
            },
        ),
        migrations.CreateModel(
            name='LanguageList',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('name',
                 models.CharField(
                     unique=True,
                     max_length=128,
                     validators=[
                         cobl.lexicon.validators.suitable_for_url,
                         cobl.lexicon.validators.standard_reserved_names
                     ])),
                ('description', models.TextField(null=True, blank=True)),
                ('modified', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='LanguageListOrder',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('order', models.FloatField()),
                ('language', models.ForeignKey(to='lexicon.Language')),
                ('language_list',
                 models.ForeignKey(to='lexicon.LanguageList')),
            ],
            options={
                'ordering': ['order'],
            },
        ),
        migrations.CreateModel(
            name='Lexeme',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('source_form', models.CharField(max_length=128)),
                ('phon_form', models.CharField(max_length=128, blank=True)),
                ('gloss', models.CharField(max_length=128, blank=True)),
                ('notes', models.TextField(blank=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('number_cognate_coded',
                 models.IntegerField(default=0, editable=False)),
                ('denormalized_cognate_classes',
                 models.TextField(editable=False, blank=True)),
                ('cognate_class',
                 models.ManyToManyField(to='lexicon.CognateClass',
                                        through='lexicon.CognateJudgement',
                                        blank=True)),
                ('language', models.ForeignKey(to='lexicon.Language')),
            ],
        ),
        migrations.CreateModel(
            name='LexemeCitation',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('pages', models.CharField(max_length=128, blank=True)),
                ('reliability',
                 models.CharField(
                     max_length=1,
                     choices=[(b'A', b'High'),
                              (b'B', b'Good (e.g. should be double checked)'),
                              (b'C', b'Doubtful'), (b'L', b'Loanword'),
                              (b'X', b'Exclude (e.g. not the Swadesh term)')
                              ])),
                ('comment', models.TextField(blank=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('lexeme', models.ForeignKey(to='lexicon.Lexeme')),
            ],
        ),
        migrations.CreateModel(
            name='Meaning',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('gloss',
                 models.CharField(
                     max_length=64,
                     validators=[cobl.lexicon.validators.suitable_for_url])),
                ('description', models.CharField(max_length=64, blank=True)),
                ('notes', models.TextField(blank=True)),
                ('percent_coded', models.FloatField(default=0,
                                                    editable=False)),
            ],
            options={
                'ordering': ['gloss'],
            },
        ),
        migrations.CreateModel(
            name='MeaningList',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('name',
                 models.CharField(
                     max_length=128,
                     validators=[
                         cobl.lexicon.validators.suitable_for_url,
                         cobl.lexicon.validators.standard_reserved_names
                     ])),
                ('description', models.TextField(null=True, blank=True)),
                ('modified', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='MeaningListOrder',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('order', models.FloatField()),
                ('meaning', models.ForeignKey(to='lexicon.Meaning')),
                ('meaning_list', models.ForeignKey(to='lexicon.MeaningList')),
            ],
            options={
                'ordering': ['order'],
            },
        ),
        migrations.CreateModel(
            name='Source',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('citation_text', models.TextField(unique=True)),
                ('type_code',
                 models.CharField(default=b'P',
                                  max_length=1,
                                  choices=[(b'P', b'Publication'),
                                           (b'U', b'URL'),
                                           (b'E', b'Expert')])),
                ('description', models.TextField(blank=True)),
                ('modified', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['type_code', 'citation_text'],
            },
        ),
        migrations.AddField(
            model_name='meaninglist',
            name='meanings',
            field=models.ManyToManyField(to='lexicon.Meaning',
                                         through='lexicon.MeaningListOrder'),
        ),
        migrations.AddField(
            model_name='lexemecitation',
            name='source',
            field=models.ForeignKey(to='lexicon.Source'),
        ),
        migrations.AddField(
            model_name='lexeme',
            name='meaning',
            field=models.ForeignKey(blank=True,
                                    to='lexicon.Meaning',
                                    null=True),
        ),
        migrations.AddField(
            model_name='lexeme',
            name='source',
            field=models.ManyToManyField(to='lexicon.Source',
                                         through='lexicon.LexemeCitation',
                                         blank=True),
        ),
        migrations.AddField(
            model_name='languagelist',
            name='languages',
            field=models.ManyToManyField(to='lexicon.Language',
                                         through='lexicon.LanguageListOrder'),
        ),
        migrations.AddField(
            model_name='dyenname',
            name='language',
            field=models.ForeignKey(to='lexicon.Language'),
        ),
        migrations.AddField(
            model_name='cognatejudgementcitation',
            name='source',
            field=models.ForeignKey(to='lexicon.Source'),
        ),
        migrations.AddField(
            model_name='cognatejudgement',
            name='lexeme',
            field=models.ForeignKey(to='lexicon.Lexeme'),
        ),
        migrations.AddField(
            model_name='cognatejudgement',
            name='source',
            field=models.ManyToManyField(
                to='lexicon.Source',
                through='lexicon.CognateJudgementCitation'),
        ),
        migrations.AddField(
            model_name='cognateclasscitation',
            name='source',
            field=models.ForeignKey(to='lexicon.Source'),
        ),
        migrations.AlterUniqueTogether(
            name='meaninglistorder',
            unique_together=set([('meaning_list', 'order'),
                                 ('meaning_list', 'meaning')]),
        ),
        migrations.AlterUniqueTogether(
            name='lexemecitation',
            unique_together=set([('lexeme', 'source')]),
        ),
        migrations.AlterOrderWithRespectTo(
            name='lexeme',
            order_with_respect_to='language',
        ),
        migrations.AlterUniqueTogether(
            name='languagelistorder',
            unique_together=set([('language_list', 'language'),
                                 ('language_list', 'order')]),
        ),
        migrations.AlterUniqueTogether(
            name='cognatejudgementcitation',
            unique_together=set([('cognate_judgement', 'source')]),
        ),
        migrations.AlterUniqueTogether(
            name='cognateclasscitation',
            unique_together=set([('cognate_class', 'source')]),
        ),
    ]
Exemplo n.º 11
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Participant',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('status',
                 models.CharField(choices=[('invited', 'Invited'),
                                           ('joined', 'Joined'),
                                           ('declined', 'Declined'),
                                           ('remaining', 'Remaining'),
                                           ('eliminated', 'Eliminated')],
                                  default='invited',
                                  max_length=10)),
                ('throw',
                 models.CharField(blank=True,
                                  choices=[('rock', 'Rock'),
                                           ('paper', 'Paper'),
                                           ('scissors', 'Scissors')],
                                  max_length=8)),
            ],
        ),
        migrations.CreateModel(
            name='Roche',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(help_text='What the person has to do',
                                  max_length=300)),
                ('description',
                 models.TextField(help_text='Conditions, stipulations, etc')),
                ('condition',
                 models.CharField(choices=[('win', 'Win'), ('loss', 'Loss')],
                                  default='loss',
                                  max_length=4)),
                ('condition_count',
                 models.IntegerField(default=1,
                                     help_text='How many wins or losses?')),
                ('status',
                 models.CharField(choices=[('open', 'Open'),
                                           ('in-progress', 'In Progress'),
                                           ('complete', 'Complete'),
                                           ('fulfilled', 'Fulfilled'),
                                           ('expired', 'Expired')],
                                  default='open',
                                  max_length=11)),
                ('fulfilled_at',
                 models.DateTimeField(
                     help_text='When was the roche fulfilled?')),
                ('proof',
                 models.TextField(help_text='Describe what happened')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('created_by',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='created_by',
                                   to=settings.AUTH_USER_MODEL)),
                ('performer',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='performer',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='Round',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('number', models.IntegerField(default=1)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('completed_at', models.DateTimeField()),
                ('roche',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Roche')),
            ],
        ),
        migrations.AddField(
            model_name='participant',
            name='roche',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='core.Roche'),
        ),
        migrations.AddField(
            model_name='participant',
            name='round',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='core.Round'),
        ),
        migrations.AddField(
            model_name='participant',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterOrderWithRespectTo(
            name='round',
            order_with_respect_to='roche',
        ),
        migrations.AlterOrderWithRespectTo(
            name='participant',
            order_with_respect_to='round',
        ),
    ]
Exemplo n.º 12
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='CaseActivity',
            fields=[
                ('id',
                 models.AutoField(serialize=False,
                                  auto_created=True,
                                  primary_key=True,
                                  verbose_name='ID')),
                ('activity',
                 exeapp.models.idevices.fields.RichTextField(
                     default='',
                     help_text=
                     'Describe the activity tasks relevant to the case storyprovided. These could be in the form of questions or instructions for activity which may lead the learner to resolving a dilemma presented. ',
                     blank=True)),
                ('feedback',
                 exeapp.models.idevices.fields.FeedbackField(
                     default='',
                     help_text='Provide relevant feedback on the situation',
                     blank=True)),
            ],
            options={},
            bases=(models.Model, ),
        ),
        migrations.CreateModel(
            name='DublinCore',
            fields=[
                ('id',
                 models.AutoField(serialize=False,
                                  auto_created=True,
                                  primary_key=True,
                                  verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=128)),
                ('creator', models.CharField(blank=True, max_length=128)),
                ('subject', models.CharField(blank=True, max_length=256)),
                ('description', models.TextField(blank=True)),
                ('publisher', models.CharField(blank=True, max_length=128)),
                ('contributors', models.TextField(blank=True, max_length=256)),
                ('date', models.DateField(default=datetime.date.today)),
                ('type', models.CharField(blank=True, max_length=256)),
                ('format', models.CharField(blank=True, max_length=128)),
                ('identifier', models.CharField(blank=True, max_length=128)),
                ('source', models.CharField(blank=True, max_length=128)),
                ('language', models.CharField(blank=True, max_length=32)),
                ('relation', models.CharField(blank=True, max_length=256)),
                ('coverage', models.CharField(blank=True, max_length=128)),
                ('rights', models.CharField(blank=True, max_length=256)),
            ],
            options={},
            bases=(models.Model, ),
        ),
        migrations.CreateModel(
            name='FreeTextVersion',
            fields=[
                ('id',
                 models.AutoField(serialize=False,
                                  auto_created=True,
                                  primary_key=True,
                                  verbose_name='ID')),
                ('content',
                 exeapp.models.idevices.fields.RichTextField(default='',
                                                             blank=True)),
                ('date_created',
                 models.DateTimeField(
                     default=datetime.datetime(2014, 9, 18, 16, 35, 3, 614202))
                 ),
            ],
            options={},
            bases=(models.Model, ),
        ),
        migrations.CreateModel(
            name='GlossaryTerm',
            fields=[
                ('id',
                 models.AutoField(serialize=False,
                                  auto_created=True,
                                  primary_key=True,
                                  verbose_name='ID')),
                ('title',
                 exeapp.models.idevices.fields.RichTextField(
                     default='',
                     help_text='Enter term you want to describe',
                     blank=True,
                     max_length=100)),
                ('definition',
                 exeapp.models.idevices.fields.RichTextField(
                     default='',
                     help_text='Enter definition of the term',
                     blank=True)),
            ],
            options={},
            bases=(models.Model, ),
        ),
        migrations.CreateModel(
            name='Idevice',
            fields=[
                ('id',
                 models.AutoField(serialize=False,
                                  auto_created=True,
                                  primary_key=True,
                                  verbose_name='ID')),
                ('edit', models.BooleanField(default=True)),
                ('child_type',
                 models.CharField(blank=True, max_length=32, editable=False)),
            ],
            options={},
            bases=(models.Model, ),
        ),
        migrations.CreateModel(
            name='GlossaryIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('title', models.CharField(default='Glossary',
                                           max_length=100)),
            ],
            options={},
            bases=('exeapp.idevice', ),
        ),
        migrations.CreateModel(
            name='FeedbackIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('email',
                 models.EmailField(default='', blank=True, max_length=50)),
                ('subject',
                 models.CharField(default='', blank=True, max_length=200)),
            ],
            options={},
            bases=('exeapp.idevice', ),
        ),
        migrations.CreateModel(
            name='ExternalURLIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('url',
                 models.CharField(
                     default='',
                     help_text=
                     'Enter the URL you wish to display\nand select the size of the area to display it in.',
                     blank=True,
                     max_length=200)),
                ('height', models.PositiveIntegerField(default=300)),
            ],
            options={},
            bases=('exeapp.idevice', ),
        ),
        migrations.CreateModel(
            name='CaseStudyIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('title', models.CharField(default='Case Study',
                                           max_length=100)),
                ('story',
                 exeapp.models.idevices.fields.RichTextField(
                     default='',
                     help_text=
                     'Create the case story. A good case is one\n        that describes a controversy or sets the scene by describing\n        the characters involved and the situation. It should also allow for\n        some action to be taken in order to gain resolution of the\n        situation.',
                     blank=True)),
            ],
            options={},
            bases=('exeapp.idevice', ),
        ),
        migrations.CreateModel(
            name='AppletIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('java_file',
                 filebrowser.fields.FileBrowseField(verbose_name='Java Applet',
                                                    blank=True,
                                                    null=True,
                                                    max_length=100)),
            ],
            options={},
            bases=('exeapp.idevice', ),
        ),
        migrations.CreateModel(
            name='MultiChoiceIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('title',
                 models.CharField(default='Multiple Choice', max_length=100)),
                ('question',
                 exeapp.models.idevices.fields.RichTextField(
                     default='',
                     help_text=
                     'Create a multiple choice questionary to review the\n    learned material. Click "Add option" to add more answer options',
                     blank=True)),
            ],
            options={},
            bases=('exeapp.idevice', ),
        ),
        migrations.CreateModel(
            name='MultiChoiceOptionIdevice',
            fields=[
                ('id',
                 models.AutoField(serialize=False,
                                  auto_created=True,
                                  primary_key=True,
                                  verbose_name='ID')),
                ('option',
                 exeapp.models.idevices.fields.MultiChoiceOptionField(
                     default='',
                     help_text=
                     "An answer option for the multiple choice question. Check the 'right answer' checkmark to mark the right option",
                     blank=True)),
                ('right_answer', models.BooleanField(default=False)),
                ('idevice',
                 models.ForeignKey(to='exeapp.MultiChoiceIdevice',
                                   related_name='options')),
            ],
            options={},
            bases=(models.Model, ),
        ),
        migrations.CreateModel(
            name='Node',
            fields=[
                ('id',
                 models.AutoField(serialize=False,
                                  auto_created=True,
                                  primary_key=True,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('is_root', models.BooleanField(default=False)),
            ],
            options={},
            bases=(models.Model, ),
        ),
        migrations.CreateModel(
            name='Package',
            fields=[
                ('id',
                 models.AutoField(serialize=False,
                                  auto_created=True,
                                  primary_key=True,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('author', models.CharField(blank=True, max_length=50)),
                ('email', models.EmailField(blank=True, max_length=50)),
                ('description', models.CharField(blank=True, max_length=256)),
                ('backgroundImg',
                 models.ImageField(upload_to='background',
                                   blank=True,
                                   null=True)),
                ('backgroundImgTile', models.BooleanField(default=False)),
                ('footer', models.CharField(blank=True, max_length=100)),
                ('footerImg',
                 models.ImageField(upload_to='footer', blank=True, null=True)),
                ('license', models.CharField(blank=True, max_length=50)),
                ('style', models.CharField(default='default', max_length=20)),
                ('resourceDir',
                 models.FileField(upload_to='resources', blank=True,
                                  null=True)),
                ('level1', models.CharField(default='Topic', max_length=20)),
                ('level2', models.CharField(default='Section', max_length=20)),
                ('level3', models.CharField(default='Unit', max_length=20)),
                ('collaborators',
                 models.ManyToManyField(to=settings.AUTH_USER_MODEL,
                                        related_name='shared_packages')),
                ('dublincore', models.OneToOneField(to='exeapp.DublinCore')),
                ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
            ],
            options={},
            bases=(models.Model, ),
        ),
        migrations.CreateModel(
            name='PDFIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('pdf_file',
                 filebrowser.fields.FileBrowseField(verbose_name='PDF',
                                                    blank=True,
                                                    null=True,
                                                    max_length=100)),
                ('modified_pdf_file',
                 models.FilePathField(blank=True, null=True, editable=False)),
                ('page_list',
                 models.CharField(
                     default='',
                     help_text=
                     'Input coma-separated pages or page ranges to import. For example: 1,2,3-8. Leave empty to import all pages',
                     blank=True,
                     max_length=50)),
            ],
            options={},
            bases=('exeapp.idevice', ),
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id',
                 models.AutoField(serialize=False,
                                  auto_created=True,
                                  primary_key=True,
                                  verbose_name='ID')),
                ('user',
                 models.OneToOneField(related_name='profile',
                                      to=settings.AUTH_USER_MODEL)),
            ],
            options={},
            bases=(models.Model, ),
        ),
        migrations.AddField(
            model_name='node',
            name='package',
            field=models.ForeignKey(to='exeapp.Package', related_name='nodes'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='node',
            name='parent',
            field=models.ForeignKey(related_name='children',
                                    blank=True,
                                    to='exeapp.Node',
                                    null=True),
            preserve_default=True,
        ),
        migrations.AlterOrderWithRespectTo(
            name='node',
            order_with_respect_to='parent',
        ),
        migrations.AddField(
            model_name='idevice',
            name='parent_node',
            field=models.ForeignKey(to='exeapp.Node', related_name='idevices'),
            preserve_default=True,
        ),
        migrations.AlterOrderWithRespectTo(
            name='idevice',
            order_with_respect_to='parent_node',
        ),
        migrations.AddField(
            model_name='glossaryterm',
            name='idevice',
            field=models.ForeignKey(to='exeapp.GlossaryIdevice',
                                    related_name='terms'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='caseactivity',
            name='idevice',
            field=models.ForeignKey(to='exeapp.CaseStudyIdevice',
                                    related_name='terms'),
            preserve_default=True,
        ),
        migrations.CreateModel(
            name='GenericIdevice',
            fields=[],
            options={
                'proxy': True,
            },
            bases=('exeapp.idevice', ),
        ),
        migrations.CreateModel(
            name='WikipediaIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('title',
                 models.CharField(default='Wiki Article', max_length=100)),
                ('article_name',
                 exeapp.models.idevices.fields.URLField(
                     default='',
                     help_text=
                     'Enter a phrase or term you\n                                   wish to search\nwithin Wikipedia.',
                     blank=True,
                     max_length=100)),
                ('language',
                 models.CharField(default='en',
                                  max_length=2,
                                  choices=[('de', 'DE'), ('en', 'EN')])),
                ('content',
                 exeapp.models.idevices.fields.RichTextField(default='',
                                                             blank=True)),
            ],
            options={},
            bases=('exeapp.genericidevice', ),
        ),
        migrations.CreateModel(
            name='TOCIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('content',
                 exeapp.models.idevices.fields.RichTextField(default='',
                                                             blank=True)),
            ],
            options={},
            bases=('exeapp.genericidevice', ),
        ),
        migrations.CreateModel(
            name='RSSIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('title', models.CharField(default='RSS', max_length=100)),
                ('rss_url',
                 exeapp.models.idevices.fields.URLField(
                     default='',
                     help_text=
                     'Enter an RSS URL for the RSS\n                              feed you\nwant to attach to your content. Feeds are often identified by a small graphic\n icon (often like this <img src="/static/images/feed-icon.png" />) or the\n text "RSS". Clicking on the\n icon or text label will display an RSS feed right in your browser. You can\n copy and paste the\nURL into this field. Alternately, right clicking on the link or graphic will\nopen a menu box;\nclick on COPY LINK LOCATION or Copy Shortcut. Back in eXe open the RSS\nbookmark iDevice and Paste the URL\ninto the RSS URL field and click the LOAD button. This will extract the\ntitles from your feed and\ndisplay them as links in your content. From here you can edit the bookmarks\nand add\n instructions or additional learning information.',
                     blank=True,
                     max_length=200)),
                ('content',
                 exeapp.models.idevices.fields.RichTextField(default='',
                                                             blank=True)),
            ],
            options={},
            bases=('exeapp.genericidevice', ),
        ),
        migrations.CreateModel(
            name='ReflectionIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('title', models.CharField(default='Reflection',
                                           max_length=100)),
                ('activity',
                 exeapp.models.idevices.fields.RichTextField(
                     default='',
                     help_text=
                     'Enter a question for learners to\n                                        reflect upon.',
                     blank=True)),
                ('answer',
                 exeapp.models.idevices.fields.FeedbackField(
                     default='',
                     help_text=
                     'Describe how learners will assess how\nthey have done in the exercise. (Rubrics are useful devices for providing\nreflective feedback.)',
                     blank=True)),
            ],
            options={},
            bases=('exeapp.genericidevice', ),
        ),
        migrations.CreateModel(
            name='ReadingActivityIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('title',
                 models.CharField(default='Reading Activity', max_length=100)),
                ('to_read',
                 exeapp.models.idevices.fields.RichTextField(
                     default='',
                     help_text=
                     'Enter the details of the reading\n    including reference details. The\n    referencing style used will depend on the preference of your faculty or\n    department.',
                     blank=True)),
                ('activity',
                 exeapp.models.idevices.fields.RichTextField(
                     default='',
                     help_text=
                     'Describe the tasks related to the reading learners should undertake.\n        This helps demonstrate relevance for learners.',
                     blank=True)),
                ('feedback',
                 exeapp.models.idevices.fields.FeedbackField(
                     default='',
                     help_text=
                     'Use feedback to provide a summary of the points covered in the reading,\nor as a starting point for further analysis of the reading by posing a question\nor providing a statement to begin a debate.',
                     blank=True)),
            ],
            options={},
            bases=('exeapp.genericidevice', ),
        ),
        migrations.CreateModel(
            name='PreknowledgeIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('title',
                 models.CharField(default='Preknowledge', max_length=100)),
                ('content',
                 exeapp.models.idevices.fields.RichTextField(
                     default='',
                     help_text=
                     'Describe the prerequisite knowledge learners\n                        should have to effectively complete this learning.',
                     blank=True)),
            ],
            options={},
            bases=('exeapp.genericidevice', ),
        ),
        migrations.CreateModel(
            name='ObjectivesIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('title', models.CharField(default='Objectives',
                                           max_length=100)),
                ('content',
                 exeapp.models.idevices.fields.RichTextField(
                     default='',
                     help_text=
                     'Type the learning objectives for this resource.',
                     blank=True)),
            ],
            options={},
            bases=('exeapp.genericidevice', ),
        ),
        migrations.CreateModel(
            name='FreeTextIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('content',
                 exeapp.models.idevices.fields.RichTextField(default='',
                                                             blank=True)),
                ('date_created',
                 models.DateTimeField(blank=True, null=True, editable=False)),
            ],
            options={},
            bases=('exeapp.genericidevice', ),
        ),
        migrations.AddField(
            model_name='freetextversion',
            name='idevice',
            field=models.ForeignKey(to='exeapp.FreeTextIdevice',
                                    related_name='versions'),
            preserve_default=True,
        ),
        migrations.CreateModel(
            name='CommentIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('title', models.CharField(default='Remark', max_length=100)),
                ('content',
                 exeapp.models.idevices.fields.RichTextField(
                     default='',
                     help_text=
                     "Use this field to leave a\ncomment for people who works on this package with you.\nThis iDevice won't be exported",
                     blank=True)),
            ],
            options={},
            bases=('exeapp.genericidevice', ),
        ),
        migrations.CreateModel(
            name='ClozeIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('title', models.CharField(default='Cloze', max_length=100)),
                ('description',
                 exeapp.models.idevices.fields.RichTextField(
                     default='',
                     help_text=
                     'Provide instruction on how the cloze activity should be\ncompleted. Default text will be entered if there are no changes to this field.\n',
                     blank=True)),
                ('cloze_text',
                 exeapp.models.idevices.fields.ClozeTextField(
                     default='',
                     help_text=
                     'Enter the text for the cloze activity in to the cloze field\nby either pasting text from another source or by typing text directly into the\nfield.To select words to hide, double click on the word to select it and\nclick on the underscore button in the toolbar.',
                     blank=True)),
                ('feedback',
                 exeapp.models.idevices.fields.FeedbackField(
                     default='',
                     help_text=
                     'Enter any feedback you wish to provide the learner\n                with-in the feedback field. This field can be left blank.',
                     blank=True)),
            ],
            options={},
            bases=('exeapp.genericidevice', ),
        ),
        migrations.CreateModel(
            name='ActivityIdevice',
            fields=[
                ('idevice_ptr',
                 models.OneToOneField(auto_created=True,
                                      primary_key=True,
                                      parent_link=True,
                                      serialize=False,
                                      to='exeapp.Idevice')),
                ('title', models.CharField(default='Activity',
                                           max_length=100)),
                ('content',
                 exeapp.models.idevices.fields.RichTextField(
                     default='',
                     help_text=
                     'Describe the tasks the learners should complete.',
                     blank=True)),
            ],
            options={},
            bases=('exeapp.genericidevice', ),
        ),
    ]
Exemplo n.º 13
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Answer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('text',
                 models.TextField(default='', verbose_name='answer text')),
                ('correct', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='Collaborator',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('context', models.CharField(default='', max_length=100)),
                ('instance', models.CharField(default='', max_length=200)),
                ('name', models.CharField(default='', max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Mooclet',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(default='', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='MoocletType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('display_name', models.CharField(max_length=200)),
                ('content_type',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='contenttypes.ContentType')),
            ],
        ),
        migrations.CreateModel(
            name='Policy',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name_plural': 'policies',
            },
        ),
        migrations.CreateModel(
            name='Quiz',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100, verbose_name='quiz name')),
                ('url', models.URLField(blank=True, default='')),
                ('course',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='engine.Course')),
                ('mooclet_next_question',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='engine.Mooclet')),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'quizzes',
            },
        ),
        migrations.CreateModel(
            name='Response',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('grade', models.FloatField()),
                ('timestamp', models.DateTimeField(auto_now=True, null=True)),
                ('answer',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='engine.Answer')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Value',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('object_id', models.PositiveIntegerField(null=True)),
                ('value', models.FloatField()),
                ('timestamp', models.DateTimeField(auto_now=True, null=True)),
                ('user',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Variable',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('is_user_variable', models.BooleanField(default=False)),
                ('description', models.TextField(default='')),
                ('content_type',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='contenttypes.ContentType')),
            ],
        ),
        migrations.CreateModel(
            name='Version',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Explanation',
            fields=[
                ('version_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='engine.Version')),
                ('text', models.TextField(verbose_name='explanation text')),
            ],
            bases=('engine.version', ),
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('version_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='engine.Version')),
                ('name',
                 models.CharField(max_length=100,
                                  verbose_name='question name')),
                ('text', models.TextField(verbose_name='question text')),
                ('url', models.URLField(blank=True, default='')),
                ('quiz', models.ManyToManyField(to='engine.Quiz')),
            ],
            bases=('engine.version', ),
        ),
        migrations.AddField(
            model_name='version',
            name='mooclet',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='engine.Mooclet'),
        ),
        migrations.AddField(
            model_name='value',
            name='variable',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='engine.Variable'),
        ),
        migrations.AddField(
            model_name='policy',
            name='variables',
            field=models.ManyToManyField(to='engine.Variable'),
        ),
        migrations.AddField(
            model_name='mooclet',
            name='policy',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='engine.Policy'),
        ),
        migrations.AddField(
            model_name='mooclet',
            name='type',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='engine.MoocletType'),
        ),
        migrations.AddField(
            model_name='collaborator',
            name='course',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='engine.Course'),
        ),
        migrations.AddField(
            model_name='collaborator',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='answer',
            name='mooclet_explanation',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='engine.Mooclet'),
        ),
        migrations.AlterOrderWithRespectTo(
            name='version',
            order_with_respect_to='mooclet',
        ),
        migrations.AlterUniqueTogether(
            name='collaborator',
            unique_together=set([('user', 'course')]),
        ),
        migrations.AddField(
            model_name='answer',
            name='question',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='engine.Question'),
        ),
        migrations.AlterOrderWithRespectTo(
            name='answer',
            order_with_respect_to='question',
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('sites', '0002_alter_domain_unique'),
        ('contenttypes', '0002_remove_content_type_name'),
        ('pages', '0004_auto_20160804_1547'),
        ('organization_media', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomPage',
            fields=[
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='pages.Page')),
                ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
                ('content_fr', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
                ('content_en', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
                ('sub_title', models.TextField(blank=True, max_length=1024, verbose_name='sub title')),
                ('sub_title_fr', models.TextField(blank=True, max_length=1024, null=True, verbose_name='sub title')),
                ('sub_title_en', models.TextField(blank=True, max_length=1024, null=True, verbose_name='sub title')),
            ],
            options={
                'verbose_name': 'custom page',
                'ordering': ('_order',),
            },
            bases=('pages.page', models.Model),
        ),
        migrations.CreateModel(
            name='DynamicContentHomeBody',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
                ('object_id', models.PositiveIntegerField(editable=False, null=True, verbose_name='related object')),
                ('content_type', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='content type')),
            ],
            options={
                'verbose_name': 'Dynamic Content Home Body',
                'ordering': ('_order',),
            },
        ),
        migrations.CreateModel(
            name='DynamicContentHomeSlider',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
                ('object_id', models.PositiveIntegerField(editable=False, null=True, verbose_name='related object')),
                ('content_type', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='content type')),
            ],
            options={
                'verbose_name': 'Dynamic Content Home Slider',
                'ordering': ('_order',),
            },
        ),
        migrations.CreateModel(
            name='Home',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('keywords_string', models.CharField(blank=True, editable=False, max_length=500)),
                ('title', models.CharField(max_length=500, verbose_name='Title')),
                ('slug', models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL')),
                ('_meta_title', models.CharField(blank=True, help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title')),
                ('description', models.TextField(blank=True, verbose_name='Description')),
                ('gen_description', models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description')),
                ('created', models.DateTimeField(editable=False, null=True)),
                ('updated', models.DateTimeField(editable=False, null=True)),
                ('status', models.IntegerField(choices=[(1, 'Draft'), (2, 'Published')], default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status')),
                ('publish_date', models.DateTimeField(blank=True, db_index=True, help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from')),
                ('expiry_date', models.DateTimeField(blank=True, help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on')),
                ('short_url', models.URLField(blank=True, null=True)),
                ('in_sitemap', models.BooleanField(default=True, verbose_name='Show in sitemap')),
                ('site', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
            ],
            options={
                'verbose_name': 'home',
                'verbose_name_plural': 'homes',
            },
        ),
        migrations.CreateModel(
            name='PageAudio',
            fields=[
                ('audio_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization_media.Audio')),
                ('page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='audios', to='pages.Page', verbose_name='page')),
            ],
            options={
                'verbose_name': 'audio',
                'verbose_name_plural': 'audios',
            },
            bases=('organization_media.audio',),
        ),
        migrations.CreateModel(
            name='PageBlock',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
                ('content_fr', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
                ('content_en', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
                ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
                ('title', models.CharField(max_length=1024, verbose_name='title')),
                ('title_fr', models.CharField(max_length=1024, null=True, verbose_name='title')),
                ('title_en', models.CharField(max_length=1024, null=True, verbose_name='title')),
                ('description', models.TextField(blank=True, verbose_name='description')),
                ('with_separator', models.BooleanField(default=False)),
                ('background_color', models.CharField(blank=True, choices=[('black', 'black'), ('yellow', 'yellow'), ('red', 'red')], max_length=32, verbose_name='background color')),
                ('page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='blocks', to='pages.Page', verbose_name='page')),
            ],
            options={
                'verbose_name': 'page block',
                'ordering': ('_order',),
                'verbose_name_plural': 'blocks',
            },
        ),
        migrations.CreateModel(
            name='PageImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('_order', mezzanine.core.fields.OrderField(null=True, verbose_name='Order')),
                ('title', models.CharField(max_length=1024, verbose_name='title')),
                ('description', models.TextField(blank=True, verbose_name='description')),
                ('description_fr', models.TextField(blank=True, null=True, verbose_name='description')),
                ('description_en', models.TextField(blank=True, null=True, verbose_name='description')),
                ('file', mezzanine.core.fields.FileField(max_length=1024, verbose_name='Image')),
                ('credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='credits')),
                ('type', models.CharField(choices=[('logo', 'logo'), ('slider', 'slider'), ('card', 'card'), ('page_slider', 'page slider')], max_length=64, verbose_name='type')),
                ('page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='images', to='pages.Page', verbose_name='page')),
            ],
            options={
                'verbose_name': 'image',
                'ordering': ('_order',),
                'verbose_name_plural': 'images',
            },
        ),
        migrations.CreateModel(
            name='PageVideo',
            fields=[
                ('video_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='organization_media.Video')),
                ('page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='videos', to='pages.Page', verbose_name='page')),
            ],
            options={
                'verbose_name': 'video',
                'verbose_name_plural': 'videos',
            },
            bases=('organization_media.video',),
        ),
        migrations.AddField(
            model_name='dynamiccontenthomeslider',
            name='home',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization_pages.Home', verbose_name='home'),
        ),
        migrations.AddField(
            model_name='dynamiccontenthomebody',
            name='home',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='organization_pages.Home', verbose_name='home'),
        ),
        migrations.AlterOrderWithRespectTo(
            name='pagevideo',
            order_with_respect_to='page',
        ),
        migrations.AlterOrderWithRespectTo(
            name='pageaudio',
            order_with_respect_to='page',
        ),
    ]
Exemplo n.º 15
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('members', '0002_auto_20160107_0520'),
    ]

    operations = [
        migrations.CreateModel(
            name='Trainee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('revoked', models.BooleanField(default=False)),
                ('revoked_on', models.DateTimeField(blank=True, null=True)),
                ('notes', models.TextField(blank=True)),
                ('person', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='trainings', to=settings.AUTH_USER_MODEL)),
                ('revoked_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='trainings_revoked', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (('revoke_training', "Revoke a member's training"), ('edit_trainee_notes', 'Edit training notes on a person')),
            },
        ),
        migrations.CreateModel(
            name='Training',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('recorded_on', models.DateTimeField(auto_now_add=True)),
                ('expiration_date', models.DateField(blank=True, null=True)),
                ('notes', models.TextField(blank=True)),
                ('recorded_by', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.PROTECT, related_name='trainings_entered', to=settings.AUTH_USER_MODEL)),
                ('trainer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='trainings_run', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-date', '-recorded_on'],
                'permissions': (('view_training', 'View a training'),),
            },
        ),
        migrations.CreateModel(
            name='TrainingType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, unique=True)),
                ('external', models.BooleanField(default=False)),
                ('description', models.TextField()),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.AddField(
            model_name='training',
            name='training_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='trainings', to='members.TrainingType'),
        ),
        migrations.AddField(
            model_name='trainee',
            name='training',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='trainees', to='members.Training'),
        ),
        migrations.AlterOrderWithRespectTo(
            name='trainee',
            order_with_respect_to='training',
        ),
    ]
Exemplo n.º 16
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Diary',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('cover_image',
                 models.ImageField(blank=True, null=True, upload_to='')),
                ('start_date', models.DateField()),
                ('end_date', models.DateField()),
            ],
            options={
                'ordering': ('-pk', ),
            },
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('location', models.CharField(max_length=100)),
                ('content', models.TextField(blank=True, null=True)),
                ('created_date',
                 models.DateTimeField(default='2017-04-14 00:02')),
                ('cover_image',
                 models.ImageField(blank=True, null=True, upload_to='')),
                ('diary',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='diary.Diary')),
            ],
        ),
        migrations.CreateModel(
            name='PostPhoto',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('photo', models.ImageField(upload_to='post')),
                ('gpsLatitude',
                 models.FloatField(blank=True,
                                   null=True,
                                   verbose_name='Latitude')),
                ('gpsLongitude',
                 models.FloatField(blank=True,
                                   null=True,
                                   verbose_name='Longitude')),
                ('post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='diary.Post')),
            ],
        ),
        migrations.AlterOrderWithRespectTo(
            name='post',
            order_with_respect_to='created_date',
        ),
    ]
class Migration(migrations.Migration):

    replaces = [('product', '0001_initial'), ('product', '0002_auto_20170721_0604'), ('product', '0003_auto_20170721_0624'), ('product', '0004_auto_20170721_0625'), ('product', '0005_productcategorytop__order')]

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=60, verbose_name='상품명')),
                ('short_description', models.CharField(blank=True, max_length=60, verbose_name='짧은 설명')),
                ('full_description', models.TextField(blank=True, verbose_name='상세 설명')),
                ('use_price', models.BooleanField(default=False, verbose_name='가격 사용 여부')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ProductCategoryMiddle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ProductCategorySmall',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50, verbose_name='소분류명')),
                ('middle_category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.ProductCategoryMiddle', verbose_name='중분류')),
            ],
            options={
                'abstract': False,
                'verbose_name': '소분류',
                'verbose_name_plural': '소분류 목록',
            },
        ),
        migrations.CreateModel(
            name='ProductCategoryTop',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50, verbose_name='카테고리명')),
                ('_order', models.PositiveIntegerField(default=0)),
            ],
            options={
                'abstract': False,
                'verbose_name': '최상위 카테고리',
                'verbose_name_plural': '최상위 카테고리 목록',
            },
        ),
        migrations.CreateModel(
            name='ProductPrice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start_date', models.DateField(default=django.utils.timezone.now)),
                ('price', models.IntegerField(default=0)),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='product_price_set', to='product.Product')),
            ],
            options={
                'abstract': False,
                'verbose_name': '상품 가격',
                'verbose_name_plural': '상품 가격 목록',
            },
        ),
        migrations.AddField(
            model_name='productcategorymiddle',
            name='top_category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.ProductCategoryTop'),
        ),
        migrations.AddField(
            model_name='product',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.ProductCategorySmall', verbose_name='카테고리'),
        ),
        migrations.AlterModelOptions(
            name='product',
            options={'verbose_name': '상품', 'verbose_name_plural': '상품 목록'},
        ),
        migrations.AlterModelOptions(
            name='productcategorymiddle',
            options={'verbose_name': '중분류', 'verbose_name_plural': '중분류 목록'},
        ),
        migrations.AlterField(
            model_name='productcategorymiddle',
            name='title',
            field=models.CharField(max_length=50, verbose_name='중분류명'),
        ),
        migrations.AlterField(
            model_name='productcategorymiddle',
            name='top_category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.ProductCategoryTop', verbose_name='최상위 카테고리'),
        ),
        migrations.AlterOrderWithRespectTo(
            name='productcategorymiddle',
            order_with_respect_to='top_category',
        ),
        migrations.AlterOrderWithRespectTo(
            name='productcategorysmall',
            order_with_respect_to='middle_category',
        ),
        migrations.AlterModelOptions(
            name='productcategorymiddle',
            options={'ordering': ('order',), 'verbose_name': '중분류', 'verbose_name_plural': '중분류 목록'},
        ),
        migrations.AddField(
            model_name='productcategorymiddle',
            name='order',
            field=models.PositiveIntegerField(default=0),
        ),
        migrations.AlterOrderWithRespectTo(
            name='productcategorymiddle',
            order_with_respect_to=None,
        ),
        migrations.AlterModelOptions(
            name='productcategorymiddle',
            options={'verbose_name': '중분류', 'verbose_name_plural': '중분류 목록'},
        ),
        migrations.RemoveField(
            model_name='productcategorymiddle',
            name='order',
        ),
        migrations.AlterOrderWithRespectTo(
            name='productcategorymiddle',
            order_with_respect_to='top_category',
        ),
    ]
Exemplo n.º 18
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(blank=True, max_length=255, null=True)),
                ('author_name',
                 models.CharField(blank=True, max_length=255, null=True)),
                ('thumbnail', models.URLField(blank=True, null=True)),
                ('provider_name',
                 models.CharField(choices=[('YouTube', 'YouTube'),
                                           ('SoundCloud', 'SoundCloud')],
                                  max_length=255)),
                ('html', models.TextField(blank=True, null=True)),
                ('duration', models.PositiveIntegerField(blank=True,
                                                         null=True)),
                ('url', models.URLField()),
            ],
        ),
        migrations.CreateModel(
            name='Loop',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('active', models.BooleanField(default=True)),
                ('added', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('avatar',
                 models.URLField(blank=True, max_length=500, null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Show',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('added', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('title', models.CharField(max_length=255)),
                ('description', models.CharField(max_length=255)),
                ('show_type',
                 models.CharField(choices=[('MusicShow', 'MusicShow'),
                                           ('VideoShow', 'VideoShow')],
                                  max_length=10)),
                ('loop',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='l8pr.Loop')),
            ],
        ),
        migrations.CreateModel(
            name='ShowSettings',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('shuffle', models.BooleanField(default=False)),
                ('dj_layout', models.BooleanField(default=False)),
                ('giphy', models.BooleanField(default=True)),
                ('giphy_tags', models.TextField(blank=True, null=True)),
                ('hide_strip', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='ShowsRelationship',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('order', models.PositiveIntegerField()),
                ('loop',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='l8pr.Loop')),
                ('show',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='l8pr.Show')),
            ],
        ),
        migrations.AddField(
            model_name='show',
            name='settings',
            field=models.OneToOneField(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='show',
                to='l8pr.ShowSettings'),
        ),
        migrations.AddField(
            model_name='show',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='loop',
            name='shows_list',
            field=models.ManyToManyField(related_name='ShowsRelationship',
                                         through='l8pr.ShowsRelationship',
                                         to='l8pr.Show'),
        ),
        migrations.AddField(
            model_name='loop',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='loops',
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='item',
            name='show',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='items',
                to='l8pr.Show'),
        ),
        migrations.AlterOrderWithRespectTo(
            name='item',
            order_with_respect_to='show',
        ),
    ]
Exemplo n.º 19
0
 def test_alter_alter_owrt_model(self):
     self._test_alter_alter_model(
         migrations.AlterOrderWithRespectTo("Foo", "a"),
         migrations.AlterOrderWithRespectTo("Foo", "b"),
     )
Exemplo n.º 20
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='VocabularyList',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=255)),
                ('description', models.TextField(blank=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('cloned_from',
                 models.ForeignKey(
                     editable=False,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='vocab_list.VocabularyList')),
                ('owner',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'vocabulary list',
            },
        ),
        migrations.CreateModel(
            name='VocabularyListEntry',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('lemma', models.CharField(max_length=255)),
                ('gloss', models.TextField(blank=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('vocabulary_list',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='entries',
                                   to='vocab_list.VocabularyList')),
            ],
            options={
                'verbose_name': 'vocabulary list entry',
                'verbose_name_plural': 'vocabulary list entries',
            },
        ),
        migrations.AlterOrderWithRespectTo(
            name='vocabularylistentry',
            order_with_respect_to='vocabulary_list',
        ),
    ]
Exemplo n.º 21
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Answer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('text',
                 models.CharField(blank=True,
                                  max_length=35,
                                  verbose_name='answer to question')),
                ('is_true', models.BooleanField()),
            ],
            options={
                'db_table': 'education_answer_to_question',
            },
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50, verbose_name='book name')),
                ('description',
                 models.TextField(blank=True,
                                  default='',
                                  verbose_name='description')),
                ('date_of_create',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date of create')),
            ],
            options={
                'db_table': 'education_book',
            },
        ),
        migrations.CreateModel(
            name='Chapter',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50, verbose_name='chapter name')),
                ('text', models.TextField(verbose_name='chapter text')),
                ('experience',
                 models.IntegerField(default=0,
                                     verbose_name='normal experience')),
                ('date_of_create',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date of create')),
                ('book',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='education.Book')),
            ],
            options={
                'db_table': 'education_book_chapter',
            },
        ),
        migrations.CreateModel(
            name='LevelOfComplexity',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=35,
                                  verbose_name='name')),
                ('level', models.IntegerField(default=0,
                                              verbose_name='level')),
                ('lite_description',
                 models.TextField(blank=True,
                                  default='',
                                  verbose_name='lite description')),
                ('full_description',
                 models.TextField(blank=True,
                                  default='',
                                  verbose_name='full description')),
                ('normal_experience',
                 models.IntegerField(default=0,
                                     verbose_name='normal experience')),
                ('extra_experience',
                 models.IntegerField(default=0,
                                     verbose_name='extra experience')),
            ],
            options={
                'db_table': 'education_level_of_complexity',
            },
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('text',
                 models.TextField(blank=True, verbose_name='question text')),
                ('experience',
                 models.IntegerField(default=0, verbose_name='experience')),
                ('chapter',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='education.Chapter')),
            ],
            options={
                'db_table': 'education_question',
            },
        ),
        migrations.CreateModel(
            name='Test',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50, verbose_name='test name')),
                ('description',
                 models.TextField(blank=True,
                                  default='',
                                  verbose_name='description')),
                ('experience',
                 models.IntegerField(default=0, verbose_name='experience')),
                ('date_of_create',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date of create')),
                ('chapter',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='education.Chapter')),
            ],
            options={
                'db_table': 'education_test',
            },
        ),
        migrations.CreateModel(
            name='UserChapter',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date_of_reading',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date of reading')),
                ('chapter',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='education.Chapter')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'education_user_chapter',
            },
        ),
        migrations.CreateModel(
            name='UserLevel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('level', models.IntegerField(default=0,
                                              verbose_name='level')),
                ('experience_start_range',
                 models.IntegerField(default=0,
                                     verbose_name='experience start range')),
                ('experience_end_range',
                 models.IntegerField(default=0,
                                     verbose_name='experience end range')),
            ],
            options={
                'db_table': 'education_user_level',
            },
        ),
        migrations.CreateModel(
            name='UserTest',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date_of_done',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date of done')),
                ('test',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='education.Test')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'education_user_test',
            },
        ),
        migrations.AddField(
            model_name='test',
            name='users',
            field=models.ManyToManyField(through='education.UserTest',
                                         to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='question',
            name='tests',
            field=models.ManyToManyField(to='education.Test'),
        ),
        migrations.AddField(
            model_name='chapter',
            name='users',
            field=models.ManyToManyField(through='education.UserChapter',
                                         to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='answer',
            name='question',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='education.Question'),
        ),
        migrations.AlterOrderWithRespectTo(
            name='chapter',
            order_with_respect_to='book',
        ),
    ]
Exemplo n.º 22
0
class Migration(migrations.Migration):

    dependencies = [('osf', '0189_deleted_field_data')]

    operations = [
        migrations.CreateModel(
            name='RegistrationSchemaBlock',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 django_extensions.db.fields.CreationDateTimeField(
                     auto_now_add=True, verbose_name='created')),
                ('modified',
                 django_extensions.db.fields.ModificationDateTimeField(
                     auto_now=True, verbose_name='modified')),
                ('_id',
                 models.CharField(db_index=True,
                                  default=osf.models.base.generate_object_id,
                                  max_length=24,
                                  unique=True)),
                ('help_text', models.TextField()),
                ('example_text', models.TextField(null=True)),
                ('registration_response_key',
                 models.CharField(blank=True,
                                  db_index=True,
                                  max_length=255,
                                  null=True)),
                ('schema_block_group_key',
                 models.CharField(db_index=True, max_length=24, null=True)),
                ('block_type',
                 models.CharField(choices=[
                     (b'page-heading', b'page-heading'),
                     (b'section-heading', b'section-heading'),
                     (b'subsection-heading', b'subsection-heading'),
                     (b'paragraph', b'paragraph'),
                     (b'question-label', b'question-label'),
                     (b'short-text-input', b'short-text-input'),
                     (b'long-text-input', b'long-text-input'),
                     (b'file-input', b'file-input'),
                     (b'contributors-input', b'contributors-input'),
                     (b'single-select-input', b'single-select-input'),
                     (b'multi-select-input', b'multi-select-input'),
                     (b'select-input-option', b'select-input-option'),
                     (b'select-other-option', b'select-other-option')
                 ],
                                  db_index=True,
                                  max_length=31)),
                ('display_text', models.TextField()),
                ('required', models.BooleanField(default=False)),
            ],
        ),
        migrations.AddField(
            model_name='registrationschema',
            name='config',
            field=osf.utils.datetime_aware_jsonfield.DateTimeAwareJSONField(
                blank=True,
                default=dict,
                encoder=osf.utils.datetime_aware_jsonfield.
                DateTimeAwareJSONEncoder),
        ),
        migrations.AddField(
            model_name='registrationschema',
            name='description',
            field=models.TextField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='registrationschemablock',
            name='schema',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='schema_blocks',
                to='osf.RegistrationSchema'),
        ),
        migrations.AlterUniqueTogether(
            name='registrationschemablock',
            unique_together=set([('schema', 'registration_response_key')]),
        ),
        migrations.AlterOrderWithRespectTo(
            name='registrationschemablock',
            order_with_respect_to='schema',
        ),
    ]
Exemplo n.º 23
0
class Migration(migrations.Migration):

    dependencies = [
        ('commtrack', '0002_stockstate_last_modified_form_id'),
    ]

    operations = [
        migrations.CreateModel(
            name='SQLActionConfig',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('action', models.CharField(max_length=40, null=True)),
                ('subaction', models.CharField(max_length=40, null=True)),
                ('_keyword', models.CharField(max_length=40, null=True)),
                ('caption', models.CharField(max_length=40, null=True)),
            ],
            options={
                'db_table': 'commtrack_actionconfig',
            },
        ),
        migrations.CreateModel(
            name='SQLCommtrackConfig',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('domain',
                 models.CharField(db_index=True, max_length=126, unique=True)),
                ('couch_id',
                 models.CharField(db_index=True, max_length=126, null=True)),
                ('use_auto_emergency_levels',
                 models.BooleanField(default=False)),
                ('sync_consumption_fixtures',
                 models.BooleanField(default=False)),
                ('use_auto_consumption', models.BooleanField(default=False)),
                ('individual_consumption_defaults',
                 models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'commtrack_commtrackconfig',
            },
        ),
        migrations.CreateModel(
            name='SQLAlertConfig',
            fields=[
                ('stock_out_facilities', models.BooleanField(default=False)),
                ('stock_out_commodities', models.BooleanField(default=False)),
                ('stock_out_rates', models.BooleanField(default=False)),
                ('non_report', models.BooleanField(default=False)),
                ('commtrack_config',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to='commtrack.SQLCommtrackConfig')),
            ],
            options={
                'db_table': 'commtrack_alertconfig',
            },
        ),
        migrations.CreateModel(
            name='SQLConsumptionConfig',
            fields=[
                ('min_transactions', models.IntegerField(default=2,
                                                         null=True)),
                ('min_window', models.IntegerField(default=10, null=True)),
                ('optimal_window', models.IntegerField(null=True)),
                ('use_supply_point_type_default_consumption',
                 models.BooleanField(default=False)),
                ('exclude_invalid_periods',
                 models.BooleanField(default=False)),
                ('commtrack_config',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to='commtrack.SQLCommtrackConfig')),
            ],
            options={
                'db_table': 'commtrack_consumptionconfig',
            },
        ),
        migrations.CreateModel(
            name='SQLStockLevelsConfig',
            fields=[
                ('emergency_level',
                 models.DecimalField(decimal_places=2,
                                     default=0.5,
                                     max_digits=4)),
                ('understock_threshold',
                 models.DecimalField(decimal_places=2,
                                     default=1.5,
                                     max_digits=4)),
                ('overstock_threshold',
                 models.DecimalField(decimal_places=2, default=3,
                                     max_digits=4)),
                ('commtrack_config',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to='commtrack.SQLCommtrackConfig')),
            ],
            options={
                'db_table': 'commtrack_stocklevelsconfig',
            },
        ),
        migrations.CreateModel(
            name='SQLStockRestoreConfig',
            fields=[
                ('section_to_consumption_types',
                 django.contrib.postgres.fields.jsonb.JSONField(default=dict,
                                                                null=True)),
                ('force_consumption_case_types',
                 django.contrib.postgres.fields.jsonb.JSONField(default=list,
                                                                null=True)),
                ('use_dynamic_product_list',
                 models.BooleanField(default=False)),
                ('commtrack_config',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to='commtrack.SQLCommtrackConfig')),
            ],
            options={
                'db_table': 'commtrack_stockrestoreconfig',
            },
        ),
        migrations.AddField(
            model_name='sqlactionconfig',
            name='commtrack_config',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='commtrack.SQLCommtrackConfig'),
        ),
        migrations.AlterOrderWithRespectTo(
            name='sqlactionconfig',
            order_with_respect_to='commtrack_config',
        ),
    ]
Exemplo n.º 24
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Exam',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('score', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('question_text', models.TextField(max_length=255)),
                ('exam',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='learn.Exam')),
            ],
            options={
                'order_with_respect_to': 'exam',
            },
        ),
        migrations.AddField(
            model_name='exam',
            name='subject',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='learn.Subject'),
        ),
        migrations.AlterOrderWithRespectTo(
            name='exam',
            order_with_respect_to='name',
        ),
        migrations.CreateModel(
            name='Choice',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('choice_text', models.CharField(max_length=255)),
                ('is_correct', models.NullBooleanField(default=None)),
                ('question',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='learn.Question')),
            ],
            options={
                'order_with_respect_to': 'question',
            },
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('buildsvc', '0024_repository-driver-feature'),
    ]

    operations = [
        migrations.CreateModel(
            name='Architecture',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='BinaryBuild',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('architecture',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='buildsvc.Architecture')),
            ],
        ),
        migrations.CreateModel(
            name='BinaryPackage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('repository',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='buildsvc.Repository')),
            ],
        ),
        migrations.CreateModel(
            name='BinaryPackageVersion',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('version', models.CharField(max_length=200)),
                ('short_description',
                 models.CharField(default=b'', max_length=255)),
                ('long_description', models.TextField(default=b'')),
                ('package_type',
                 models.SmallIntegerField(choices=[
                     (1, b'Debian package (.deb)'),
                     (2, b'Debian-installer package (.udeb)'),
                     (3, b'Debug Debian package (.ddeb)')
                 ],
                                          default=1)),
                ('architecture', models.CharField(max_length=32)),
                ('section', models.TextField(null=True)),
                ('priority', models.TextField(null=True)),
                ('maintainer', models.TextField(null=True)),
                ('depends', models.TextField(null=True)),
                ('recommends', models.TextField(null=True)),
                ('suggests', models.TextField(null=True)),
                ('conflicts', models.TextField(null=True)),
                ('replaces', models.TextField(null=True)),
                ('provides', models.TextField(null=True)),
                ('pre_depends', models.TextField(null=True)),
                ('enhances', models.TextField(null=True)),
                ('breaks', models.TextField(null=True)),
                ('installed_size', models.IntegerField(null=True)),
                ('size', models.IntegerField()),
                ('md5sum', models.CharField(max_length=32)),
                ('sha1', models.CharField(max_length=40)),
                ('sha256', models.CharField(max_length=64)),
                ('homepage', models.CharField(max_length=250)),
                ('location', models.CharField(max_length=250)),
                ('binary_build',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='buildsvc.BinaryBuild')),
                ('binary_package',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='buildsvc.BinaryPackage')),
            ],
        ),
        migrations.CreateModel(
            name='SourcePackage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('repository',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='buildsvc.Repository')),
            ],
        ),
        migrations.CreateModel(
            name='SourcePackageVersion',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('binary', models.TextField()),
                ('architecture', models.CharField(max_length=100)),
                ('version', models.CharField(max_length=50)),
                ('maintainer', models.CharField(max_length=200)),
                ('standards_version', models.CharField(max_length=50)),
                ('build_depends', models.TextField()),
                ('build_depends_indep', models.TextField()),
                ('build_conflicts', models.TextField()),
                ('build_conflicts_indep', models.TextField()),
                ('homepage', models.CharField(max_length=250)),
                ('format', models.CharField(max_length=50)),
                ('package_source',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='buildsvc.PackageSource')),
                ('source_package',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='buildsvc.SourcePackage')),
            ],
        ),
        migrations.CreateModel(
            name='SourcePackageVersionFile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('filename', models.CharField(max_length=200)),
                ('file_type',
                 models.SmallIntegerField(
                     choices=[(1, b'Source description (.dsc) file'),
                              (2,
                               b'Original tarball'), (
                                   3,
                                   b'diff (patch) file'), (4,
                                                           b'Native tarball'),
                              (5, b'Diff tarball (for quilt format)')])),
                ('size', models.IntegerField()),
                ('md5sum', models.CharField(max_length=32)),
                ('sha1sum', models.CharField(max_length=40)),
                ('sha256sum', models.CharField(max_length=64)),
                ('source_package_version',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='buildsvc.SourcePackageVersion')),
            ],
        ),
        migrations.AlterOrderWithRespectTo(
            name='sourcepackageversionfile',
            order_with_respect_to='source_package_version',
        ),
        migrations.AddField(
            model_name='binarybuild',
            name='source_package_version',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='buildsvc.SourcePackageVersion'),
        ),
        migrations.AddField(
            model_name='series',
            name='source_package_versions',
            field=models.ManyToManyField(to='buildsvc.SourcePackageVersion'),
        ),
        migrations.AddField(
            model_name='series',
            name='binary_package_versions',
            field=models.ManyToManyField(to='buildsvc.BinaryPackageVersion'),
        ),
        migrations.AlterUniqueTogether(
            name='sourcepackageversionfile',
            unique_together=set([('source_package_version', 'file_type')]),
        ),
        migrations.AlterUniqueTogether(
            name='sourcepackageversion',
            unique_together=set([('source_package', 'version')]),
        ),
        migrations.AlterUniqueTogether(
            name='sourcepackage',
            unique_together=set([('name', 'repository')]),
        ),
        migrations.AlterUniqueTogether(
            name='binarypackage',
            unique_together=set([('name', 'repository')]),
        ),
        migrations.CreateModel(
            name='BinaryPackageVersionUserField',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('value', models.TextField()),
                ('binary_package_version',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='buildsvc.BinaryPackageVersion')),
            ],
        ),
        migrations.AlterOrderWithRespectTo(
            name='binarypackageversionuserfield',
            order_with_respect_to='binary_package_version',
        ),
        migrations.RunPython(add_architectures, remove_architectures),
    ]
Exemplo n.º 26
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(default=django.utils.timezone.now, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(unique=True, max_length=255, verbose_name='username')),
                ('email', models.EmailField(max_length=255, unique=True, null=True, verbose_name='email address', blank=True)),
                ('title', models.CharField(max_length=255, null=True, verbose_name='Title', blank=True)),
                ('first_name', models.CharField(max_length=255, null=True, verbose_name='first name', blank=True)),
                ('last_name', models.CharField(max_length=255, null=True, verbose_name='last name', blank=True)),
                ('login_key', models.IntegerField(unique=True, null=True, verbose_name='Login Key', blank=True)),
                ('login_key_valid_until', models.DateField(null=True, verbose_name='Login Key Validity', blank=True)),
                ('cc_users', models.ManyToManyField(to=settings.AUTH_USER_MODEL, verbose_name='CC Users', blank=True)),
                ('delegates', models.ManyToManyField(related_name='represented_users', verbose_name='Delegates', to=settings.AUTH_USER_MODEL, blank=True)),
                ('groups', models.ManyToManyField(related_query_name='user', related_name='user_set', to='auth.Group', blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of his/her group.', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(related_query_name='user', related_name='user_set', to='auth.Permission', blank=True, help_text='Specific permissions for this user.', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Contribution',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('responsible', models.BooleanField(default=False, verbose_name='responsible')),
                ('can_edit', models.BooleanField(default=False, verbose_name='can edit')),
                ('order', models.IntegerField(default=0, verbose_name='contribution order')),
                ('contributor', models.ForeignKey(related_name='contributions', verbose_name='contributor', blank=True, to=settings.AUTH_USER_MODEL, null=True, on_delete=django.db.models.deletion.CASCADE)),
            ],
            options={
                'ordering': ['order'],
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('state', django_fsm.FSMField(default=b'new', max_length=50)),
                ('name_de', models.CharField(max_length=1024, verbose_name='name (german)')),
                ('name_en', models.CharField(max_length=1024, verbose_name='name (english)')),
                ('kind', models.CharField(max_length=1024, verbose_name='type')),
                ('degree', models.CharField(max_length=1024, verbose_name='degree')),
                ('participant_count', models.IntegerField(default=None, null=True, verbose_name='participant count', blank=True)),
                ('voter_count', models.IntegerField(default=None, null=True, verbose_name='voter count', blank=True)),
                ('vote_start_date', models.DateField(null=True, verbose_name='first date to vote')),
                ('vote_end_date', models.DateField(null=True, verbose_name='last date to vote')),
                ('last_modified_time', models.DateTimeField(auto_now=True)),
                ('last_modified_user', models.ForeignKey(related_name='+', blank=True, to=settings.AUTH_USER_MODEL, null=True, on_delete=django.db.models.deletion.CASCADE)),
                ('participants', models.ManyToManyField(to=settings.AUTH_USER_MODEL, verbose_name='participants', blank=True)),
            ],
            options={
                'ordering': ('semester', 'degree', 'name_de'),
                'verbose_name': 'course',
                'verbose_name_plural': 'courses',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='EmailTemplate',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(unique=True, max_length=1024, verbose_name='Name')),
                ('subject', models.CharField(max_length=1024, verbose_name='Subject', validators=[evap.evaluation.models.validate_template])),
                ('body', models.TextField(verbose_name='Body', validators=[evap.evaluation.models.validate_template])),
            ],
            options={
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='FaqQuestion',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('order', models.IntegerField(verbose_name='question order')),
                ('question_de', models.TextField(verbose_name='question (german)')),
                ('question_en', models.TextField(verbose_name='question (english)')),
                ('answer_de', models.TextField(verbose_name='answer (german)')),
                ('answer_en', models.TextField(verbose_name='answer (german)')),
            ],
            options={
                'ordering': ['order'],
                'verbose_name': 'question',
                'verbose_name_plural': 'questions',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='FaqSection',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('order', models.IntegerField(verbose_name='section order')),
                ('title_de', models.TextField(verbose_name='section title (german)')),
                ('title_en', models.TextField(verbose_name='section title (english)')),
            ],
            options={
                'ordering': ['order'],
                'verbose_name': 'section',
                'verbose_name_plural': 'sections',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='GradeAnswer',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('answer', models.IntegerField(verbose_name='answer')),
                ('contribution', models.ForeignKey(to='evaluation.Contribution', on_delete=django.db.models.deletion.CASCADE)),
            ],
            options={
                'verbose_name': 'grade answer',
                'verbose_name_plural': 'grade answers',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='LikertAnswer',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('answer', models.IntegerField(verbose_name='answer')),
                ('contribution', models.ForeignKey(to='evaluation.Contribution', on_delete=django.db.models.deletion.CASCADE)),
            ],
            options={
                'verbose_name': 'Likert answer',
                'verbose_name_plural': 'Likert answers',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('text_de', models.TextField(verbose_name='question text (german)')),
                ('text_en', models.TextField(verbose_name='question text (english)')),
                ('kind', models.CharField(max_length=1, verbose_name='kind of question', choices=[('T', 'Text Question'), ('L', 'Likert Question'), ('G', 'Grade Question')])),
            ],
            options={
                'verbose_name': 'question',
                'verbose_name_plural': 'questions',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Questionnaire',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name_de', models.CharField(unique=True, max_length=1024, verbose_name='name (german)')),
                ('name_en', models.CharField(unique=True, max_length=1024, verbose_name='name (english)')),
                ('description_de', models.TextField(null=True, verbose_name='description (german)', blank=True)),
                ('description_en', models.TextField(null=True, verbose_name='description (english)', blank=True)),
                ('public_name_de', models.CharField(max_length=1024, verbose_name='display name (german)')),
                ('public_name_en', models.CharField(max_length=1024, verbose_name='display name (english)')),
                ('teaser_de', models.TextField(null=True, verbose_name='teaser (german)', blank=True)),
                ('teaser_en', models.TextField(null=True, verbose_name='teaser (english)', blank=True)),
                ('index', models.IntegerField(verbose_name='ordering index')),
                ('is_for_contributors', models.BooleanField(default=False, verbose_name='is for contributors')),
                ('obsolete', models.BooleanField(default=False, verbose_name='obsolete')),
            ],
            options={
                'ordering': ('obsolete', 'index', 'name_de'),
                'verbose_name': 'questionnaire',
                'verbose_name_plural': 'questionnaires',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Semester',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name_de', models.CharField(unique=True, max_length=1024, verbose_name='name (german)')),
                ('name_en', models.CharField(unique=True, max_length=1024, verbose_name='name (english)')),
                ('created_at', models.DateField(auto_now_add=True, verbose_name='created at')),
            ],
            options={
                'ordering': ('-created_at', 'name_de'),
                'verbose_name': 'semester',
                'verbose_name_plural': 'semesters',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='TextAnswer',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('reviewed_answer', models.TextField(null=True, verbose_name='reviewed answer', blank=True)),
                ('original_answer', models.TextField(verbose_name='original answer', blank=True)),
                ('checked', models.BooleanField(default=False, verbose_name='answer checked')),
                ('hidden', models.BooleanField(default=False, verbose_name='hide answer')),
                ('contribution', models.ForeignKey(to='evaluation.Contribution', on_delete=django.db.models.deletion.CASCADE)),
                ('question', models.ForeignKey(to='evaluation.Question', on_delete=django.db.models.deletion.CASCADE)),
            ],
            options={
                'verbose_name': 'text answer',
                'verbose_name_plural': 'text answers',
            },
            bases=(models.Model,),
        ),
        migrations.AddField(
            model_name='question',
            name='questionnaire',
            field=models.ForeignKey(to='evaluation.Questionnaire', on_delete=django.db.models.deletion.CASCADE),
            preserve_default=True,
        ),
        migrations.AlterOrderWithRespectTo(
            name='question',
            order_with_respect_to='questionnaire',
        ),
        migrations.AddField(
            model_name='likertanswer',
            name='question',
            field=models.ForeignKey(to='evaluation.Question', on_delete=django.db.models.deletion.CASCADE),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='gradeanswer',
            name='question',
            field=models.ForeignKey(to='evaluation.Question', on_delete=django.db.models.deletion.CASCADE),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='faqquestion',
            name='section',
            field=models.ForeignKey(related_name='questions', to='evaluation.FaqSection', on_delete=django.db.models.deletion.CASCADE),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='course',
            name='semester',
            field=models.ForeignKey(verbose_name='semester', to='evaluation.Semester', on_delete=django.db.models.deletion.CASCADE),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='course',
            name='voters',
            field=models.ManyToManyField(related_name='+', verbose_name='voters', to=settings.AUTH_USER_MODEL, blank=True),
            preserve_default=True,
        ),
        migrations.AlterUniqueTogether(
            name='course',
            unique_together=set([('semester', 'degree', 'name_de'), ('semester', 'degree', 'name_en')]),
        ),
        migrations.AddField(
            model_name='contribution',
            name='course',
            field=models.ForeignKey(related_name='contributions', verbose_name='course', to='evaluation.Course', on_delete=django.db.models.deletion.CASCADE),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='contribution',
            name='questionnaires',
            field=models.ManyToManyField(related_name='contributions', verbose_name='questionnaires', to='evaluation.Questionnaire', blank=True),
            preserve_default=True,
        ),
        migrations.AlterUniqueTogether(
            name='contribution',
            unique_together=set([('course', 'contributor')]),
        ),
    ]
Exemplo n.º 27
0
class Migration(migrations.Migration):

    dependencies = [
        ('tragopan', '0066_auto_20150807_1932'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('calculation', '0002_auto_20150811_1558'),
    ]

    operations = [
        migrations.CreateModel(
            name='RobinFile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  verbose_name='ID',
                                  serialize=False)),
                ('time_inserted', models.DateTimeField(auto_now_add=True)),
                ('last_modified', models.DateTimeField(auto_now=True)),
                ('remark', models.TextField(blank=True)),
                ('file_type',
                 models.CharField(choices=[('BASE_FUEL', 'BASE_FUEL'),
                                           ('BP_OUT', 'BP_OUT'), ('BR', 'BR')],
                                  max_length=9)),
                ('input_file',
                 models.FileField(
                     upload_to=calculation.models.get_robin_upload_path)),
                ('out1_file',
                 models.FileField(
                     upload_to=calculation.models.get_robin_upload_path)),
                ('log_file',
                 models.FileField(
                     upload_to=calculation.models.get_robin_upload_path)),
                ('burnable_poison_assembly',
                 models.ForeignKey(null=True,
                                   blank=True,
                                   to='tragopan.BurnablePoisonAssembly')),
                ('fuel_assembly_type',
                 models.ForeignKey(to='tragopan.FuelAssemblyType')),
                ('plant', models.ForeignKey(to='tragopan.Plant')),
                ('user',
                 models.ForeignKey(null=True,
                                   blank=True,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'robin_file',
            },
        ),
        migrations.AlterModelOptions(
            name='ibis',
            options={'verbose_name_plural': 'Ibis'},
        ),
        migrations.AlterModelOptions(
            name='prerobinbranch',
            options={'verbose_name_plural': 'branches'},
        ),
        migrations.AlterOrderWithRespectTo(
            name='robinfile',
            order_with_respect_to='fuel_assembly_type',
        ),
    ]
Exemplo n.º 28
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.TextField()),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=255)),
                ('slug', models.CharField(max_length=255)),
                ('description', models.TextField()),
                ('course_image', models.ImageField(upload_to='')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('teacher',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=255)),
                ('slug', models.CharField(max_length=255)),
                ('overview', models.TextField()),
                ('lesson', models.TextField()),
                ('lesson_number', models.IntegerField()),
                ('lesson_notes', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Media',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=255)),
                ('media_type', models.CharField(max_length=5)),
                ('upload', models.FileField(upload_to='uploads/%Y/%m/%d/')),
                ('notes', models.TextField()),
            ],
        ),
        migrations.AlterOrderWithRespectTo(
            name='lesson',
            order_with_respect_to='lesson_number',
        ),
        migrations.AlterOrderWithRespectTo(
            name='course',
            order_with_respect_to='date',
        ),
        migrations.AddField(
            model_name='comment',
            name='lesson',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='courses.Lesson'),
        ),
        migrations.AlterOrderWithRespectTo(
            name='comment',
            order_with_respect_to='date',
        ),
    ]
Exemplo n.º 29
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('compare', '0001_initial'),
        ('perfusion_machine', '0001_initial'),
        ('locations', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='randomisation',
            name='allocated_by',
            field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='RA04 allocated by'),
        ),
        migrations.AddField(
            model_name='randomisation',
            name='donor',
            field=models.OneToOneField(blank=True, default=None, help_text='Internal link to the Donor', null=True, on_delete=django.db.models.deletion.CASCADE, to='compare.Donor'),
        ),
        migrations.AddField(
            model_name='procurementresource',
            name='organ',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='compare.Organ', verbose_name='PR01 related kidney'),
        ),
        migrations.AddField(
            model_name='organallocation',
            name='organ',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='compare.Organ'),
        ),
        migrations.AddField(
            model_name='organallocation',
            name='perfusion_technician',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='recipient_perfusion_technician_set', to=settings.AUTH_USER_MODEL, verbose_name='OA01 name of transplant technician'),
        ),
        migrations.AddField(
            model_name='organallocation',
            name='reallocation',
            field=models.OneToOneField(blank=True, default=None, help_text='Internal forward link value to another OrganAllocation record', null=True, on_delete=django.db.models.deletion.CASCADE, to='compare.OrganAllocation'),
        ),
        migrations.AddField(
            model_name='organallocation',
            name='theatre_contact',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='recipient_transplant_coordinator_set', to=settings.AUTH_USER_MODEL, verbose_name='OA04 name of the theatre contact'),
        ),
        migrations.AddField(
            model_name='organallocation',
            name='transplant_hospital',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Hospital', verbose_name='OA03 transplant hospital'),
        ),
        migrations.AddField(
            model_name='organ',
            name='donor',
            field=models.ForeignKey(help_text='Internal link to the Donor', on_delete=django.db.models.deletion.CASCADE, to='compare.Donor'),
        ),
        migrations.AddField(
            model_name='organ',
            name='perfusion_machine',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='perfusion_machine.Machine', verbose_name='OR24 perfusion machine'),
        ),
        migrations.AddField(
            model_name='donor',
            name='_left_kidney',
            field=models.OneToOneField(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='left_kidney', to='compare.Organ'),
        ),
        migrations.AddField(
            model_name='donor',
            name='_right_kidney',
            field=models.OneToOneField(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='right_kidney', to='compare.Organ'),
        ),
        migrations.AddField(
            model_name='donor',
            name='perfusion_technician',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='donor_perfusion_technician_set', to=settings.AUTH_USER_MODEL, verbose_name='DO03 name of transplant technician'),
        ),
        migrations.AddField(
            model_name='donor',
            name='person',
            field=models.OneToOneField(help_text='Internal link to Patient', on_delete=django.db.models.deletion.CASCADE, to='compare.Patient'),
        ),
        migrations.AddField(
            model_name='donor',
            name='retrieval_team',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='compare.RetrievalTeam', verbose_name='DO01 retrieval team'),
        ),
        migrations.AddField(
            model_name='donor',
            name='transplant_coordinator',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='donor_transplant_coordinator_set', to=settings.AUTH_USER_MODEL, verbose_name='DO04 name of the SN-OD'),
        ),
        migrations.AlterOrderWithRespectTo(
            name='recipient',
            order_with_respect_to='organ',
        ),
        migrations.AlterOrderWithRespectTo(
            name='organallocation',
            order_with_respect_to='organ',
        ),
        migrations.AlterOrderWithRespectTo(
            name='donor',
            order_with_respect_to='retrieval_team',
        ),
    ]
Exemplo n.º 30
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('itunes', models.BooleanField(default=True)),
                ('name', models.CharField(max_length=255)),
                ('parent',
                 models.ForeignKey(blank=True, to='podmin.Category',
                                   null=True)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Episode',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('created',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name=b'created')),
                ('updated',
                 models.DateTimeField(auto_now=True, verbose_name=b'updated')),
                ('published',
                 models.DateTimeField(null=True,
                                      verbose_name=b'date published')),
                ('title', models.CharField(max_length=255)),
                ('subtitle',
                 models.CharField(max_length=255, null=True, blank=True)),
                ('slug',
                 autoslug.fields.AutoSlugField(default=b'',
                                               unique=True,
                                               editable=False)),
                ('track_number',
                 models.IntegerField(null=True,
                                     verbose_name=b'real episode number',
                                     blank=True)),
                ('number',
                 models.CharField(max_length=32,
                                  null=True,
                                  verbose_name=b'notional episode number',
                                  blank=True)),
                ('description',
                 models.TextField(null=True,
                                  verbose_name=b'short episode description',
                                  blank=True)),
                ('buffer_audio',
                 models.FileField(
                     upload_to=podmin.models.get_audio_upload_path,
                     storage=django.core.files.storage.FileSystemStorage(
                         location=b'/var/www/podcast_buffer'),
                     verbose_name=b'audio file')),
                ('audio',
                 models.FileField(upload_to=b'', verbose_name=b'audio file')),
                ('guid',
                 models.CharField(unique=True,
                                  max_length=255,
                                  verbose_name=b'published RSS GUID field')),
                ('part',
                 models.IntegerField(
                     null=True,
                     verbose_name=b'part number of a multipart cast',
                     blank=True)),
                ('pub_date',
                 models.DateTimeField(null=True,
                                      verbose_name=b'rss pubdate',
                                      blank=True)),
                ('size',
                 models.IntegerField(null=True,
                                     verbose_name=b'size in bytes',
                                     blank=True)),
                ('length',
                 models.CharField(max_length=32,
                                  null=True,
                                  verbose_name=b'length in h,m,s format',
                                  blank=True)),
                ('mime_type',
                 models.CharField(default=b'application/octet-stream',
                                  max_length=32,
                                  verbose_name=b'audio mime type')),
                ('active',
                 models.BooleanField(default=1, verbose_name=b'active')),
                ('tags',
                 models.CharField(max_length=255,
                                  null=True,
                                  verbose_name=b'comma separated list of tags',
                                  blank=True)),
                ('show_notes',
                 models.TextField(null=True,
                                  verbose_name=b'show notes',
                                  blank=True)),
                ('guests',
                 models.TextField(null=True,
                                  verbose_name=b'guests',
                                  blank=True)),
                ('credits',
                 models.TextField(null=True,
                                  verbose_name=b'art and music credits',
                                  blank=True)),
                ('image',
                 models.ImageField(upload_to=b'',
                                   verbose_name=b'episode image')),
                ('buffer_image',
                 models.ImageField(
                     upload_to=podmin.models.get_image_upload_path,
                     storage=django.core.files.storage.FileSystemStorage(
                         location=b'/var/www/podcast_buffer'),
                     verbose_name=b'image')),
                ('image_type',
                 models.CharField(max_length=16,
                                  verbose_name=b'image file type')),
                ('categorization_domain', models.URLField(blank=True)),
                ('summary', models.TextField(blank=True)),
                ('priority',
                 models.DecimalField(null=True,
                                     max_digits=2,
                                     decimal_places=1,
                                     blank=True)),
                ('block', models.BooleanField(default=False)),
            ],
            options={
                'ordering': ['-pub_date, part'],
                'get_latest_by': 'pub_date',
            },
        ),
        migrations.CreateModel(
            name='Podcast',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('title', models.CharField(max_length=255)),
                ('slug', models.SlugField(unique=True)),
                ('credits',
                 models.TextField(null=True,
                                  verbose_name=b'art and music credits',
                                  blank=True)),
                ('created',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name=b'created')),
                ('published',
                 models.DateTimeField(null=True,
                                      verbose_name=b'last published',
                                      blank=True)),
                ('updated',
                 models.DateTimeField(auto_now=True, verbose_name=b'updated')),
                ('website',
                 models.URLField(null=True,
                                 verbose_name=b'podcast website',
                                 blank=True)),
                ('frequency',
                 models.CharField(default=b'never',
                                  max_length=10,
                                  blank=True,
                                  choices=[(b'always', b'Always'),
                                           (b'hourly', b'Hourly'),
                                           (b'daily', b'Daily'),
                                           (b'weekly', b'Weekly'),
                                           (b'monthly', b'Monthly'),
                                           (b'yearly', b'Yearly'),
                                           (b'never', b'Never')])),
                ('active', models.BooleanField(default=True)),
                ('feed_format',
                 models.CharField(default=b'rss',
                                  max_length=16,
                                  verbose_name=b'feed format',
                                  choices=[(b'atom', b'Atom'),
                                           (b'rss', b'RSS')])),
                ('pub_url',
                 models.URLField(default=b'',
                                 verbose_name=b'base publication url',
                                 blank=True)),
                ('pub_dir',
                 models.CharField(default=b'',
                                  max_length=255,
                                  verbose_name=b'rss publication path',
                                  blank=True)),
                ('storage_dir',
                 models.CharField(default=b'',
                                  max_length=255,
                                  verbose_name=b'storage base dir',
                                  blank=True)),
                ('storage_url',
                 models.URLField(default=b'',
                                 verbose_name=b'storage base url',
                                 blank=True)),
                ('tmp_dir',
                 models.CharField(
                     default=b'/tmp',
                     max_length=255,
                     verbose_name=b'path to temporary processing location')),
                ('last_import',
                 models.DateTimeField(null=True,
                                      verbose_name=b'last import',
                                      blank=True)),
                ('combine_segments', models.BooleanField(default=False)),
                ('publish_segments', models.BooleanField(default=False)),
                ('up_dir',
                 models.CharField(
                     max_length=255,
                     verbose_name=b'path to the upload location')),
                ('cleaner',
                 models.CharField(default=b'default',
                                  max_length=255,
                                  verbose_name=b'file cleaner function name')),
                ('rename_files', models.BooleanField(default=False)),
                ('tag_audio', models.BooleanField(default=True)),
                ('organization', models.CharField(default=b'',
                                                  max_length=255)),
                ('station',
                 models.CharField(max_length=16,
                                  verbose_name=b'broadcasting station name',
                                  blank=True)),
                ('description', models.TextField(null=True, blank=True)),
                ('author',
                 models.CharField(max_length=255, null=True, blank=True)),
                ('contact',
                 models.EmailField(max_length=255, null=True, blank=True)),
                ('image',
                 models.ImageField(
                     upload_to=podmin.models.get_image_upload_path,
                     verbose_name=b'cover art')),
                ('copyright',
                 models.CharField(max_length=255, null=True, blank=True)),
                ('license',
                 models.CharField(
                     blank=True,
                     max_length=255,
                     null=True,
                     verbose_name=b'license',
                     choices=
                     [(b'All rights reserved', b'All rights reserved'),
                      (b'Creative Commons: Attribution (by)',
                       b'Creative Commons: Attribution (by)'),
                      (b'Creative Commons: Attribution-Share Alike (by-sa)',
                       b'Creative Commons: Attribution-Share Alike (by-sa)'),
                      (b'Creative Commons: Attribution-No Derivatives (by-nd)',
                       b'Creative Commons: Attribution-No Derivatives (by-nd)'
                       ),
                      (b'Creative Commons: Attribution-Non-Commercial (by-nc)',
                       b'Creative Commons: Attribution-Non-Commercial (by-nc)'
                       ),
                      (b'Creative Commons: Attribution-Non-Commercial-Share Alike         (by-nc-sa)',
                       b'Creative Commons: Attribution-Non-Commercial-Share Alike         (by-nc-sa)'
                       ),
                      (b'Creative Commons: Attribution-Non-Commercial-No Dreivatives         (by-nc-nd)',
                       b'Creative Commons: Attribution-Non-Commercial-No Dreivatives         (by-nc-nd)'
                       ), (b'Public domain', b'Public domain'),
                      (b'Other', b'Other')])),
                ('copyright_url',
                 models.TextField(null=True,
                                  verbose_name=b'copyright url',
                                  blank=True)),
                ('language',
                 models.CharField(max_length=8,
                                  choices=[(b'en', b'English')])),
                ('feedburner_url',
                 models.URLField(verbose_name=b'FeedBurner URL', blank=True)),
                ('ttl',
                 models.IntegerField(
                     default=1440,
                     verbose_name=b'minutes this feed can be cached')),
                ('tags',
                 models.CharField(max_length=255,
                                  null=True,
                                  verbose_name=b'comma separated list of tags',
                                  blank=True)),
                ('max_age',
                 models.IntegerField(default=365,
                                     verbose_name=b'days to keep an episode')),
                ('editor_email',
                 models.EmailField(max_length=254,
                                   verbose_name=b'editor email',
                                   blank=True)),
                ('webmaster_email',
                 models.EmailField(max_length=254,
                                   verbose_name=b'webmaster email',
                                   blank=True)),
                ('categorization_domain', models.URLField(blank=True)),
                ('subtitle', models.CharField(max_length=255, blank=True)),
                ('summary', models.TextField(blank=True)),
                ('explicit',
                 models.CharField(default=b'No',
                                  max_length=255,
                                  blank=True,
                                  choices=[(b'Yes', b'Yes'), (b'No', b'No'),
                                           (b'Clean', b'Clean')])),
                ('block', models.BooleanField(default=False)),
                ('redirect', models.URLField(blank=True)),
                ('keywords', models.CharField(max_length=255, blank=True)),
                ('itunes_url',
                 models.URLField(verbose_name=b'iTunes Store URL',
                                 blank=True)),
                ('file_rename_format',
                 models.CharField(default=b'{podcast}_{number:0>2}_{date}',
                                  max_length=32,
                                  verbose_name=b'file name pattern')),
                ('itunes_categories',
                 models.ManyToManyField(to='podmin.Category', blank=True)),
                ('owner',
                 models.ForeignKey(default=1, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='episode',
            name='podcast',
            field=models.ForeignKey(to='podmin.Podcast'),
        ),
        migrations.AlterUniqueTogether(
            name='episode',
            unique_together=set([('podcast', 'track_number'),
                                 ('podcast', 'number')]),
        ),
        migrations.AlterOrderWithRespectTo(
            name='episode',
            order_with_respect_to='podcast',
        ),
        migrations.AlterOrderWithRespectTo(
            name='category',
            order_with_respect_to='parent',
        ),
    ]