From 80c7f5af0152443a45f3294dc0cf52f3f7651297 Mon Sep 17 00:00:00 2001 From: Manjinder Singh <49171515+jinder1s@users.noreply.github.com> Date: Thu, 24 Oct 2019 16:08:04 -0400 Subject: [PATCH] BOM-933: Fix type mismatches in various migrations 5 (#22147) * fix type mismatch in third_party_auth migrations * fix type mismatch in verify_student migrations * fix type mismatch in video_config migrations * fix type mismatch in verified_track_content migrations * fix type mismatch in commercemigrations * fix type mismatch in xblock_config migrations * fix type mismatch in course_creators migrations * fix type mismatch in contentstore migrations --- .../contentstore/migrations/0001_initial.py | 2 +- cms/djangoapps/contentstore/models.py | 2 +- .../migrations/0001_initial.py | 4 +- cms/djangoapps/course_creators/models.py | 10 +- .../xblock_config/migrations/0001_initial.py | 2 +- cms/djangoapps/xblock_config/models.py | 4 +- .../migrations/0001_initial.py | 64 ++++---- .../0002_schema__provider_icon_image.py | 12 +- .../0003_samlproviderconfig_debug_mode.py | 2 +- .../migrations/0004_add_visible_field.py | 12 +- .../migrations/0005_add_site_field.py | 2 +- ...roviderconfig_automatic_refresh_enabled.py | 2 +- .../migrations/0007_auto_20170406_0912.py | 4 +- .../migrations/0009_auto_20170415_1144.py | 6 +- .../migrations/0011_auto_20170616_0112.py | 2 +- .../migrations/0016_auto_20180130_0938.py | 2 +- .../migrations/0019_consolidate_slug.py | 6 +- .../migrations/0021_sso_id_verification.py | 6 +- .../migrations/0022_auto_20181012_0307.py | 10 +- common/djangoapps/third_party_auth/models.py | 143 +++++++++--------- common/djangoapps/third_party_auth/saml.py | 4 +- common/test/acceptance/pages/xblock/acid.py | 1 - .../migrations/0002_commerceconfiguration.py | 2 +- .../migrations/0004_auto_20160531_0950.py | 2 +- .../migrations/0006_auto_20170424_1734.py | 2 +- .../migrations/0007_auto_20180313_0609.py | 2 +- lms/djangoapps/commerce/models.py | 2 +- .../verify_student/migrations/0001_initial.py | 4 +- .../migrations/0006_ssoverification.py | 6 +- .../0007_idverificationaggregate.py | 2 +- .../migrations/0010_manualverification.py | 4 +- lms/djangoapps/verify_student/models.py | 22 +-- ...rackcohortedcourse_verified_cohort_name.py | 2 +- ...0003_migrateverifiedtrackcohortssetting.py | 6 +- .../verified_track_content/models.py | 8 +- .../0003_transcriptmigrationsetting.py | 8 +- ...ideothumbnailetting_updatedcoursevideos.py | 6 +- .../core/djangoapps/video_config/models.py | 14 +- 38 files changed, 198 insertions(+), 196 deletions(-) diff --git a/cms/djangoapps/contentstore/migrations/0001_initial.py b/cms/djangoapps/contentstore/migrations/0001_initial.py index 863e4ef408..f436c1f648 100644 --- a/cms/djangoapps/contentstore/migrations/0001_initial.py +++ b/cms/djangoapps/contentstore/migrations/0001_initial.py @@ -32,7 +32,7 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), - ('profile_whitelist', models.TextField(help_text=b'A comma-separated list of names of profiles to include in video encoding downloads.', blank=True)), + ('profile_whitelist', models.TextField(help_text=u'A comma-separated list of names of profiles to include in video encoding downloads.', blank=True)), ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), ], options={ diff --git a/cms/djangoapps/contentstore/models.py b/cms/djangoapps/contentstore/models.py index 9ab2e4ad1b..126c948561 100644 --- a/cms/djangoapps/contentstore/models.py +++ b/cms/djangoapps/contentstore/models.py @@ -16,7 +16,7 @@ class VideoUploadConfig(ConfigurationModel): """ profile_whitelist = TextField( blank=True, - help_text="A comma-separated list of names of profiles to include in video encoding downloads." + help_text=u"A comma-separated list of names of profiles to include in video encoding downloads." ) @classmethod diff --git a/cms/djangoapps/course_creators/migrations/0001_initial.py b/cms/djangoapps/course_creators/migrations/0001_initial.py index 32a9fecb25..e46a1c3955 100644 --- a/cms/djangoapps/course_creators/migrations/0001_initial.py +++ b/cms/djangoapps/course_creators/migrations/0001_initial.py @@ -16,8 +16,8 @@ class Migration(migrations.Migration): name='CourseCreator', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('state_changed', models.DateTimeField(help_text='The date when state was last updated', verbose_name=b'state last updated', auto_now_add=True)), - ('state', models.CharField(default=b'unrequested', help_text='Current course creator state', max_length=24, choices=[(b'unrequested', 'unrequested'), (b'pending', 'pending'), (b'granted', 'granted'), (b'denied', 'denied')])), + ('state_changed', models.DateTimeField(help_text='The date when state was last updated', verbose_name=u'state last updated', auto_now_add=True)), + ('state', models.CharField(default=u'unrequested', help_text='Current course creator state', max_length=24, choices=[(u'unrequested', 'unrequested'), (u'pending', 'pending'), (u'granted', 'granted'), (u'denied', 'denied')])), ('note', models.CharField(help_text='Optional notes about this user (for example, why course creation access was denied)', max_length=512, blank=True)), ('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, help_text='Studio user', on_delete=models.CASCADE)), ], diff --git a/cms/djangoapps/course_creators/models.py b/cms/djangoapps/course_creators/models.py index fd80213757..f9728fa1af 100644 --- a/cms/djangoapps/course_creators/models.py +++ b/cms/djangoapps/course_creators/models.py @@ -28,10 +28,10 @@ class CourseCreator(models.Model): .. no_pii: """ - UNREQUESTED = 'unrequested' - PENDING = 'pending' - GRANTED = 'granted' - DENIED = 'denied' + UNREQUESTED = u'unrequested' + PENDING = u'pending' + GRANTED = u'granted' + DENIED = u'denied' # Second value is the "human-readable" version. STATES = ( @@ -42,7 +42,7 @@ class CourseCreator(models.Model): ) user = models.OneToOneField(User, help_text=_("Studio user"), on_delete=models.CASCADE) - state_changed = models.DateTimeField('state last updated', auto_now_add=True, + state_changed = models.DateTimeField(u'state last updated', auto_now_add=True, help_text=_("The date when state was last updated")) state = models.CharField(max_length=24, blank=False, choices=STATES, default=UNREQUESTED, help_text=_("Current course creator state")) diff --git a/cms/djangoapps/xblock_config/migrations/0001_initial.py b/cms/djangoapps/xblock_config/migrations/0001_initial.py index 18c07ea98a..721036b40f 100644 --- a/cms/djangoapps/xblock_config/migrations/0001_initial.py +++ b/cms/djangoapps/xblock_config/migrations/0001_initial.py @@ -19,7 +19,7 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), - ('disabled_blocks', models.TextField(default=b'about course_info static_tab', help_text=b'Space-separated list of XBlocks on which XBlockAsides should never render in studio')), + ('disabled_blocks', models.TextField(default='about course_info static_tab', help_text='Space-separated list of XBlocks on which XBlockAsides should never render in studio')), ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), ], options={ diff --git a/cms/djangoapps/xblock_config/models.py b/cms/djangoapps/xblock_config/models.py index 5eac8045c9..ad0f05cb34 100644 --- a/cms/djangoapps/xblock_config/models.py +++ b/cms/djangoapps/xblock_config/models.py @@ -23,8 +23,8 @@ class StudioConfig(ConfigurationModel): .. no_pii: """ disabled_blocks = TextField( - default="about course_info static_tab", - help_text="Space-separated list of XBlocks on which XBlockAsides should never render in studio", + default=u"about course_info static_tab", + help_text=u"Space-separated list of XBlocks on which XBlockAsides should never render in studio", ) @classmethod diff --git a/common/djangoapps/third_party_auth/migrations/0001_initial.py b/common/djangoapps/third_party_auth/migrations/0001_initial.py index f7e835dd38..5ee28dddd1 100644 --- a/common/djangoapps/third_party_auth/migrations/0001_initial.py +++ b/common/djangoapps/third_party_auth/migrations/0001_initial.py @@ -21,15 +21,15 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), - ('icon_class', models.CharField(default=b'fa-sign-in', help_text=b'The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50)), - ('name', models.CharField(help_text=b'Name of this provider (shown to users)', max_length=50)), + ('icon_class', models.CharField(default=u'fa-sign-in', help_text=u'The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50)), + ('name', models.CharField(help_text=u'Name of this provider (shown to users)', max_length=50)), ('secondary', models.BooleanField(default=False, help_text='Secondary providers are displayed less prominently, in a separate list of "Institution" login providers.')), ('skip_registration_form', models.BooleanField(default=False, help_text='If this option is enabled, users will not be asked to confirm their details (name, email, etc.) during the registration process. Only select this option for trusted providers that are known to provide accurate user information.')), ('skip_email_verification', models.BooleanField(default=False, help_text='If this option is selected, users will not be required to confirm their email, and their account will be activated immediately upon registration.')), - ('lti_consumer_key', models.CharField(help_text=b'The name that the LTI Tool Consumer will use to identify itself', max_length=255)), - ('lti_hostname', models.CharField(default=b'localhost', help_text=b'The domain that will be acting as the LTI consumer.', max_length=255, db_index=True)), - ('lti_consumer_secret', models.CharField(default=provider.utils.long_token, help_text=b'The shared secret that the LTI Tool Consumer will use to authenticate requests. Only this edX instance and this tool consumer instance should know this value. For increased security, you can avoid storing this in your database by leaving this field blank and setting SOCIAL_AUTH_LTI_CONSUMER_SECRETS = {"consumer key": "secret", ...} in your instance\'s Django setttigs (or lms.auth.json)', max_length=255, blank=True)), - ('lti_max_timestamp_age', models.IntegerField(default=10, help_text=b'The maximum age of oauth_timestamp values, in seconds.')), + ('lti_consumer_key', models.CharField(help_text=u'The name that the LTI Tool Consumer will use to identify itself', max_length=255)), + ('lti_hostname', models.CharField(default=u'localhost', help_text=u'The domain that will be acting as the LTI consumer.', max_length=255, db_index=True)), + ('lti_consumer_secret', models.CharField(default=provider.utils.long_token, help_text=u'The shared secret that the LTI Tool Consumer will use to authenticate requests. Only this edX instance and this tool consumer instance should know this value. For increased security, you can avoid storing this in your database by leaving this field blank and setting SOCIAL_AUTH_LTI_CONSUMER_SECRETS = {"consumer key": "secret", ...} in your instance\'s Django setttigs (or lms.auth.json)', max_length=255, blank=True)), + ('lti_max_timestamp_age', models.IntegerField(default=10, help_text=u'The maximum age of oauth_timestamp values, in seconds.')), ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), ], options={ @@ -43,15 +43,15 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), - ('icon_class', models.CharField(default=b'fa-sign-in', help_text=b'The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50)), - ('name', models.CharField(help_text=b'Name of this provider (shown to users)', max_length=50)), + ('icon_class', models.CharField(default=u'fa-sign-in', help_text=u'The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50)), + ('name', models.CharField(help_text=u'Name of this provider (shown to users)', max_length=50)), ('secondary', models.BooleanField(default=False, help_text='Secondary providers are displayed less prominently, in a separate list of "Institution" login providers.')), ('skip_registration_form', models.BooleanField(default=False, help_text='If this option is enabled, users will not be asked to confirm their details (name, email, etc.) during the registration process. Only select this option for trusted providers that are known to provide accurate user information.')), ('skip_email_verification', models.BooleanField(default=False, help_text='If this option is selected, users will not be required to confirm their email, and their account will be activated immediately upon registration.')), - ('backend_name', models.CharField(help_text=b'Which python-social-auth OAuth2 provider backend to use. The list of backend choices is determined by the THIRD_PARTY_AUTH_BACKENDS setting.', max_length=50, db_index=True)), - ('key', models.TextField(verbose_name=b'Client ID', blank=True)), - ('secret', models.TextField(help_text=b'For increased security, you can avoid storing this in your database by leaving this field blank and setting SOCIAL_AUTH_OAUTH_SECRETS = {"(backend name)": "secret", ...} in your instance\'s Django settings (or lms.auth.json)', verbose_name=b'Client Secret', blank=True)), - ('other_settings', models.TextField(help_text=b'Optional JSON object with advanced settings, if any.', blank=True)), + ('backend_name', models.CharField(help_text=u'Which python-social-auth OAuth2 provider backend to use. The list of backend choices is determined by the THIRD_PARTY_AUTH_BACKENDS setting.', max_length=50, db_index=True)), + ('key', models.TextField(verbose_name=u'Client ID', blank=True)), + ('secret', models.TextField(help_text=u'For increased security, you can avoid storing this in your database by leaving this field blank and setting SOCIAL_AUTH_OAUTH_SECRETS = {"(backend name)": "secret", ...} in your instance\'s Django settings (or lms.auth.json)', verbose_name=u'Client Secret', blank=True)), + ('other_settings', models.TextField(help_text=u'Optional JSON object with advanced settings, if any.', blank=True)), ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), ], options={ @@ -63,7 +63,7 @@ class Migration(migrations.Migration): name='ProviderApiPermissions', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('provider_id', models.CharField(help_text=b'Uniquely identify a provider. This is different from backend_name.', max_length=255)), + ('provider_id', models.CharField(help_text=u'Uniquely identify a provider. This is different from backend_name.', max_length=255)), ('client', models.ForeignKey(to='oauth2.Client', on_delete=models.CASCADE)), ], options={ @@ -77,11 +77,11 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), - ('private_key', models.TextField(help_text=b'To generate a key pair as two files, run "openssl req -new -x509 -days 3652 -nodes -out saml.crt -keyout saml.key". Paste the contents of saml.key here. For increased security, you can avoid storing this in your database by leaving this field blank and setting it via the SOCIAL_AUTH_SAML_SP_PRIVATE_KEY setting in your instance\'s Django settings (or lms.auth.json).', blank=True)), - ('public_key', models.TextField(help_text=b"Public key certificate. For increased security, you can avoid storing this in your database by leaving this field blank and setting it via the SOCIAL_AUTH_SAML_SP_PUBLIC_CERT setting in your instance's Django settings (or lms.auth.json).", blank=True)), - ('entity_id', models.CharField(default=b'http://saml.example.com', max_length=255, verbose_name=b'Entity ID')), - ('org_info_str', models.TextField(default=b'{"en-US": {"url": "http://www.example.com", "displayname": "Example Inc.", "name": "example"}}', help_text=b"JSON dictionary of 'url', 'displayname', and 'name' for each language", verbose_name=b'Organization Info')), - ('other_config_str', models.TextField(default=b'{\n"SECURITY_CONFIG": {"metadataCacheDuration": 604800, "signMetadata": false}\n}', help_text=b'JSON object defining advanced settings that are passed on to python-saml. Valid keys that can be set here include: SECURITY_CONFIG and SP_EXTRA')), + ('private_key', models.TextField(help_text=u'To generate a key pair as two files, run "openssl req -new -x509 -days 3652 -nodes -out saml.crt -keyout saml.key". Paste the contents of saml.key here. For increased security, you can avoid storing this in your database by leaving this field blank and setting it via the SOCIAL_AUTH_SAML_SP_PRIVATE_KEY setting in your instance\'s Django settings (or lms.auth.json).', blank=True)), + ('public_key', models.TextField(help_text=u"Public key certificate. For increased security, you can avoid storing this in your database by leaving this field blank and setting it via the SOCIAL_AUTH_SAML_SP_PUBLIC_CERT setting in your instance's Django settings (or lms.auth.json).", blank=True)), + ('entity_id', models.CharField(default=u'http://saml.example.com', max_length=255, verbose_name=u'Entity ID')), + ('org_info_str', models.TextField(default=u'{"en-US": {"url": "http://www.example.com", "displayname": "Example Inc.", "name": "example"}}', help_text=u"JSON dictionary of 'url', 'displayname', and 'name' for each language", verbose_name=u'Organization Info')), + ('other_config_str', models.TextField(default=u'{\n"SECURITY_CONFIG": {"metadataCacheDuration": 604800, "signMetadata": false}\n}', help_text=u'JSON object defining advanced settings that are passed on to python-saml. Valid keys that can be set here include: SECURITY_CONFIG and SP_EXTRA')), ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), ], options={ @@ -95,22 +95,22 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), - ('icon_class', models.CharField(default=b'fa-sign-in', help_text=b'The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50)), - ('name', models.CharField(help_text=b'Name of this provider (shown to users)', max_length=50)), + ('icon_class', models.CharField(default=u'fa-sign-in', help_text=u'The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50)), + ('name', models.CharField(help_text=u'Name of this provider (shown to users)', max_length=50)), ('secondary', models.BooleanField(default=False, help_text='Secondary providers are displayed less prominently, in a separate list of "Institution" login providers.')), ('skip_registration_form', models.BooleanField(default=False, help_text='If this option is enabled, users will not be asked to confirm their details (name, email, etc.) during the registration process. Only select this option for trusted providers that are known to provide accurate user information.')), ('skip_email_verification', models.BooleanField(default=False, help_text='If this option is selected, users will not be required to confirm their email, and their account will be activated immediately upon registration.')), - ('backend_name', models.CharField(default=b'tpa-saml', help_text=b"Which python-social-auth provider backend to use. 'tpa-saml' is the standard edX SAML backend.", max_length=50)), - ('idp_slug', models.SlugField(help_text=b'A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"', max_length=30)), - ('entity_id', models.CharField(help_text=b'Example: https://idp.testshib.org/idp/shibboleth', max_length=255, verbose_name=b'Entity ID')), - ('metadata_source', models.CharField(help_text=b"URL to this provider's XML metadata. Should be an HTTPS URL. Example: https://www.testshib.org/metadata/testshib-providers.xml", max_length=255)), - ('attr_user_permanent_id', models.CharField(help_text=b'URN of the SAML attribute that we can use as a unique, persistent user ID. Leave blank for default.', max_length=128, verbose_name=b'User ID Attribute', blank=True)), - ('attr_full_name', models.CharField(help_text=b"URN of SAML attribute containing the user's full name. Leave blank for default.", max_length=128, verbose_name=b'Full Name Attribute', blank=True)), - ('attr_first_name', models.CharField(help_text=b"URN of SAML attribute containing the user's first name. Leave blank for default.", max_length=128, verbose_name=b'First Name Attribute', blank=True)), - ('attr_last_name', models.CharField(help_text=b"URN of SAML attribute containing the user's last name. Leave blank for default.", max_length=128, verbose_name=b'Last Name Attribute', blank=True)), - ('attr_username', models.CharField(help_text=b'URN of SAML attribute to use as a suggested username for this user. Leave blank for default.', max_length=128, verbose_name=b'Username Hint Attribute', blank=True)), - ('attr_email', models.CharField(help_text=b"URN of SAML attribute containing the user's email address[es]. Leave blank for default.", max_length=128, verbose_name=b'Email Attribute', blank=True)), - ('other_settings', models.TextField(help_text=b'For advanced use cases, enter a JSON object with addtional configuration. The tpa-saml backend supports only {"requiredEntitlements": ["urn:..."]} which can be used to require the presence of a specific eduPersonEntitlement.', verbose_name=b'Advanced settings', blank=True)), + ('backend_name', models.CharField(default=u'tpa-saml', help_text=u"Which python-social-auth provider backend to use. 'tpa-saml' is the standard edX SAML backend.", max_length=50)), + ('idp_slug', models.SlugField(help_text=u'A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"', max_length=30)), + ('entity_id', models.CharField(help_text=u'Example: https://idp.testshib.org/idp/shibboleth', max_length=255, verbose_name=u'Entity ID')), + ('metadata_source', models.CharField(help_text=u"URL to this provider's XML metadata. Should be an HTTPS URL. Example: https://www.testshib.org/metadata/testshib-providers.xml", max_length=255)), + ('attr_user_permanent_id', models.CharField(help_text=u'URN of the SAML attribute that we can use as a unique, persistent user ID. Leave blank for default.', max_length=128, verbose_name=u'User ID Attribute', blank=True)), + ('attr_full_name', models.CharField(help_text=u"URN of SAML attribute containing the user's full name. Leave blank for default.", max_length=128, verbose_name=u'Full Name Attribute', blank=True)), + ('attr_first_name', models.CharField(help_text=u"URN of SAML attribute containing the user's first name. Leave blank for default.", max_length=128, verbose_name=u'First Name Attribute', blank=True)), + ('attr_last_name', models.CharField(help_text=u"URN of SAML attribute containing the user's last name. Leave blank for default.", max_length=128, verbose_name=u'Last Name Attribute', blank=True)), + ('attr_username', models.CharField(help_text=u'URN of SAML attribute to use as a suggested username for this user. Leave blank for default.', max_length=128, verbose_name=u'Username Hint Attribute', blank=True)), + ('attr_email', models.CharField(help_text=u"URN of SAML attribute containing the user's email address[es]. Leave blank for default.", max_length=128, verbose_name=u'Email Attribute', blank=True)), + ('other_settings', models.TextField(help_text=u'For advanced use cases, enter a JSON object with addtional configuration. The tpa-saml backend supports only {"requiredEntitlements": ["urn:..."]} which can be used to require the presence of a specific eduPersonEntitlement.', verbose_name=u'Advanced settings', blank=True)), ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), ], options={ @@ -125,7 +125,7 @@ class Migration(migrations.Migration): ('fetched_at', models.DateTimeField(db_index=True)), ('expires_at', models.DateTimeField(null=True, db_index=True)), ('entity_id', models.CharField(max_length=255, db_index=True)), - ('sso_url', models.URLField(verbose_name=b'SSO URL')), + ('sso_url', models.URLField(verbose_name=u'SSO URL')), ('public_key', models.TextField()), ], options={ diff --git a/common/djangoapps/third_party_auth/migrations/0002_schema__provider_icon_image.py b/common/djangoapps/third_party_auth/migrations/0002_schema__provider_icon_image.py index 32d54802f6..1132e13d43 100644 --- a/common/djangoapps/third_party_auth/migrations/0002_schema__provider_icon_image.py +++ b/common/djangoapps/third_party_auth/migrations/0002_schema__provider_icon_image.py @@ -14,31 +14,31 @@ class Migration(migrations.Migration): migrations.AddField( model_name='ltiproviderconfig', name='icon_image', - field=models.FileField(help_text=b'If there is no Font Awesome icon available for this provider, upload a custom image. SVG images are recommended as they can scale to any size.', upload_to=b'', blank=True), + field=models.FileField(help_text=u'If there is no Font Awesome icon available for this provider, upload a custom image. SVG images are recommended as they can scale to any size.', upload_to=u'', blank=True), ), migrations.AddField( model_name='oauth2providerconfig', name='icon_image', - field=models.FileField(help_text=b'If there is no Font Awesome icon available for this provider, upload a custom image. SVG images are recommended as they can scale to any size.', upload_to=b'', blank=True), + field=models.FileField(help_text=u'If there is no Font Awesome icon available for this provider, upload a custom image. SVG images are recommended as they can scale to any size.', upload_to=u'', blank=True), ), migrations.AddField( model_name='samlproviderconfig', name='icon_image', - field=models.FileField(help_text=b'If there is no Font Awesome icon available for this provider, upload a custom image. SVG images are recommended as they can scale to any size.', upload_to=b'', blank=True), + field=models.FileField(help_text=u'If there is no Font Awesome icon available for this provider, upload a custom image. SVG images are recommended as they can scale to any size.', upload_to=u'', blank=True), ), migrations.AlterField( model_name='ltiproviderconfig', name='icon_class', - field=models.CharField(default=b'fa-sign-in', help_text=b'The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50, blank=True), + field=models.CharField(default=u'fa-sign-in', help_text=u'The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50, blank=True), ), migrations.AlterField( model_name='oauth2providerconfig', name='icon_class', - field=models.CharField(default=b'fa-sign-in', help_text=b'The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50, blank=True), + field=models.CharField(default=u'fa-sign-in', help_text=u'The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50, blank=True), ), migrations.AlterField( model_name='samlproviderconfig', name='icon_class', - field=models.CharField(default=b'fa-sign-in', help_text=b'The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50, blank=True), + field=models.CharField(default=u'fa-sign-in', help_text=u'The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50, blank=True), ), ] diff --git a/common/djangoapps/third_party_auth/migrations/0003_samlproviderconfig_debug_mode.py b/common/djangoapps/third_party_auth/migrations/0003_samlproviderconfig_debug_mode.py index 1716aa5285..883987e9a5 100644 --- a/common/djangoapps/third_party_auth/migrations/0003_samlproviderconfig_debug_mode.py +++ b/common/djangoapps/third_party_auth/migrations/0003_samlproviderconfig_debug_mode.py @@ -14,6 +14,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='samlproviderconfig', name='debug_mode', - field=models.BooleanField(default=False, help_text=b'In debug mode, all SAML XML requests and responses will be logged. This is helpful for testing/setup but should always be disabled before users start using this provider.', verbose_name=b'Debug Mode'), + field=models.BooleanField(default=False, help_text=u'In debug mode, all SAML XML requests and responses will be logged. This is helpful for testing/setup but should always be disabled before users start using this provider.', verbose_name=u'Debug Mode'), ), ] diff --git a/common/djangoapps/third_party_auth/migrations/0004_add_visible_field.py b/common/djangoapps/third_party_auth/migrations/0004_add_visible_field.py index 5fff768bae..0372bb2d9f 100644 --- a/common/djangoapps/third_party_auth/migrations/0004_add_visible_field.py +++ b/common/djangoapps/third_party_auth/migrations/0004_add_visible_field.py @@ -17,7 +17,7 @@ class Migration(migrations.Migration): model_name='LTIProviderConfig', name='visible', field=models.BooleanField( - help_text=b'If this option is not selected, users will not be presented with the provider as an option to authenticate with on the login screen, but manual authentication using the correct link is still possible.', + help_text=u'If this option is not selected, users will not be presented with the provider as an option to authenticate with on the login screen, but manual authentication using the correct link is still possible.', default=True ), preserve_default=False @@ -26,7 +26,7 @@ class Migration(migrations.Migration): model_name='LTIProviderConfig', name='visible', field=models.BooleanField( - help_text=b'If this option is not selected, users will not be presented with the provider as an option to authenticate with on the login screen, but manual authentication using the correct link is still possible.', + help_text=u'If this option is not selected, users will not be presented with the provider as an option to authenticate with on the login screen, but manual authentication using the correct link is still possible.', default=False ) ), @@ -34,7 +34,7 @@ class Migration(migrations.Migration): model_name='OAuth2ProviderConfig', name='visible', field=models.BooleanField( - help_text=b'If this option is not selected, users will not be presented with the provider as an option to authenticate with on the login screen, but manual authentication using the correct link is still possible.', + help_text=u'If this option is not selected, users will not be presented with the provider as an option to authenticate with on the login screen, but manual authentication using the correct link is still possible.', default=True ), preserve_default=False @@ -43,7 +43,7 @@ class Migration(migrations.Migration): model_name='OAuth2ProviderConfig', name='visible', field=models.BooleanField( - help_text=b'If this option is not selected, users will not be presented with the provider as an option to authenticate with on the login screen, but manual authentication using the correct link is still possible.', + help_text=u'If this option is not selected, users will not be presented with the provider as an option to authenticate with on the login screen, but manual authentication using the correct link is still possible.', default=False ) ), @@ -51,7 +51,7 @@ class Migration(migrations.Migration): model_name='SAMLProviderConfig', name='visible', field=models.BooleanField( - help_text=b'If this option is not selected, users will not be presented with the provider as an option to authenticate with on the login screen, but manual authentication using the correct link is still possible.', + help_text=u'If this option is not selected, users will not be presented with the provider as an option to authenticate with on the login screen, but manual authentication using the correct link is still possible.', default=True ), preserve_default=False @@ -60,7 +60,7 @@ class Migration(migrations.Migration): model_name='SAMLProviderConfig', name='visible', field=models.BooleanField( - help_text=b'If this option is not selected, users will not be presented with the provider as an option to authenticate with on the login screen, but manual authentication using the correct link is still possible.', + help_text=u'If this option is not selected, users will not be presented with the provider as an option to authenticate with on the login screen, but manual authentication using the correct link is still possible.', default=False ) ), diff --git a/common/djangoapps/third_party_auth/migrations/0005_add_site_field.py b/common/djangoapps/third_party_auth/migrations/0005_add_site_field.py index ee7ad5f63c..60b36b05b0 100644 --- a/common/djangoapps/third_party_auth/migrations/0005_add_site_field.py +++ b/common/djangoapps/third_party_auth/migrations/0005_add_site_field.py @@ -28,7 +28,7 @@ class Migration(migrations.Migration): name='provider_slug', field=models.SlugField( default='temp', - help_text=b'A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"', + help_text=u'A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"', max_length=30 ), preserve_default=False, diff --git a/common/djangoapps/third_party_auth/migrations/0006_samlproviderconfig_automatic_refresh_enabled.py b/common/djangoapps/third_party_auth/migrations/0006_samlproviderconfig_automatic_refresh_enabled.py index 027723d34c..cec7ee64e5 100644 --- a/common/djangoapps/third_party_auth/migrations/0006_samlproviderconfig_automatic_refresh_enabled.py +++ b/common/djangoapps/third_party_auth/migrations/0006_samlproviderconfig_automatic_refresh_enabled.py @@ -14,6 +14,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='samlproviderconfig', name='automatic_refresh_enabled', - field=models.BooleanField(default=True, help_text=b"When checked, the SAML provider's metadata will be included in the automatic refresh job, if configured.", verbose_name=b'Enable automatic metadata refresh'), + field=models.BooleanField(default=True, help_text=u"When checked, the SAML provider's metadata will be included in the automatic refresh job, if configured.", verbose_name=u'Enable automatic metadata refresh'), ), ] diff --git a/common/djangoapps/third_party_auth/migrations/0007_auto_20170406_0912.py b/common/djangoapps/third_party_auth/migrations/0007_auto_20170406_0912.py index 4ffbb53b8b..f8e934db0f 100644 --- a/common/djangoapps/third_party_auth/migrations/0007_auto_20170406_0912.py +++ b/common/djangoapps/third_party_auth/migrations/0007_auto_20170406_0912.py @@ -14,11 +14,11 @@ class Migration(migrations.Migration): migrations.AddField( model_name='samlproviderconfig', name='identity_provider_type', - field=models.CharField(default=b'standard_saml_provider', help_text=b'Some SAML providers require special behavior. For example, SAP SuccessFactors SAML providers require an additional API call to retrieve user metadata not provided in the SAML response. Select the provider type which best matches your use case. If in doubt, choose the Standard SAML Provider type.', max_length=128, verbose_name=b'Identity Provider Type', choices=[(b'standard_saml_provider', b'Standard SAML provider'), (b'sap_success_factors', b'SAP SuccessFactors provider')]), + field=models.CharField(default=u'standard_saml_provider', help_text=u'Some SAML providers require special behavior. For example, SAP SuccessFactors SAML providers require an additional API call to retrieve user metadata not provided in the SAML response. Select the provider type which best matches your use case. If in doubt, choose the Standard SAML Provider type.', max_length=128, verbose_name=u'Identity Provider Type', choices=[(u'standard_saml_provider', u'Standard SAML provider'), (u'sap_success_factors', u'SAP SuccessFactors provider')]), ), migrations.AlterField( model_name='samlproviderconfig', name='other_settings', - field=models.TextField(help_text=b'For advanced use cases, enter a JSON object with addtional configuration. The tpa-saml backend supports only {"requiredEntitlements": ["urn:..."]} which can be used to require the presence of a specific eduPersonEntitlement. Custom provider types, as selected in the "Identity Provider Type" field, may make use of the information stored in this field for configuration.', verbose_name=b'Advanced settings', blank=True), + field=models.TextField(help_text=u'For advanced use cases, enter a JSON object with addtional configuration. The tpa-saml backend supports only {"requiredEntitlements": ["urn:..."]} which can be used to require the presence of a specific eduPersonEntitlement. Custom provider types, as selected in the "Identity Provider Type" field, may make use of the information stored in this field for configuration.', verbose_name=u'Advanced settings', blank=True), ), ] diff --git a/common/djangoapps/third_party_auth/migrations/0009_auto_20170415_1144.py b/common/djangoapps/third_party_auth/migrations/0009_auto_20170415_1144.py index 7b06f2dfd7..acc8776fa3 100644 --- a/common/djangoapps/third_party_auth/migrations/0009_auto_20170415_1144.py +++ b/common/djangoapps/third_party_auth/migrations/0009_auto_20170415_1144.py @@ -14,16 +14,16 @@ class Migration(migrations.Migration): migrations.AddField( model_name='ltiproviderconfig', name='max_session_length', - field=models.PositiveIntegerField(default=None, help_text='If this option is set, then users logging in using this SSO provider will have their session length limited to no longer than this value. If set to 0 (zero), the session will expire upon the user closing their browser. If left blank, the Django platform session default length will be used.', null=True, verbose_name=b'Max session length (seconds)', blank=True), + field=models.PositiveIntegerField(default=None, help_text='If this option is set, then users logging in using this SSO provider will have their session length limited to no longer than this value. If set to 0 (zero), the session will expire upon the user closing their browser. If left blank, the Django platform session default length will be used.', null=True, verbose_name=u'Max session length (seconds)', blank=True), ), migrations.AddField( model_name='oauth2providerconfig', name='max_session_length', - field=models.PositiveIntegerField(default=None, help_text='If this option is set, then users logging in using this SSO provider will have their session length limited to no longer than this value. If set to 0 (zero), the session will expire upon the user closing their browser. If left blank, the Django platform session default length will be used.', null=True, verbose_name=b'Max session length (seconds)', blank=True), + field=models.PositiveIntegerField(default=None, help_text='If this option is set, then users logging in using this SSO provider will have their session length limited to no longer than this value. If set to 0 (zero), the session will expire upon the user closing their browser. If left blank, the Django platform session default length will be used.', null=True, verbose_name=u'Max session length (seconds)', blank=True), ), migrations.AddField( model_name='samlproviderconfig', name='max_session_length', - field=models.PositiveIntegerField(default=None, help_text='If this option is set, then users logging in using this SSO provider will have their session length limited to no longer than this value. If set to 0 (zero), the session will expire upon the user closing their browser. If left blank, the Django platform session default length will be used.', null=True, verbose_name=b'Max session length (seconds)', blank=True), + field=models.PositiveIntegerField(default=None, help_text='If this option is set, then users logging in using this SSO provider will have their session length limited to no longer than this value. If set to 0 (zero), the session will expire upon the user closing their browser. If left blank, the Django platform session default length will be used.', null=True, verbose_name=u'Max session length (seconds)', blank=True), ), ] diff --git a/common/djangoapps/third_party_auth/migrations/0011_auto_20170616_0112.py b/common/djangoapps/third_party_auth/migrations/0011_auto_20170616_0112.py index 5e948c324d..b2c809035a 100644 --- a/common/djangoapps/third_party_auth/migrations/0011_auto_20170616_0112.py +++ b/common/djangoapps/third_party_auth/migrations/0011_auto_20170616_0112.py @@ -14,6 +14,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='samlproviderconfig', name='other_settings', - field=models.TextField(help_text=b'For advanced use cases, enter a JSON object with addtional configuration. The tpa-saml backend supports {"requiredEntitlements": ["urn:..."]}, which can be used to require the presence of a specific eduPersonEntitlement, and {"extra_field_definitions": [{"name": "...", "urn": "..."},...]}, which can be used to define registration form fields and the URNs that can be used to retrieve the relevant values from the SAML response. Custom provider types, as selected in the "Identity Provider Type" field, may make use of the information stored in this field for additional configuration.', verbose_name=b'Advanced settings', blank=True), + field=models.TextField(help_text=u'For advanced use cases, enter a JSON object with addtional configuration. The tpa-saml backend supports {"requiredEntitlements": ["urn:..."]}, which can be used to require the presence of a specific eduPersonEntitlement, and {"extra_field_definitions": [{"name": "...", "urn": "..."},...]}, which can be used to define registration form fields and the URNs that can be used to retrieve the relevant values from the SAML response. Custom provider types, as selected in the "Identity Provider Type" field, may make use of the information stored in this field for additional configuration.', verbose_name=u'Advanced settings', blank=True), ), ] diff --git a/common/djangoapps/third_party_auth/migrations/0016_auto_20180130_0938.py b/common/djangoapps/third_party_auth/migrations/0016_auto_20180130_0938.py index 01a7e0bbde..6251a6f0b8 100644 --- a/common/djangoapps/third_party_auth/migrations/0016_auto_20180130_0938.py +++ b/common/djangoapps/third_party_auth/migrations/0016_auto_20180130_0938.py @@ -15,7 +15,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='samlconfiguration', name='slug', - field=models.SlugField(default=b'default', help_text=b'A short string uniquely identifying this configuration. Cannot contain spaces. Examples: "ubc", "mit-staging"', max_length=30), + field=models.SlugField(default=u'default', help_text=u'A short string uniquely identifying this configuration. Cannot contain spaces. Examples: "ubc", "mit-staging"', max_length=30), ), migrations.AddField( model_name='samlproviderconfig', diff --git a/common/djangoapps/third_party_auth/migrations/0019_consolidate_slug.py b/common/djangoapps/third_party_auth/migrations/0019_consolidate_slug.py index 658854dec8..65ccb41860 100644 --- a/common/djangoapps/third_party_auth/migrations/0019_consolidate_slug.py +++ b/common/djangoapps/third_party_auth/migrations/0019_consolidate_slug.py @@ -39,17 +39,17 @@ class Migration(migrations.Migration): migrations.AddField( model_name='ltiproviderconfig', name='slug', - field=models.SlugField(default=b'default', help_text=b'A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"', max_length=30), + field=models.SlugField(default=u'default', help_text=u'A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"', max_length=30), ), migrations.AddField( model_name='oauth2providerconfig', name='slug', - field=models.SlugField(default=b'default', help_text=b'A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"', max_length=30), + field=models.SlugField(default=u'default', help_text=u'A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"', max_length=30), ), migrations.AddField( model_name='samlproviderconfig', name='slug', - field=models.SlugField(default=b'default', help_text=b'A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"', max_length=30), + field=models.SlugField(default=u'default', help_text=u'A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"', max_length=30), ), migrations.RunPython(fill_slug_field, reverse_code=migrations.RunPython.noop), ] diff --git a/common/djangoapps/third_party_auth/migrations/0021_sso_id_verification.py b/common/djangoapps/third_party_auth/migrations/0021_sso_id_verification.py index 0e7c825ba0..f067ca8e8b 100644 --- a/common/djangoapps/third_party_auth/migrations/0021_sso_id_verification.py +++ b/common/djangoapps/third_party_auth/migrations/0021_sso_id_verification.py @@ -15,16 +15,16 @@ class Migration(migrations.Migration): migrations.AddField( model_name='ltiproviderconfig', name='enable_sso_id_verification', - field=models.BooleanField(default=False, help_text=b'Use the presence of a profile from a trusted third party as proof of identity verification.'), + field=models.BooleanField(default=False, help_text=u'Use the presence of a profile from a trusted third party as proof of identity verification.'), ), migrations.AddField( model_name='oauth2providerconfig', name='enable_sso_id_verification', - field=models.BooleanField(default=False, help_text=b'Use the presence of a profile from a trusted third party as proof of identity verification.'), + field=models.BooleanField(default=False, help_text=u'Use the presence of a profile from a trusted third party as proof of identity verification.'), ), migrations.AddField( model_name='samlproviderconfig', name='enable_sso_id_verification', - field=models.BooleanField(default=False, help_text=b'Use the presence of a profile from a trusted third party as proof of identity verification.'), + field=models.BooleanField(default=False, help_text=u'Use the presence of a profile from a trusted third party as proof of identity verification.'), ), ] diff --git a/common/djangoapps/third_party_auth/migrations/0022_auto_20181012_0307.py b/common/djangoapps/third_party_auth/migrations/0022_auto_20181012_0307.py index e95f34e483..3b3b143ce9 100644 --- a/common/djangoapps/third_party_auth/migrations/0022_auto_20181012_0307.py +++ b/common/djangoapps/third_party_auth/migrations/0022_auto_20181012_0307.py @@ -15,26 +15,26 @@ class Migration(migrations.Migration): migrations.AddField( model_name='samlproviderconfig', name='default_email', - field=models.CharField(blank=True, help_text=b'Default value for email to be used if not present in SAML response.', max_length=255, verbose_name=b'Default Value for Email'), + field=models.CharField(blank=True, help_text=u'Default value for email to be used if not present in SAML response.', max_length=255, verbose_name=u'Default Value for Email'), ), migrations.AddField( model_name='samlproviderconfig', name='default_first_name', - field=models.CharField(blank=True, help_text=b'Default value for first name to be used if not present in SAML response.', max_length=255, verbose_name=b'Default Value for First Name'), + field=models.CharField(blank=True, help_text=u'Default value for first name to be used if not present in SAML response.', max_length=255, verbose_name=u'Default Value for First Name'), ), migrations.AddField( model_name='samlproviderconfig', name='default_full_name', - field=models.CharField(blank=True, help_text=b'Default value for full name to be used if not present in SAML response.', max_length=255, verbose_name=b'Default Value for Full Name'), + field=models.CharField(blank=True, help_text=u'Default value for full name to be used if not present in SAML response.', max_length=255, verbose_name=u'Default Value for Full Name'), ), migrations.AddField( model_name='samlproviderconfig', name='default_last_name', - field=models.CharField(blank=True, help_text=b'Default value for last name to be used if not present in SAML response.', max_length=255, verbose_name=b'Default Value for Last Name'), + field=models.CharField(blank=True, help_text=u'Default value for last name to be used if not present in SAML response.', max_length=255, verbose_name=u'Default Value for Last Name'), ), migrations.AddField( model_name='samlproviderconfig', name='default_username', - field=models.CharField(blank=True, help_text=b'Default value for username to be used if not present in SAML response.', max_length=255, verbose_name=b'Default Value for Username'), + field=models.CharField(blank=True, help_text=u'Default value for username to be used if not present in SAML response.', max_length=255, verbose_name=u'Default Value for Username'), ), ] diff --git a/common/djangoapps/third_party_auth/models.py b/common/djangoapps/third_party_auth/models.py index a860f8df9f..fecd47629d 100644 --- a/common/djangoapps/third_party_auth/models.py +++ b/common/djangoapps/third_party_auth/models.py @@ -95,9 +95,9 @@ class ProviderConfig(ConfigurationModel): icon_class = models.CharField( max_length=50, blank=True, - default='fa-sign-in', + default=u'fa-sign-in', help_text=( - 'The Font Awesome (or custom) icon class to use on the login button for this provider. ' + u'The Font Awesome (or custom) icon class to use on the login button for this provider. ' 'Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university' ), ) @@ -108,15 +108,15 @@ class ProviderConfig(ConfigurationModel): icon_image = models.FileField( blank=True, help_text=( - 'If there is no Font Awesome icon available for this provider, upload a custom image. ' + u'If there is no Font Awesome icon available for this provider, upload a custom image. ' 'SVG images are recommended as they can scale to any size.' ), ) - name = models.CharField(max_length=50, blank=False, help_text="Name of this provider (shown to users)") + name = models.CharField(max_length=50, blank=False, help_text=u"Name of this provider (shown to users)") slug = models.SlugField( - max_length=30, db_index=True, default='default', + max_length=30, db_index=True, default=u'default', help_text=( - 'A short string uniquely identifying this provider. ' + u'A short string uniquely identifying this provider. ' 'Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"' )) secondary = models.BooleanField( @@ -186,7 +186,7 @@ class ProviderConfig(ConfigurationModel): null=True, blank=True, default=None, - verbose_name='Max session length (seconds)', + verbose_name=u'Max session length (seconds)', help_text=_( "If this option is set, then users logging in using this SSO provider will have " "their session length limited to no longer than this value. If set to 0 (zero), " @@ -211,7 +211,7 @@ class ProviderConfig(ConfigurationModel): ) enable_sso_id_verification = models.BooleanField( default=False, - help_text="Use the presence of a profile from a trusted third party as proof of identity verification.", + help_text=u"Use the presence of a profile from a trusted third party as proof of identity verification.", ) prefix = None # used for provider_id. Set to a string value in subclass backend_name = None # Set to a field or fixed value in subclass @@ -354,28 +354,28 @@ class OAuth2ProviderConfig(ProviderConfig): backend_name = models.CharField( max_length=50, blank=False, db_index=True, help_text=( - "Which python-social-auth OAuth2 provider backend to use. " + u"Which python-social-auth OAuth2 provider backend to use. " "The list of backend choices is determined by the THIRD_PARTY_AUTH_BACKENDS setting." # To be precise, it's set by AUTHENTICATION_BACKENDS # which production.py sets from THIRD_PARTY_AUTH_BACKENDS ) ) - key = models.TextField(blank=True, verbose_name="Client ID") + key = models.TextField(blank=True, verbose_name=u"Client ID") secret = models.TextField( blank=True, - verbose_name="Client Secret", + verbose_name=u"Client Secret", help_text=( - 'For increased security, you can avoid storing this in your database by leaving ' + u'For increased security, you can avoid storing this in your database by leaving ' ' this field blank and setting ' 'SOCIAL_AUTH_OAUTH_SECRETS = {"(backend name)": "secret", ...} ' # pylint: disable=unicode-format-string 'in your instance\'s Django settings (or lms.auth.json)' ) ) - other_settings = models.TextField(blank=True, help_text="Optional JSON object with advanced settings, if any.") + other_settings = models.TextField(blank=True, help_text=u"Optional JSON object with advanced settings, if any.") class Meta(object): app_label = "third_party_auth" - verbose_name = "Provider Configuration (OAuth)" + verbose_name = u"Provider Configuration (OAuth)" verbose_name_plural = verbose_name def clean(self): @@ -419,15 +419,15 @@ class SAMLConfiguration(ConfigurationModel): ) slug = models.SlugField( max_length=30, - default='default', + default=u'default', help_text=( - 'A short string uniquely identifying this configuration. ' + u'A short string uniquely identifying this configuration. ' 'Cannot contain spaces. Examples: "ubc", "mit-staging"' ), ) private_key = models.TextField( help_text=( - 'To generate a key pair as two files, run ' + u'To generate a key pair as two files, run ' '"openssl req -new -x509 -days 3652 -nodes -out saml.crt -keyout saml.key". ' 'Paste the contents of saml.key here. ' 'For increased security, you can avoid storing this in your database by leaving ' @@ -438,30 +438,30 @@ class SAMLConfiguration(ConfigurationModel): ) public_key = models.TextField( help_text=( - 'Public key certificate. ' + u'Public key certificate. ' 'For increased security, you can avoid storing this in your database by leaving ' 'this field blank and setting it via the SOCIAL_AUTH_SAML_SP_PUBLIC_CERT setting ' 'in your instance\'s Django settings (or lms.auth.json).' ), blank=True, ) - entity_id = models.CharField(max_length=255, default="http://saml.example.com", verbose_name="Entity ID") + entity_id = models.CharField(max_length=255, default="http://saml.example.com", verbose_name=u"Entity ID") org_info_str = models.TextField( - verbose_name="Organization Info", - default='{"en-US": {"url": "http://www.example.com", "displayname": "Example Inc.", "name": "example"}}', - help_text="JSON dictionary of 'url', 'displayname', and 'name' for each language", + verbose_name=u"Organization Info", + default=u'{"en-US": {"url": "http://www.example.com", "displayname": "Example Inc.", "name": "example"}}', + help_text=u"JSON dictionary of 'url', 'displayname', and 'name' for each language", ) other_config_str = models.TextField( - default='{\n"SECURITY_CONFIG": {"metadataCacheDuration": 604800, "signMetadata": false}\n}', + default=u'{\n"SECURITY_CONFIG": {"metadataCacheDuration": 604800, "signMetadata": false}\n}', help_text=( - "JSON object defining advanced settings that are passed on to python-saml. " + u"JSON object defining advanced settings that are passed on to python-saml. " "Valid keys that can be set here include: SECURITY_CONFIG and SP_EXTRA" ), ) class Meta(object): app_label = "third_party_auth" - verbose_name = "SAML Configuration" + verbose_name = u"SAML Configuration" verbose_name_plural = verbose_name def __str__(self): @@ -553,73 +553,76 @@ class SAMLProviderConfig(ProviderConfig): """ prefix = 'saml' backend_name = models.CharField( - max_length=50, default='tpa-saml', blank=False, - help_text="Which python-social-auth provider backend to use. 'tpa-saml' is the standard edX SAML backend.") + max_length=50, default=u'tpa-saml', blank=False, + help_text=u"Which python-social-auth provider backend to use. 'tpa-saml' is the standard edX SAML backend.") entity_id = models.CharField( - max_length=255, verbose_name="Entity ID", help_text="Example: https://idp.testshib.org/idp/shibboleth") + max_length=255, verbose_name=u"Entity ID", help_text=u"Example: https://idp.testshib.org/idp/shibboleth") metadata_source = models.CharField( max_length=255, help_text=( - "URL to this provider's XML metadata. Should be an HTTPS URL. " + u"URL to this provider's XML metadata. Should be an HTTPS URL. " "Example: https://www.testshib.org/metadata/testshib-providers.xml" )) attr_user_permanent_id = models.CharField( - max_length=128, blank=True, verbose_name="User ID Attribute", - help_text="URN of the SAML attribute that we can use as a unique, persistent user ID. Leave blank for default.") + max_length=128, blank=True, verbose_name=u"User ID Attribute", + help_text=( + u"URN of the SAML attribute that we can use as a unique, " + "persistent user ID. Leave blank for default." + )) attr_full_name = models.CharField( - max_length=128, blank=True, verbose_name="Full Name Attribute", - help_text="URN of SAML attribute containing the user's full name. Leave blank for default.") + max_length=128, blank=True, verbose_name=u"Full Name Attribute", + help_text=u"URN of SAML attribute containing the user's full name. Leave blank for default.") default_full_name = models.CharField( - max_length=255, blank=True, verbose_name="Default Value for Full Name", - help_text="Default value for full name to be used if not present in SAML response.") + max_length=255, blank=True, verbose_name=u"Default Value for Full Name", + help_text=u"Default value for full name to be used if not present in SAML response.") attr_first_name = models.CharField( - max_length=128, blank=True, verbose_name="First Name Attribute", - help_text="URN of SAML attribute containing the user's first name. Leave blank for default.") + max_length=128, blank=True, verbose_name=u"First Name Attribute", + help_text=u"URN of SAML attribute containing the user's first name. Leave blank for default.") default_first_name = models.CharField( - max_length=255, blank=True, verbose_name="Default Value for First Name", - help_text="Default value for first name to be used if not present in SAML response.") + max_length=255, blank=True, verbose_name=u"Default Value for First Name", + help_text=u"Default value for first name to be used if not present in SAML response.") attr_last_name = models.CharField( - max_length=128, blank=True, verbose_name="Last Name Attribute", - help_text="URN of SAML attribute containing the user's last name. Leave blank for default.") + max_length=128, blank=True, verbose_name=u"Last Name Attribute", + help_text=u"URN of SAML attribute containing the user's last name. Leave blank for default.") default_last_name = models.CharField( - max_length=255, blank=True, verbose_name="Default Value for Last Name", - help_text="Default value for last name to be used if not present in SAML response.") + max_length=255, blank=True, verbose_name=u"Default Value for Last Name", + help_text=u"Default value for last name to be used if not present in SAML response.") attr_username = models.CharField( - max_length=128, blank=True, verbose_name="Username Hint Attribute", - help_text="URN of SAML attribute to use as a suggested username for this user. Leave blank for default.") + max_length=128, blank=True, verbose_name=u"Username Hint Attribute", + help_text=u"URN of SAML attribute to use as a suggested username for this user. Leave blank for default.") default_username = models.CharField( - max_length=255, blank=True, verbose_name="Default Value for Username", - help_text="Default value for username to be used if not present in SAML response.") + max_length=255, blank=True, verbose_name=u"Default Value for Username", + help_text=u"Default value for username to be used if not present in SAML response.") attr_email = models.CharField( - max_length=128, blank=True, verbose_name="Email Attribute", - help_text="URN of SAML attribute containing the user's email address[es]. Leave blank for default.") + max_length=128, blank=True, verbose_name=u"Email Attribute", + help_text=u"URN of SAML attribute containing the user's email address[es]. Leave blank for default.") default_email = models.CharField( - max_length=255, blank=True, verbose_name="Default Value for Email", - help_text="Default value for email to be used if not present in SAML response.") + max_length=255, blank=True, verbose_name=u"Default Value for Email", + help_text=u"Default value for email to be used if not present in SAML response.") automatic_refresh_enabled = models.BooleanField( - default=True, verbose_name="Enable automatic metadata refresh", - help_text="When checked, the SAML provider's metadata will be included " + default=True, verbose_name=u"Enable automatic metadata refresh", + help_text=u"When checked, the SAML provider's metadata will be included " "in the automatic refresh job, if configured." ) identity_provider_type = models.CharField( - max_length=128, blank=False, verbose_name="Identity Provider Type", default=STANDARD_SAML_PROVIDER_KEY, + max_length=128, blank=False, verbose_name=u"Identity Provider Type", default=STANDARD_SAML_PROVIDER_KEY, choices=get_saml_idp_choices(), help_text=( - "Some SAML providers require special behavior. For example, SAP SuccessFactors SAML providers require an " + u"Some SAML providers require special behavior. For example, SAP SuccessFactors SAML providers require an " "additional API call to retrieve user metadata not provided in the SAML response. Select the provider type " "which best matches your use case. If in doubt, choose the Standard SAML Provider type." ) ) debug_mode = models.BooleanField( - default=False, verbose_name="Debug Mode", + default=False, verbose_name=u"Debug Mode", help_text=( - "In debug mode, all SAML XML requests and responses will be logged. " + u"In debug mode, all SAML XML requests and responses will be logged. " "This is helpful for testing/setup but should always be disabled before users start using this provider." ), ) other_settings = models.TextField( - verbose_name="Advanced settings", blank=True, + verbose_name=u"Advanced settings", blank=True, help_text=( - 'For advanced use cases, enter a JSON object with addtional configuration. ' + u'For advanced use cases, enter a JSON object with addtional configuration. ' 'The tpa-saml backend supports {"requiredEntitlements": ["urn:..."]}, ' # pylint: disable=unicode-format-string 'which can be used to require the presence of a specific eduPersonEntitlement, ' 'and {"extra_field_definitions": [{"name": "...", "urn": "..."},...]}, which can be ' # pylint: disable=unicode-format-string @@ -644,7 +647,7 @@ class SAMLProviderConfig(ProviderConfig): class Meta(object): app_label = "third_party_auth" - verbose_name = "Provider Configuration (SAML IdP)" + verbose_name = u"Provider Configuration (SAML IdP)" verbose_name_plural = "Provider Configuration (SAML IdPs)" def get_url_params(self): @@ -739,12 +742,12 @@ class SAMLProviderData(models.Model): expires_at = models.DateTimeField(db_index=True, null=True) entity_id = models.CharField(max_length=255, db_index=True) # This is the key for lookups in this table - sso_url = models.URLField(verbose_name="SSO URL") + sso_url = models.URLField(verbose_name=u"SSO URL") public_key = models.TextField() class Meta(object): app_label = "third_party_auth" - verbose_name = "SAML Provider Data" + verbose_name = u"SAML Provider Data" verbose_name_plural = verbose_name ordering = ('-fetched_at', ) @@ -802,15 +805,15 @@ class LTIProviderConfig(ProviderConfig): lti_consumer_key = models.CharField( max_length=255, help_text=( - 'The name that the LTI Tool Consumer will use to identify itself' + u'The name that the LTI Tool Consumer will use to identify itself' ) ) lti_hostname = models.CharField( - default='localhost', + default=u'localhost', max_length=255, help_text=( - 'The domain that will be acting as the LTI consumer.' + u'The domain that will be acting as the LTI consumer.' ), db_index=True ) @@ -819,7 +822,7 @@ class LTIProviderConfig(ProviderConfig): default=long_token, max_length=255, help_text=( - 'The shared secret that the LTI Tool Consumer will use to ' + u'The shared secret that the LTI Tool Consumer will use to ' 'authenticate requests. Only this edX instance and this ' 'tool consumer instance should know this value. ' 'For increased security, you can avoid storing this in ' @@ -833,7 +836,7 @@ class LTIProviderConfig(ProviderConfig): lti_max_timestamp_age = models.IntegerField( default=10, help_text=( - 'The maximum age of oauth_timestamp values, in seconds.' + u'The maximum age of oauth_timestamp values, in seconds.' ) ) @@ -866,7 +869,7 @@ class LTIProviderConfig(ProviderConfig): class Meta(object): app_label = "third_party_auth" - verbose_name = "Provider Configuration (LTI)" + verbose_name = u"Provider Configuration (LTI)" verbose_name_plural = verbose_name @@ -882,11 +885,11 @@ class ProviderApiPermissions(models.Model): provider_id = models.CharField( max_length=255, help_text=( - 'Uniquely identify a provider. This is different from backend_name.' + u'Uniquely identify a provider. This is different from backend_name.' ) ) class Meta(object): app_label = "third_party_auth" - verbose_name = "Provider API Permission" + verbose_name = u"Provider API Permission" verbose_name_plural = verbose_name + 's' diff --git a/common/djangoapps/third_party_auth/saml.py b/common/djangoapps/third_party_auth/saml.py index 0061a6dea3..ff03f27bf5 100644 --- a/common/djangoapps/third_party_auth/saml.py +++ b/common/djangoapps/third_party_auth/saml.py @@ -19,8 +19,8 @@ from social_core.exceptions import AuthForbidden from openedx.core.djangoapps.theming.helpers import get_current_request from third_party_auth.exceptions import IncorrectConfigurationException -STANDARD_SAML_PROVIDER_KEY = 'standard_saml_provider' -SAP_SUCCESSFACTORS_SAML_KEY = 'sap_success_factors' +STANDARD_SAML_PROVIDER_KEY = u'standard_saml_provider' +SAP_SUCCESSFACTORS_SAML_KEY = u'sap_success_factors' log = logging.getLogger(__name__) diff --git a/common/test/acceptance/pages/xblock/acid.py b/common/test/acceptance/pages/xblock/acid.py index 0ca60260cb..b1fc01970e 100644 --- a/common/test/acceptance/pages/xblock/acid.py +++ b/common/test/acceptance/pages/xblock/acid.py @@ -4,7 +4,6 @@ PageObjects related to the AcidBlock from __future__ import absolute_import -import six from bok_choy.page_object import PageObject from bok_choy.promise import BrokenPromise, EmptyPromise diff --git a/lms/djangoapps/commerce/migrations/0002_commerceconfiguration.py b/lms/djangoapps/commerce/migrations/0002_commerceconfiguration.py index a76b86b03e..e1f12fea28 100644 --- a/lms/djangoapps/commerce/migrations/0002_commerceconfiguration.py +++ b/lms/djangoapps/commerce/migrations/0002_commerceconfiguration.py @@ -21,7 +21,7 @@ class Migration(migrations.Migration): ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), ('checkout_on_ecommerce_service', models.BooleanField(default=False, help_text='Use the checkout page hosted by the E-Commerce service.')), - ('single_course_checkout_page', models.CharField(default=b'/basket/single-item/', help_text='Path to single course checkout page hosted by the E-Commerce service.', max_length=255)), + ('single_course_checkout_page', models.CharField(default=u'/basket/single-item/', help_text='Path to single course checkout page hosted by the E-Commerce service.', max_length=255)), ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), ], options={ diff --git a/lms/djangoapps/commerce/migrations/0004_auto_20160531_0950.py b/lms/djangoapps/commerce/migrations/0004_auto_20160531_0950.py index b444cc35c3..6667ccf316 100644 --- a/lms/djangoapps/commerce/migrations/0004_auto_20160531_0950.py +++ b/lms/djangoapps/commerce/migrations/0004_auto_20160531_0950.py @@ -19,6 +19,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='commerceconfiguration', name='receipt_page', - field=models.CharField(default=b'/commerce/checkout/receipt/?orderNum=', help_text='Path to order receipt page.', max_length=255), + field=models.CharField(default=u'/commerce/checkout/receipt/?orderNum=', help_text='Path to order receipt page.', max_length=255), ), ] diff --git a/lms/djangoapps/commerce/migrations/0006_auto_20170424_1734.py b/lms/djangoapps/commerce/migrations/0006_auto_20170424_1734.py index 81ef96186a..c40b4ce65d 100644 --- a/lms/djangoapps/commerce/migrations/0006_auto_20170424_1734.py +++ b/lms/djangoapps/commerce/migrations/0006_auto_20170424_1734.py @@ -14,6 +14,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='commerceconfiguration', name='receipt_page', - field=models.CharField(default=b'/checkout/receipt/?order_number=', help_text='Path to order receipt page.', max_length=255), + field=models.CharField(default=u'/checkout/receipt/?order_number=', help_text='Path to order receipt page.', max_length=255), ), ] diff --git a/lms/djangoapps/commerce/migrations/0007_auto_20180313_0609.py b/lms/djangoapps/commerce/migrations/0007_auto_20180313_0609.py index a45f675527..4c405eeeea 100644 --- a/lms/djangoapps/commerce/migrations/0007_auto_20180313_0609.py +++ b/lms/djangoapps/commerce/migrations/0007_auto_20180313_0609.py @@ -18,6 +18,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='commerceconfiguration', name='basket_checkout_page', - field=models.CharField(default=b'/basket/add/', help_text='Path to course(s) checkout page hosted by the E-Commerce service.', max_length=255), + field=models.CharField(default=u'/basket/add/', help_text='Path to course(s) checkout page hosted by the E-Commerce service.', max_length=255), ), ] diff --git a/lms/djangoapps/commerce/models.py b/lms/djangoapps/commerce/models.py index 8d8fb01944..f48c478400 100644 --- a/lms/djangoapps/commerce/models.py +++ b/lms/djangoapps/commerce/models.py @@ -32,7 +32,7 @@ class CommerceConfiguration(ConfigurationModel): basket_checkout_page = models.CharField( max_length=255, - default='/basket/add/', + default=u'/basket/add/', help_text=_('Path to course(s) checkout page hosted by the E-Commerce service.') ) cache_ttl = models.PositiveIntegerField( diff --git a/lms/djangoapps/verify_student/migrations/0001_initial.py b/lms/djangoapps/verify_student/migrations/0001_initial.py index 8fdd93b355..5f70dc6c64 100644 --- a/lms/djangoapps/verify_student/migrations/0001_initial.py +++ b/lms/djangoapps/verify_student/migrations/0001_initial.py @@ -75,7 +75,7 @@ class Migration(migrations.Migration): name='SoftwareSecurePhotoVerification', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('status', model_utils.fields.StatusField(default=b'created', max_length=100, verbose_name='status', no_check_for_status=True, choices=[(b'created', b'created'), (b'ready', b'ready'), (b'submitted', b'submitted'), (b'must_retry', b'must_retry'), (b'approved', b'approved'), (b'denied', b'denied')])), + ('status', model_utils.fields.StatusField(default=u'created', max_length=100, verbose_name='status', no_check_for_status=True, choices=[(u'created', u'created'), (u'ready', u'ready'), (u'submitted', u'submitted'), (u'must_retry', u'must_retry'), (u'approved', u'approved'), (u'denied', u'denied')])), ('status_changed', model_utils.fields.MonitorField(default=django.utils.timezone.now, verbose_name='status changed', monitor='status')), ('name', models.CharField(max_length=255, blank=True)), ('face_image_url', models.URLField(max_length=255, blank=True)), @@ -124,7 +124,7 @@ class Migration(migrations.Migration): name='VerificationStatus', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('status', models.CharField(db_index=True, max_length=32, choices=[(b'submitted', b'submitted'), (b'approved', b'approved'), (b'denied', b'denied'), (b'error', b'error')])), + ('status', models.CharField(db_index=True, max_length=32, choices=[(u'submitted', u'submitted'), (u'approved', u'approved'), (u'denied', u'denied'), (u'error', u'error')])), ('timestamp', models.DateTimeField(auto_now_add=True)), ('response', models.TextField(null=True, blank=True)), ('error', models.TextField(null=True, blank=True)), diff --git a/lms/djangoapps/verify_student/migrations/0006_ssoverification.py b/lms/djangoapps/verify_student/migrations/0006_ssoverification.py index 25814b6c9f..3782313d3e 100644 --- a/lms/djangoapps/verify_student/migrations/0006_ssoverification.py +++ b/lms/djangoapps/verify_student/migrations/0006_ssoverification.py @@ -21,13 +21,13 @@ class Migration(migrations.Migration): name='SSOVerification', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('status', model_utils.fields.StatusField(choices=[(b'created', b'created'), (b'ready', b'ready'), (b'submitted', b'submitted'), (b'must_retry', b'must_retry'), (b'approved', b'approved'), (b'denied', b'denied')], default=b'created', max_length=100, no_check_for_status=True, verbose_name='status')), + ('status', model_utils.fields.StatusField(choices=[(u'created', u'created'), (u'ready', u'ready'), (u'submitted', u'submitted'), (u'must_retry', u'must_retry'), (u'approved', u'approved'), (u'denied', u'denied')], default=u'created', max_length=100, no_check_for_status=True, verbose_name='status')), ('status_changed', model_utils.fields.MonitorField(default=django.utils.timezone.now, monitor='status', verbose_name='status changed')), ('name', models.CharField(blank=True, max_length=255)), ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)), ('updated_at', models.DateTimeField(auto_now=True, db_index=True)), - ('identity_provider_type', models.CharField(choices=[(b'third_party_auth.models.OAuth2ProviderConfig', b'OAuth2 Provider'), (b'third_party_auth.models.SAMLProviderConfig', b'SAML Provider'), (b'third_party_auth.models.LTIProviderConfig', b'LTI Provider')], default=b'third_party_auth.models.SAMLProviderConfig', help_text=b'Specifies which type of Identity Provider this verification originated from.', max_length=100)), - ('identity_provider_slug', models.SlugField(default=b'default', help_text=b'The slug uniquely identifying the Identity Provider this verification originated from.', max_length=30)), + ('identity_provider_type', models.CharField(choices=[(u'third_party_auth.models.OAuth2ProviderConfig', u'OAuth2 Provider'), (u'third_party_auth.models.SAMLProviderConfig', u'SAML Provider'), (u'third_party_auth.models.LTIProviderConfig', u'LTI Provider')], default=u'third_party_auth.models.SAMLProviderConfig', help_text=u'Specifies which type of Identity Provider this verification originated from.', max_length=100)), + ('identity_provider_slug', models.SlugField(default=u'default', help_text=u'The slug uniquely identifying the Identity Provider this verification originated from.', max_length=30)), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), diff --git a/lms/djangoapps/verify_student/migrations/0007_idverificationaggregate.py b/lms/djangoapps/verify_student/migrations/0007_idverificationaggregate.py index 812092ad0c..aa702ca9a2 100644 --- a/lms/djangoapps/verify_student/migrations/0007_idverificationaggregate.py +++ b/lms/djangoapps/verify_student/migrations/0007_idverificationaggregate.py @@ -22,7 +22,7 @@ class Migration(migrations.Migration): name='IDVerificationAggregate', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('status', model_utils.fields.StatusField(choices=[(b'created', b'created'), (b'ready', b'ready'), (b'submitted', b'submitted'), (b'must_retry', b'must_retry'), (b'approved', b'approved'), (b'denied', b'denied')], default=b'created', max_length=100, no_check_for_status=True, verbose_name='status')), + ('status', model_utils.fields.StatusField(choices=[(u'created', u'created'), (u'ready', u'ready'), (u'submitted', u'submitted'), (u'must_retry', u'must_retry'), (u'approved', u'approved'), (u'denied', u'denied')], default=u'created', max_length=100, no_check_for_status=True, verbose_name='status')), ('status_changed', model_utils.fields.MonitorField(default=django.utils.timezone.now, monitor='status', verbose_name='status changed')), ('name', models.CharField(blank=True, max_length=255)), ('object_id', models.PositiveIntegerField()), diff --git a/lms/djangoapps/verify_student/migrations/0010_manualverification.py b/lms/djangoapps/verify_student/migrations/0010_manualverification.py index 27ed9d48ab..874e1c5f29 100644 --- a/lms/djangoapps/verify_student/migrations/0010_manualverification.py +++ b/lms/djangoapps/verify_student/migrations/0010_manualverification.py @@ -21,12 +21,12 @@ class Migration(migrations.Migration): name='ManualVerification', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('status', model_utils.fields.StatusField(choices=[(b'created', b'created'), (b'ready', b'ready'), (b'submitted', b'submitted'), (b'must_retry', b'must_retry'), (b'approved', b'approved'), (b'denied', b'denied')], default=b'created', max_length=100, no_check_for_status=True, verbose_name='status')), + ('status', model_utils.fields.StatusField(choices=[(u'created', u'created'), (u'ready', u'ready'), (u'submitted', u'submitted'), (u'must_retry', u'must_retry'), (u'approved', u'approved'), (u'denied', u'denied')], default=u'created', max_length=100, no_check_for_status=True, verbose_name='status')), ('status_changed', model_utils.fields.MonitorField(default=django.utils.timezone.now, monitor='status', verbose_name='status changed')), ('name', models.CharField(blank=True, max_length=255)), ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)), ('updated_at', models.DateTimeField(auto_now=True, db_index=True)), - ('reason', models.CharField(blank=True, help_text=b'Specifies the reason for manual verification of the user.', max_length=255)), + ('reason', models.CharField(blank=True, help_text=u'Specifies the reason for manual verification of the user.', max_length=255)), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), diff --git a/lms/djangoapps/verify_student/models.py b/lms/djangoapps/verify_student/models.py index ebda000ff5..3f6e3b8ca0 100644 --- a/lms/djangoapps/verify_student/models.py +++ b/lms/djangoapps/verify_student/models.py @@ -101,7 +101,7 @@ class IDVerificationAttempt(StatusModel): .. pii_types: name .. pii_retirement: retained """ - STATUS = Choices('created', 'ready', 'submitted', 'must_retry', 'approved', 'denied') + STATUS = Choices(u'created', u'ready', u'submitted', u'must_retry', u'approved', u'denied') user = models.ForeignKey(User, db_index=True, on_delete=models.CASCADE) # They can change their name later on, so we want to copy the value here so @@ -160,7 +160,7 @@ class ManualVerification(IDVerificationAttempt): max_length=255, blank=True, help_text=( - 'Specifies the reason for manual verification of the user.' + u'Specifies the reason for manual verification of the user.' ) ) @@ -190,13 +190,13 @@ class SSOVerification(IDVerificationAttempt): .. no_pii: """ - OAUTH2 = 'third_party_auth.models.OAuth2ProviderConfig' - SAML = 'third_party_auth.models.SAMLProviderConfig' - LTI = 'third_party_auth.models.LTIProviderConfig' + OAUTH2 = u'third_party_auth.models.OAuth2ProviderConfig' + SAML = u'third_party_auth.models.SAMLProviderConfig' + LTI = u'third_party_auth.models.LTIProviderConfig' IDENTITY_PROVIDER_TYPE_CHOICES = ( - (OAUTH2, 'OAuth2 Provider'), - (SAML, 'SAML Provider'), - (LTI, 'LTI Provider'), + (OAUTH2, u'OAuth2 Provider'), + (SAML, u'SAML Provider'), + (LTI, u'LTI Provider'), ) identity_provider_type = models.CharField( @@ -205,14 +205,14 @@ class SSOVerification(IDVerificationAttempt): choices=IDENTITY_PROVIDER_TYPE_CHOICES, default=SAML, help_text=( - 'Specifies which type of Identity Provider this verification originated from.' + u'Specifies which type of Identity Provider this verification originated from.' ) ) identity_provider_slug = models.SlugField( - max_length=30, db_index=True, default='default', + max_length=30, db_index=True, default=u'default', help_text=( - 'The slug uniquely identifying the Identity Provider this verification originated from.' + u'The slug uniquely identifying the Identity Provider this verification originated from.' )) class Meta(object): diff --git a/openedx/core/djangoapps/verified_track_content/migrations/0002_verifiedtrackcohortedcourse_verified_cohort_name.py b/openedx/core/djangoapps/verified_track_content/migrations/0002_verifiedtrackcohortedcourse_verified_cohort_name.py index ee5a6bf8f7..4d35148d7a 100644 --- a/openedx/core/djangoapps/verified_track_content/migrations/0002_verifiedtrackcohortedcourse_verified_cohort_name.py +++ b/openedx/core/djangoapps/verified_track_content/migrations/0002_verifiedtrackcohortedcourse_verified_cohort_name.py @@ -14,6 +14,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='verifiedtrackcohortedcourse', name='verified_cohort_name', - field=models.CharField(default=b'Verified Learners', max_length=100), + field=models.CharField(default=u'Verified Learners', max_length=100), ), ] diff --git a/openedx/core/djangoapps/verified_track_content/migrations/0003_migrateverifiedtrackcohortssetting.py b/openedx/core/djangoapps/verified_track_content/migrations/0003_migrateverifiedtrackcohortssetting.py index 4ca7a6fd62..d69b6d29ee 100644 --- a/openedx/core/djangoapps/verified_track_content/migrations/0003_migrateverifiedtrackcohortssetting.py +++ b/openedx/core/djangoapps/verified_track_content/migrations/0003_migrateverifiedtrackcohortssetting.py @@ -21,9 +21,9 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), - ('old_course_key', CourseKeyField(help_text=b'Course key for which to migrate verified track cohorts from', max_length=255)), - ('rerun_course_key', CourseKeyField(help_text=b'Course key for which to migrate verified track cohorts to enrollment tracks to', max_length=255)), - ('audit_cohort_names', models.TextField(help_text=b'Comma-separated list of audit cohort names')), + ('old_course_key', CourseKeyField(help_text=u'Course key for which to migrate verified track cohorts from', max_length=255)), + ('rerun_course_key', CourseKeyField(help_text=u'Course key for which to migrate verified track cohorts to enrollment tracks to', max_length=255)), + ('audit_cohort_names', models.TextField(help_text=u'Comma-separated list of audit cohort names')), ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), ], ), diff --git a/openedx/core/djangoapps/verified_track_content/models.py b/openedx/core/djangoapps/verified_track_content/models.py index 3a80b70485..4472e5162c 100644 --- a/openedx/core/djangoapps/verified_track_content/models.py +++ b/openedx/core/djangoapps/verified_track_content/models.py @@ -28,7 +28,7 @@ from student.models import CourseEnrollment log = logging.getLogger(__name__) -DEFAULT_VERIFIED_COHORT_NAME = "Verified Learners" +DEFAULT_VERIFIED_COHORT_NAME = u"Verified Learners" @receiver(post_save, sender=CourseEnrollment) @@ -170,15 +170,15 @@ class MigrateVerifiedTrackCohortsSetting(ConfigurationModel): old_course_key = CourseKeyField( max_length=255, blank=False, - help_text="Course key for which to migrate verified track cohorts from" + help_text=u"Course key for which to migrate verified track cohorts from" ) rerun_course_key = CourseKeyField( max_length=255, blank=False, - help_text="Course key for which to migrate verified track cohorts to enrollment tracks to" + help_text=u"Course key for which to migrate verified track cohorts to enrollment tracks to" ) audit_cohort_names = models.TextField( - help_text="Comma-separated list of audit cohort names" + help_text=u"Comma-separated list of audit cohort names" ) @classmethod diff --git a/openedx/core/djangoapps/video_config/migrations/0003_transcriptmigrationsetting.py b/openedx/core/djangoapps/video_config/migrations/0003_transcriptmigrationsetting.py index 491ae3e0c1..a47200a165 100644 --- a/openedx/core/djangoapps/video_config/migrations/0003_transcriptmigrationsetting.py +++ b/openedx/core/djangoapps/video_config/migrations/0003_transcriptmigrationsetting.py @@ -20,10 +20,10 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), - ('force_update', models.BooleanField(default=False, help_text=b'Flag to force migrate transcripts for the requested courses, overwrite if already present.')), - ('commit', models.BooleanField(default=False, help_text=b'Dry-run or commit.')), - ('all_courses', models.BooleanField(default=False, help_text=b'Process all courses.')), - ('course_ids', models.TextField(help_text=b'Whitespace-separated list of course keys for which to migrate transcripts.')), + ('force_update', models.BooleanField(default=False, help_text=u'Flag to force migrate transcripts for the requested courses, overwrite if already present.')), + ('commit', models.BooleanField(default=False, help_text=u'Dry-run or commit.')), + ('all_courses', models.BooleanField(default=False, help_text=u'Process all courses.')), + ('course_ids', models.TextField(help_text=u'Whitespace-separated list of course keys for which to migrate transcripts.')), ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), ], options={ diff --git a/openedx/core/djangoapps/video_config/migrations/0006_videothumbnailetting_updatedcoursevideos.py b/openedx/core/djangoapps/video_config/migrations/0006_videothumbnailetting_updatedcoursevideos.py index 20213e41b2..cf29bbf9d8 100644 --- a/openedx/core/djangoapps/video_config/migrations/0006_videothumbnailetting_updatedcoursevideos.py +++ b/openedx/core/djangoapps/video_config/migrations/0006_videothumbnailetting_updatedcoursevideos.py @@ -38,9 +38,9 @@ class Migration(migrations.Migration): ('command_run', models.PositiveIntegerField(default=0)), ('batch_size', models.PositiveIntegerField(default=0)), ('videos_per_task', models.PositiveIntegerField(default=0)), - ('commit', models.BooleanField(default=False, help_text=b'Dry-run or commit.')), - ('all_course_videos', models.BooleanField(default=False, help_text=b'Process all videos.')), - ('course_ids', models.TextField(blank=True, help_text=b'Whitespace-separated list of course ids for which to update videos.')), + ('commit', models.BooleanField(default=False, help_text=u'Dry-run or commit.')), + ('all_course_videos', models.BooleanField(default=False, help_text=u'Process all videos.')), + ('course_ids', models.TextField(blank=True, help_text=u'Whitespace-separated list of course ids for which to update videos.')), ('changed_by', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='Changed by')), ], options={ diff --git a/openedx/core/djangoapps/video_config/models.py b/openedx/core/djangoapps/video_config/models.py index 6837b10141..f77aad6e8d 100644 --- a/openedx/core/djangoapps/video_config/models.py +++ b/openedx/core/djangoapps/video_config/models.py @@ -206,21 +206,21 @@ class TranscriptMigrationSetting(ConfigurationModel): ) force_update = BooleanField( default=False, - help_text="Flag to force migrate transcripts for the requested courses, overwrite if already present." + help_text=u"Flag to force migrate transcripts for the requested courses, overwrite if already present." ) command_run = PositiveIntegerField(default=0) batch_size = PositiveIntegerField(default=0) commit = BooleanField( default=False, - help_text="Dry-run or commit." + help_text=u"Dry-run or commit." ) all_courses = BooleanField( default=False, - help_text="Process all courses." + help_text=u"Process all courses." ) course_ids = TextField( blank=False, - help_text="Whitespace-separated list of course keys for which to migrate transcripts." + help_text=u"Whitespace-separated list of course keys for which to migrate transcripts." ) def increment_run(self): @@ -261,15 +261,15 @@ class VideoThumbnailSetting(ConfigurationModel): videos_per_task = PositiveIntegerField(default=0) commit = BooleanField( default=False, - help_text="Dry-run or commit." + help_text=u"Dry-run or commit." ) all_course_videos = BooleanField( default=False, - help_text="Process all videos." + help_text=u"Process all videos." ) course_ids = TextField( blank=True, - help_text="Whitespace-separated list of course ids for which to update videos." + help_text=u"Whitespace-separated list of course ids for which to update videos." ) def increment_run(self):