Esempio n. 1
0
class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='BetOdds',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('t_created', models.DateTimeField(auto_now_add=True)),
                ('odds', django_mysql.models.JSONField(default=dict)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Club',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('en_club_name', models.CharField(max_length=200)),
                ('cn_club_name', models.CharField(max_length=200)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Player',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('en_name', models.CharField(max_length=200)),
                ('cn_name', models.CharField(max_length=200)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Esempio n. 2
0
class Migration(migrations.Migration):

    dependencies = [
        ('organizations', '0006_auto_20171207_0259'),
        migrations.swappable_dependency(settings.OAUTH2_PROVIDER_APPLICATION_MODEL),
        ('oauth_dispatch', '0003_application_data'),
    ]

    operations = [
        migrations.CreateModel(
            name='ApplicationAccess',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('scopes', django_mysql.models.ListCharField(models.CharField(max_length=32), help_text='Comma-separated list of scopes that this application will be allowed to request.', max_length=825, size=25)),
                ('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='access', to=settings.OAUTH2_PROVIDER_APPLICATION_MODEL, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='ApplicationOrganization',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('relation_type', models.CharField(choices=[(u'content_org', 'Content Provider')], default=u'content_org', max_length=32)),
                ('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='organizations', to=settings.OAUTH2_PROVIDER_APPLICATION_MODEL)),
                ('organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organizations.Organization')),
            ],
        ),
        migrations.RemoveField(
            model_name='scopedapplication',
            name='user',
        ),
        migrations.RemoveField(
            model_name='scopedapplicationorganization',
            name='application',
        ),
        migrations.DeleteModel(
            name='ScopedApplication',
        ),
        migrations.DeleteModel(
            name='ScopedApplicationOrganization',
        ),
        migrations.AlterUniqueTogether(
            name='applicationorganization',
            unique_together=set([('application', 'relation_type', 'organization')]),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('oauth_dispatch', '0007_restore_application_id_constraints'),
    ]

    operations = [
        migrations.AddField(
            model_name='applicationaccess',
            name='filters',
            field=django_mysql.models.ListCharField(models.CharField(max_length=32), blank=True, help_text='Comma-separated list of filters that this application will be allowed to request.', max_length=825, null=True, size=25),
        ),
    ]
Esempio n. 4
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='ScopedApplication',
            fields=[
                ('client_id',
                 models.CharField(
                     db_index=True,
                     default=oauth2_provider.generators.generate_client_id,
                     max_length=100,
                     unique=True)),
                ('redirect_uris',
                 models.TextField(
                     blank=True,
                     help_text='Allowed URIs list, space separated',
                     validators=[oauth2_provider.validators.validate_uris])),
                ('client_type',
                 models.CharField(choices=[('confidential', 'Confidential'),
                                           ('public', 'Public')],
                                  max_length=32)),
                ('authorization_grant_type',
                 models.CharField(choices=[
                     ('authorization-code', 'Authorization code'),
                     ('implicit', 'Implicit'),
                     ('password', 'Resource owner password-based'),
                     ('client-credentials', 'Client credentials')
                 ],
                                  max_length=32)),
                ('client_secret',
                 models.CharField(
                     blank=True,
                     db_index=True,
                     default=oauth2_provider.generators.generate_client_secret,
                     max_length=255)),
                ('name', models.CharField(blank=True, max_length=255)),
                ('skip_authorization', models.BooleanField(default=False)),
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('scopes',
                 django_mysql.models.ListCharField(
                     models.CharField(max_length=32),
                     help_text=
                     'Comma-separated list of scopes that this application will be allowed to request.',
                     max_length=825,
                     size=25)),
                ('user',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='oauth_dispatch_scopedapplication',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ScopedApplicationOrganization',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('short_name',
                 models.CharField(
                     help_text='The short_name of an existing Organization.',
                     max_length=255)),
                ('provider_type',
                 models.CharField(choices=[(u'content_org', 'Content Provider')
                                           ],
                                  default=u'content_org',
                                  max_length=32)),
                ('application',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='organizations',
                     to=settings.OAUTH2_PROVIDER_APPLICATION_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):
    dependencies = [
        ('cms', '0005_auto_20190118_1958'),
    ]

    operations = [
        migrations.CreateModel(
            name='PageCategory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('slug', models.SlugField(max_length=255, unique=True)),
                ('language',
                 models.CharField(
                     default=webdjango.models.TranslationModel.default_i18n,
                     max_length=5,
                     validators=[
                         webdjango.models.TranslationModel.validate_i18n
                     ])),
                ('translation',
                 django_mysql.models.JSONField(default=None, null=True)),
                ('name', models.CharField(max_length=128)),
                ('description', models.TextField(blank=True)),
                ('parent',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='children',
                                   to='cms.PageCategory')),
            ],
            options={
                'db_table': 'cms_page_category',
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='PageTag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('slug', models.SlugField(max_length=255, unique=True)),
                ('language',
                 models.CharField(
                     default=webdjango.models.TranslationModel.default_i18n,
                     max_length=5,
                     validators=[
                         webdjango.models.TranslationModel.validate_i18n
                     ])),
                ('translation',
                 django_mysql.models.JSONField(default=None, null=True)),
                ('name', models.CharField(max_length=128)),
                ('count', models.PositiveIntegerField(default=0)),
                ('description', models.TextField(blank=True)),
            ],
            options={
                'db_table': 'cms_page_tag',
                'ordering': ['-created'],
            },
        ),
        migrations.AddField(
            model_name='block',
            name='block_class',
            field=models.CharField(choices=[('simple', 'simple'),
                                            ('widget_holder', 'widget_holder'),
                                            ('layout', 'layout'),
                                            ('header', 'header'),
                                            ('footer', 'footer')],
                                   default='simple',
                                   max_length=32),
        ),
        migrations.AddField(
            model_name='block',
            name='is_system',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='block',
            name='settings',
            field=django_mysql.models.JSONField(default=None, null=True),
        ),
        migrations.AddField(
            model_name='page',
            name='page_class',
            field=models.CharField(choices=[('static', 'static'),
                                            ('post', 'post'),
                                            ('product', 'product')],
                                   default='static',
                                   max_length=32),
        ),
        migrations.AddField(
            model_name='page',
            name='post_type',
            field=models.CharField(choices=[('article', 'article'),
                                            ('video', 'video'),
                                            ('audio', 'audio'),
                                            ('image', 'image')],
                                   default='article',
                                   max_length=32),
        ),
        migrations.AddField(
            model_name='page',
            name='categories',
            field=models.ManyToManyField(related_name='pages',
                                         to='cms.PageCategory'),
        ),
        migrations.AddField(
            model_name='page',
            name='tags',
            field=models.ManyToManyField(related_name='pages',
                                         to='cms.PageTag'),
        ),
    ]
Esempio n. 6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Author",
            fields=[
                ("id",
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name="ID")),
                ("first_name", models.CharField(max_length=36,
                                                verbose_name="名")),
                ("last_name", models.CharField(max_length=64,
                                               verbose_name="姓氏")),
                ("birthday",
                 models.DateField(blank=True, null=True, verbose_name="出生日期")),
                ("email",
                 models.EmailField(blank=True, max_length=254, null=True)),
                ("created_at",
                 models.DateTimeField(auto_now_add=True, verbose_name="创建时间")),
                ("updated_at",
                 models.DateTimeField(auto_now=True,
                                      null=True,
                                      verbose_name="更新时间")),
            ],
            options={
                "verbose_name": "作者",
                "verbose_name_plural": "作者",
            },
        ),
        migrations.CreateModel(
            name="Book",
            fields=[
                ("id",
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name="ID")),
                ("name", models.CharField(max_length=128, verbose_name="书名")),
                ("ISBN", models.CharField(max_length=64, verbose_name="ISBN")),
                ("publication_date",
                 models.DateTimeField(verbose_name="出版日期")),
                ("package_type",
                 models.IntegerField(choices=[(1, "平装"), (2, "精装")],
                                     verbose_name="包装类型")),
                ("publisher_id", models.IntegerField(verbose_name="出版社ID")),
                (
                    "author_ids",
                    django_mysql.models.ListCharField(
                        models.IntegerField(verbose_name="作者ID"),
                        max_length=128,
                        size=None,
                        verbose_name="作者ID列表"),
                ),
                ("created_at",
                 models.DateTimeField(auto_now_add=True, verbose_name="创建时间")),
                ("updated_at",
                 models.DateTimeField(auto_now=True,
                                      null=True,
                                      verbose_name="更新时间")),
            ],
            options={
                "verbose_name": "书籍",
                "verbose_name_plural": "书籍",
            },
        ),
        migrations.CreateModel(
            name="Publisher",
            fields=[
                ("id",
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name="ID")),
                ("name", models.CharField(max_length=128,
                                          verbose_name="出版社名称")),
                ("address",
                 models.CharField(max_length=128, verbose_name="出版社地址")),
                ("city", models.CharField(max_length=64, verbose_name="所在城市")),
                ("country", models.CharField(max_length=64,
                                             verbose_name="所在国家")),
                ("website", models.URLField(blank=True, null=True)),
                ("created_at",
                 models.DateTimeField(auto_now_add=True, verbose_name="创建时间")),
                ("updated_at",
                 models.DateTimeField(auto_now=True,
                                      null=True,
                                      verbose_name="更新时间")),
            ],
            options={
                "verbose_name": "出版社",
                "verbose_name_plural": "出版社",
            },
        ),
    ]
Esempio n. 7
0
class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ('webdjango', '0007_email'),
    ]

    operations = [
        migrations.CreateModel(
            name='Block',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=255)),
                ('slug',
                 models.SlugField(blank=True,
                                  default=None,
                                  max_length=255,
                                  null=True)),
                ('content', models.TextField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'cms_block',
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='Menu',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=255)),
                ('slug',
                 models.SlugField(blank=True,
                                  default=None,
                                  max_length=255,
                                  null=True)),
                ('wrapper_class', models.CharField(max_length=255)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'cms_menu',
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='MenuItem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=255)),
                ('url', models.URLField()),
                ('alt', models.CharField(max_length=255)),
                ('target',
                 models.CharField(choices=[('_blank', '_blank'),
                                           ('_self', '_self'),
                                           ('_parent', '_parent'),
                                           ('_top', '_top')],
                                  default='_self',
                                  max_length=255)),
                ('position', models.PositiveSmallIntegerField()),
                ('menu',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='menu',
                                   to='cms.Menu')),
                ('parent',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='children',
                                   to='cms.MenuItem')),
            ],
            options={
                'db_table': 'cms_menu_item',
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('slug', models.SlugField(max_length=255, unique=True)),
                ('seo_title',
                 models.CharField(
                     blank=True,
                     max_length=70,
                     null=True,
                     validators=[
                         django.core.validators.MaxLengthValidator(70)
                     ])),
                ('seo_description',
                 models.CharField(
                     blank=True,
                     max_length=300,
                     null=True,
                     validators=[
                         django.core.validators.MaxLengthValidator(300)
                     ])),
                ('language',
                 models.CharField(
                     default=webdjango.models.TranslationModel.default_i18n,
                     max_length=5,
                     validators=[
                         webdjango.models.TranslationModel.validate_i18n
                     ])),
                ('translation',
                 django_mysql.models.JSONField(default=None, null=True)),
                ('title', models.CharField(max_length=255)),
                ('content', models.TextField()),
                ('footer',
                 models.ForeignKey(blank=True,
                                   default=None,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   related_name='footers',
                                   to='cms.Block')),
                ('header',
                 models.ForeignKey(blank=True,
                                   default=None,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   related_name='headers',
                                   to='cms.Block')),
            ],
            options={
                'db_table': 'cms_page',
                'ordering': ['-created'],
            },
        ),
    ]
class Migration(migrations.Migration):
    dependencies = [
        ('course_groups', '0003_auto_20170609_1455'),
        ('discussions', '0006_auto_20211006_0441'),
    ]

    operations = [
        migrations.AlterField(
            model_name='providerfilter',
            name='allow',
            field=django_mysql.models.ListCharField(
                models.CharField(choices=[('legacy', 'legacy'),
                                          ('openedx', 'openedx'),
                                          ('ed-discuss', 'ed-discuss'),
                                          ('inscribe', 'inscribe'),
                                          ('piazza', 'piazza'),
                                          ('yellowdig', 'yellowdig')],
                                 max_length=20),
                blank=True,
                help_text=
                'Comma-separated list of providers to allow, eg: legacy,openedx,ed-discuss,inscribe,piazza,yellowdig',
                max_length=63,
                size=3,
                verbose_name='Allow List'),
        ),
        migrations.AlterField(
            model_name='providerfilter',
            name='deny',
            field=django_mysql.models.ListCharField(
                models.CharField(
                    choices=[
                        ('legacy', 'legacy'),
                        ('openedx', 'openedx'), ('ed-discuss', 'ed-discuss'),
                        ('inscribe', 'inscribe'), ('piazza',
                                                   'piazza'),
                        ('yellowdig', 'yellowdig')
                    ],
                    max_length=20),
                blank=True,
                help_text=
                'Comma-separated list of providers to deny, eg: legacy,openedx,ed-discuss,inscribe,piazza,yellowdig',
                max_length=63,
                size=3,
                verbose_name='Deny List'),
        ),
        migrations.CreateModel(
            name='DiscussionTopicLink',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('context_key',
                 opaque_keys.edx.django.models.LearningContextKeyField(
                     db_index=True,
                     help_text=
                     'Context key for context in which this discussion topic exists.',
                     max_length=255,
                     verbose_name='Learning Context Key')),
                ('usage_key',
                 opaque_keys.edx.django.models.UsageKeyField(
                     blank=True,
                     db_index=True,
                     help_text=
                     'Usage key for in-context discussion topic. Set to null for course-level topics.',
                     max_length=255,
                     null=True)),
                ('title',
                 models.CharField(help_text='Title for discussion topic.',
                                  max_length=255)),
                ('provider_id',
                 models.CharField(
                     help_text='Provider id for discussion provider.',
                     max_length=32)),
                ('external_id',
                 models.CharField(
                     db_index=True,
                     help_text=
                     'Discussion context ID in external forum provider. e.g. commentable_id for cs_comments_service.',
                     max_length=255)),
                ('enabled_in_context',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Whether this topic should be shown in-context in the course.'
                 )),
                ('group',
                 models.ForeignKey(
                     blank=True,
                     help_text='Group for divided discussions.',
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='course_groups.courseusergroup')),
            ],
        ),
    ]