Ejemplo n.º 1
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')]),
        ),
    ]
Ejemplo n.º 2
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'),
        ),
    ]
Ejemplo n.º 4
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')),
            ],
        ),
    ]