From a40f1d9bd69cea894ee41818fbb6d350ed03f5cd Mon Sep 17 00:00:00 2001 From: Manjinder Singh <49171515+jinder1s@users.noreply.github.com> Date: Wed, 23 Oct 2019 13:04:36 -0400 Subject: [PATCH] BOM-933: Fix type mismatches in various migrations 2 (#22115) * Fix type mismatches in track migrations * Fix type mismatches in oauth_dispatch * Fix type mismatches in badges migrations * fix type mismatch in contentserver migrations * Fix type mismatches in mobile_api migrations * fix type mismatch in crawlers migrations * fix type mismatch in dark_lang migrations * fix type mismatch in branding migrations --- common/djangoapps/track/backends/django.py | 4 ++-- common/djangoapps/track/migrations/0001_initial.py | 4 ++-- lms/djangoapps/badges/migrations/0001_initial.py | 8 ++++---- .../0003_schema__add_event_configuration.py | 6 +++--- lms/djangoapps/badges/models.py | 14 +++++++------- lms/djangoapps/branding/migrations/0001_initial.py | 2 +- lms/djangoapps/branding/models.py | 2 +- .../mobile_api/migrations/0001_initial.py | 2 +- .../migrations/0002_auto_20160406_0904.py | 6 +++--- lms/djangoapps/mobile_api/mobile_platform.py | 4 ++-- lms/djangoapps/mobile_api/models.py | 6 +++--- .../contentserver/migrations/0001_initial.py | 2 +- .../migrations/0002_cdnuseragentsconfig.py | 2 +- openedx/core/djangoapps/contentserver/models.py | 6 +++--- .../djangoapps/crawlers/migrations/0001_initial.py | 2 +- openedx/core/djangoapps/crawlers/models.py | 4 ++-- .../dark_lang/migrations/0001_initial.py | 2 +- .../migrations/0003_auto_20180425_0359.py | 4 ++-- openedx/core/djangoapps/dark_lang/models.py | 6 +++--- ...pedapplication_scopedapplicationorganization.py | 2 +- .../migrations/0004_auto_20180626_1349.py | 2 +- openedx/core/djangoapps/oauth_dispatch/models.py | 2 +- 22 files changed, 46 insertions(+), 46 deletions(-) diff --git a/common/djangoapps/track/backends/django.py b/common/djangoapps/track/backends/django.py index d093004bb5..83acfdfb50 100644 --- a/common/djangoapps/track/backends/django.py +++ b/common/djangoapps/track/backends/django.py @@ -42,7 +42,7 @@ class TrackingLog(models.Model): .. pii_retirement: retained """ - dtcreated = models.DateTimeField('creation date', auto_now_add=True) + dtcreated = models.DateTimeField(u'creation date', auto_now_add=True) username = models.CharField(max_length=32, blank=True) ip = models.CharField(max_length=32, blank=True) event_source = models.CharField(max_length=32) @@ -50,7 +50,7 @@ class TrackingLog(models.Model): event = models.TextField(blank=True) agent = models.CharField(max_length=256, blank=True) page = models.CharField(max_length=512, blank=True, null=True) - time = models.DateTimeField('event time') + time = models.DateTimeField(u'event time') host = models.CharField(max_length=64, blank=True) class Meta(object): diff --git a/common/djangoapps/track/migrations/0001_initial.py b/common/djangoapps/track/migrations/0001_initial.py index 84df8b6787..82563b9336 100644 --- a/common/djangoapps/track/migrations/0001_initial.py +++ b/common/djangoapps/track/migrations/0001_initial.py @@ -14,7 +14,7 @@ class Migration(migrations.Migration): name='TrackingLog', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('dtcreated', models.DateTimeField(auto_now_add=True, verbose_name=b'creation date')), + ('dtcreated', models.DateTimeField(auto_now_add=True, verbose_name=u'creation date')), ('username', models.CharField(max_length=32, blank=True)), ('ip', models.CharField(max_length=32, blank=True)), ('event_source', models.CharField(max_length=32)), @@ -22,7 +22,7 @@ class Migration(migrations.Migration): ('event', models.TextField(blank=True)), ('agent', models.CharField(max_length=256, blank=True)), ('page', models.CharField(max_length=512, null=True, blank=True)), - ('time', models.DateTimeField(verbose_name=b'event time')), + ('time', models.DateTimeField(verbose_name=u'event time')), ('host', models.CharField(max_length=64, blank=True)), ], options={ diff --git a/lms/djangoapps/badges/migrations/0001_initial.py b/lms/djangoapps/badges/migrations/0001_initial.py index 994488b796..b508b1f74e 100644 --- a/lms/djangoapps/badges/migrations/0001_initial.py +++ b/lms/djangoapps/badges/migrations/0001_initial.py @@ -35,13 +35,13 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('slug', models.SlugField(max_length=255, validators=[badges.models.validate_lowercase])), - ('issuing_component', models.SlugField(default=b'', blank=True, validators=[badges.models.validate_lowercase])), + ('issuing_component', models.SlugField(default=u'', blank=True, validators=[badges.models.validate_lowercase])), ('display_name', models.CharField(max_length=255)), ('course_id', CourseKeyField(default=None, max_length=255, blank=True)), ('description', models.TextField()), ('criteria', models.TextField()), - ('mode', models.CharField(default=b'', max_length=100, blank=True)), - ('image', models.ImageField(upload_to=b'badge_classes', validators=[badges.models.validate_badge_image])), + ('mode', models.CharField(default=u'', max_length=100, blank=True)), + ('image', models.ImageField(upload_to=u'badge_classes', validators=[badges.models.validate_badge_image])), ], ), migrations.CreateModel( @@ -49,7 +49,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('mode', models.CharField(help_text='The course mode for this badge image. For example, "verified" or "honor".', unique=True, max_length=125)), - ('icon', models.ImageField(help_text='Badge images must be square PNG files. The file size should be under 250KB.', upload_to=b'course_complete_badges', validators=[badges.models.validate_badge_image])), + ('icon', models.ImageField(help_text='Badge images must be square PNG files. The file size should be under 250KB.', upload_to=u'course_complete_badges', validators=[badges.models.validate_badge_image])), ('default', models.BooleanField(default=False, help_text='Set this value to True if you want this image to be the default image for any course modes that do not have a specified badge image. You can have only one default image.')), ], ), diff --git a/lms/djangoapps/badges/migrations/0003_schema__add_event_configuration.py b/lms/djangoapps/badges/migrations/0003_schema__add_event_configuration.py index b40a0aa40c..6f8d045f39 100644 --- a/lms/djangoapps/badges/migrations/0003_schema__add_event_configuration.py +++ b/lms/djangoapps/badges/migrations/0003_schema__add_event_configuration.py @@ -20,9 +20,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')), - ('courses_completed', models.TextField(default=b'', help_text="On each line, put the number of completed courses to award a badge for, a comma, and the slug of a badge class you have created that has the issuing component 'openedx__course'. For example: 3,enrolled_3_courses", blank=True)), - ('courses_enrolled', models.TextField(default=b'', help_text="On each line, put the number of enrolled courses to award a badge for, a comma, and the slug of a badge class you have created that has the issuing component 'openedx__course'. For example: 3,enrolled_3_courses", blank=True)), - ('course_groups', models.TextField(default=b'', help_text="Each line is a comma-separated list. The first item in each line is the slug of a badge class you have created that has an issuing component of 'openedx__course'. The remaining items in each line are the course keys the learner needs to complete to be awarded the badge. For example: slug_for_compsci_courses_group_badge,course-v1:CompSci+Course+First,course-v1:CompsSci+Course+Second", blank=True)), + ('courses_completed', models.TextField(default=u'', help_text="On each line, put the number of completed courses to award a badge for, a comma, and the slug of a badge class you have created that has the issuing component 'openedx__course'. For example: 3,enrolled_3_courses", blank=True)), + ('courses_enrolled', models.TextField(default=u'', help_text="On each line, put the number of enrolled courses to award a badge for, a comma, and the slug of a badge class you have created that has the issuing component 'openedx__course'. For example: 3,enrolled_3_courses", blank=True)), + ('course_groups', models.TextField(default=u'', help_text="Each line is a comma-separated list. The first item in each line is the slug of a badge class you have created that has an issuing component of 'openedx__course'. The remaining items in each line are the course keys the learner needs to complete to be awarded the badge. For example: slug_for_compsci_courses_group_badge,course-v1:CompSci+Course+First,course-v1:CompsSci+Course+Second", 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')), ], ), diff --git a/lms/djangoapps/badges/models.py b/lms/djangoapps/badges/models.py index da7cf2e067..9d076846e5 100644 --- a/lms/djangoapps/badges/models.py +++ b/lms/djangoapps/badges/models.py @@ -57,14 +57,14 @@ class BadgeClass(models.Model): .. no_pii: """ slug = models.SlugField(max_length=255, validators=[validate_lowercase]) - issuing_component = models.SlugField(max_length=50, default='', blank=True, validators=[validate_lowercase]) + issuing_component = models.SlugField(max_length=50, default=u'', blank=True, validators=[validate_lowercase]) display_name = models.CharField(max_length=255) course_id = CourseKeyField(max_length=255, blank=True, default=None) description = models.TextField() criteria = models.TextField() # Mode a badge was awarded for. Included for legacy/migration purposes. - mode = models.CharField(max_length=100, default='', blank=True) - image = models.ImageField(upload_to='badge_classes', validators=[validate_badge_image]) + mode = models.CharField(max_length=100, default=u'', blank=True) + image = models.ImageField(upload_to=u'badge_classes', validators=[validate_badge_image]) def __str__(self): return HTML(u"").format( @@ -200,7 +200,7 @@ class CourseCompleteImageConfiguration(models.Model): help_text=_( u"Badge images must be square PNG files. The file size should be under 250KB." ), - upload_to='course_complete_badges', + upload_to=u'course_complete_badges', validators=[validate_badge_image] ) default = models.BooleanField( @@ -248,7 +248,7 @@ class CourseEventBadgesConfiguration(ConfigurationModel): .. no_pii: """ courses_completed = models.TextField( - blank=True, default='', + blank=True, default=u'', help_text=_( u"On each line, put the number of completed courses to award a badge for, a comma, and the slug of a " u"badge class you have created that has the issuing component 'openedx__course'. " @@ -256,7 +256,7 @@ class CourseEventBadgesConfiguration(ConfigurationModel): ) ) courses_enrolled = models.TextField( - blank=True, default='', + blank=True, default=u'', help_text=_( u"On each line, put the number of enrolled courses to award a badge for, a comma, and the slug of a " u"badge class you have created that has the issuing component 'openedx__course'. " @@ -264,7 +264,7 @@ class CourseEventBadgesConfiguration(ConfigurationModel): ) ) course_groups = models.TextField( - blank=True, default='', + blank=True, default=u'', help_text=_( u"Each line is a comma-separated list. The first item in each line is the slug of a badge class you " u"have created that has an issuing component of 'openedx__course'. The remaining items in each line are " diff --git a/lms/djangoapps/branding/migrations/0001_initial.py b/lms/djangoapps/branding/migrations/0001_initial.py index 3ec2ec5684..0b5f90f7d4 100644 --- a/lms/djangoapps/branding/migrations/0001_initial.py +++ b/lms/djangoapps/branding/migrations/0001_initial.py @@ -33,7 +33,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')), - ('configuration', models.TextField(help_text=b'JSON data of Configuration for Video Branding.')), + ('configuration', models.TextField(help_text=u'JSON data of Configuration for Video Branding.')), ('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/branding/models.py b/lms/djangoapps/branding/models.py index 5bb1a70743..c2b187132b 100644 --- a/lms/djangoapps/branding/models.py +++ b/lms/djangoapps/branding/models.py @@ -33,7 +33,7 @@ class BrandingInfoConfig(ConfigurationModel): app_label = "branding" configuration = TextField( - help_text="JSON data of Configuration for Video Branding." + help_text=u"JSON data of Configuration for Video Branding." ) def clean(self): diff --git a/lms/djangoapps/mobile_api/migrations/0001_initial.py b/lms/djangoapps/mobile_api/migrations/0001_initial.py index c70676df66..c90b1f8108 100644 --- a/lms/djangoapps/mobile_api/migrations/0001_initial.py +++ b/lms/djangoapps/mobile_api/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')), - ('video_profiles', models.TextField(help_text=b'A comma-separated list of names of profiles to include for videos returned from the mobile API.', blank=True)), + ('video_profiles', models.TextField(help_text=u'A comma-separated list of names of profiles to include for videos returned from the mobile API.', 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/lms/djangoapps/mobile_api/migrations/0002_auto_20160406_0904.py b/lms/djangoapps/mobile_api/migrations/0002_auto_20160406_0904.py index 20103c8a16..98fb7fe912 100644 --- a/lms/djangoapps/mobile_api/migrations/0002_auto_20160406_0904.py +++ b/lms/djangoapps/mobile_api/migrations/0002_auto_20160406_0904.py @@ -15,12 +15,12 @@ class Migration(migrations.Migration): name='AppVersionConfig', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('platform', models.CharField(max_length=50, choices=[(b'Android', b'Android'), (b'iOS', b'iOS')])), - ('version', models.CharField(help_text=b'Version should be in the format X.X.X.Y where X is a number and Y is alphanumeric', max_length=50)), + ('platform', models.CharField(max_length=50, choices=[(u'Android', u'Android'), (u'iOS', u'iOS')])), + ('version', models.CharField(help_text=u'Version should be in the format X.X.X.Y where X is a number and Y is alphanumeric', max_length=50)), ('major_version', models.IntegerField()), ('minor_version', models.IntegerField()), ('patch_version', models.IntegerField()), - ('expire_at', models.DateTimeField(null=True, verbose_name=b'Expiry date for platform version', blank=True)), + ('expire_at', models.DateTimeField(null=True, verbose_name=u'Expiry date for platform version', blank=True)), ('enabled', models.BooleanField(default=True)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), diff --git a/lms/djangoapps/mobile_api/mobile_platform.py b/lms/djangoapps/mobile_api/mobile_platform.py index 727d80c382..e05648a1e4 100644 --- a/lms/djangoapps/mobile_api/mobile_platform.py +++ b/lms/djangoapps/mobile_api/mobile_platform.py @@ -58,14 +58,14 @@ class IOS(MobilePlatform): """ iOS platform """ USER_AGENT_REGEX = (r'\((?P[0-9]+.[0-9]+.[0-9]+(\.[0-9a-zA-Z]*)?); OS Version [0-9.]+ ' r'\(Build [0-9a-zA-Z]*\)\)') - NAME = "iOS" + NAME = u"iOS" class Android(MobilePlatform): """ Android platform """ USER_AGENT_REGEX = (r'Dalvik/[.0-9]+ \(Linux; U; Android [.0-9]+; (.*) Build/[0-9a-zA-Z]*\) ' r'(.*)/(?P[0-9]+.[0-9]+.[0-9]+(\.[0-9a-zA-Z]*)?)') - NAME = "Android" + NAME = u"Android" # a list of all supported mobile platforms diff --git a/lms/djangoapps/mobile_api/models.py b/lms/djangoapps/mobile_api/models.py index 9ab57d36a0..10a0bd579a 100644 --- a/lms/djangoapps/mobile_api/models.py +++ b/lms/djangoapps/mobile_api/models.py @@ -22,7 +22,7 @@ class MobileApiConfig(ConfigurationModel): """ video_profiles = models.TextField( blank=True, - help_text="A comma-separated list of names of profiles to include for videos returned from the mobile API." + help_text=u"A comma-separated list of names of profiles to include for videos returned from the mobile API." ) class Meta(object): @@ -51,12 +51,12 @@ class AppVersionConfig(models.Model): version = models.CharField( max_length=50, blank=False, - help_text="Version should be in the format X.X.X.Y where X is a number and Y is alphanumeric" + help_text=u"Version should be in the format X.X.X.Y where X is a number and Y is alphanumeric" ) major_version = models.IntegerField() minor_version = models.IntegerField() patch_version = models.IntegerField() - expire_at = models.DateTimeField(null=True, blank=True, verbose_name="Expiry date for platform version") + expire_at = models.DateTimeField(null=True, blank=True, verbose_name=u"Expiry date for platform version") enabled = models.BooleanField(default=True) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) diff --git a/openedx/core/djangoapps/contentserver/migrations/0001_initial.py b/openedx/core/djangoapps/contentserver/migrations/0001_initial.py index 8e946537eb..05f60887a1 100644 --- a/openedx/core/djangoapps/contentserver/migrations/0001_initial.py +++ b/openedx/core/djangoapps/contentserver/migrations/0001_initial.py @@ -20,7 +20,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')), - ('cache_ttl', models.PositiveIntegerField(default=0, help_text=b'The time, in seconds, to report that a course asset is allowed to be cached for.')), + ('cache_ttl', models.PositiveIntegerField(default=0, help_text=u'The time, in seconds, to report that a course asset is allowed to be cached for.')), ('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/contentserver/migrations/0002_cdnuseragentsconfig.py b/openedx/core/djangoapps/contentserver/migrations/0002_cdnuseragentsconfig.py index 4598cbed3f..2498400e6c 100644 --- a/openedx/core/djangoapps/contentserver/migrations/0002_cdnuseragentsconfig.py +++ b/openedx/core/djangoapps/contentserver/migrations/0002_cdnuseragentsconfig.py @@ -20,7 +20,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')), - ('cdn_user_agents', models.TextField(default=b'Amazon CloudFront', help_text=b'A newline-separated list of user agents that should be considered CDNs.')), + ('cdn_user_agents', models.TextField(default=u'Amazon CloudFront', help_text=u'A newline-separated list of user agents that should be considered CDNs.')), ('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/contentserver/models.py b/openedx/core/djangoapps/contentserver/models.py index f7d30e2116..d7d7cfd37b 100644 --- a/openedx/core/djangoapps/contentserver/models.py +++ b/openedx/core/djangoapps/contentserver/models.py @@ -24,7 +24,7 @@ class CourseAssetCacheTtlConfig(ConfigurationModel): cache_ttl = PositiveIntegerField( default=0, - help_text="The time, in seconds, to report that a course asset is allowed to be cached for." + help_text=u"The time, in seconds, to report that a course asset is allowed to be cached for." ) @classmethod @@ -51,8 +51,8 @@ class CdnUserAgentsConfig(ConfigurationModel): app_label = 'contentserver' cdn_user_agents = TextField( - default='Amazon CloudFront', - help_text="A newline-separated list of user agents that should be considered CDNs." + default=u'Amazon CloudFront', + help_text=u"A newline-separated list of user agents that should be considered CDNs." ) @classmethod diff --git a/openedx/core/djangoapps/crawlers/migrations/0001_initial.py b/openedx/core/djangoapps/crawlers/migrations/0001_initial.py index 84e068ef49..35f48222c7 100644 --- a/openedx/core/djangoapps/crawlers/migrations/0001_initial.py +++ b/openedx/core/djangoapps/crawlers/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')), - ('known_user_agents', models.TextField(default=b'edX-downloader', help_text=b'A comma-separated list of known crawler user agents.', blank=True)), + ('known_user_agents', models.TextField(default=u'edX-downloader', help_text=u'A comma-separated list of known crawler user agents.', 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/openedx/core/djangoapps/crawlers/models.py b/openedx/core/djangoapps/crawlers/models.py index e3c35b673d..b56b6cd517 100644 --- a/openedx/core/djangoapps/crawlers/models.py +++ b/openedx/core/djangoapps/crawlers/models.py @@ -22,8 +22,8 @@ class CrawlersConfig(ConfigurationModel): known_user_agents = models.TextField( blank=True, - help_text="A comma-separated list of known crawler user agents.", - default='edX-downloader', + help_text=u"A comma-separated list of known crawler user agents.", + default=u'edX-downloader', ) def __str__(self): diff --git a/openedx/core/djangoapps/dark_lang/migrations/0001_initial.py b/openedx/core/djangoapps/dark_lang/migrations/0001_initial.py index 9df69d3186..871785df8f 100644 --- a/openedx/core/djangoapps/dark_lang/migrations/0001_initial.py +++ b/openedx/core/djangoapps/dark_lang/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')), - ('released_languages', models.TextField(help_text=b'A comma-separated list of language codes to release to the public.', blank=True)), + ('released_languages', models.TextField(help_text=u'A comma-separated list of language codes to release to the public.', 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/openedx/core/djangoapps/dark_lang/migrations/0003_auto_20180425_0359.py b/openedx/core/djangoapps/dark_lang/migrations/0003_auto_20180425_0359.py index 5a26d6513b..aed790b44e 100644 --- a/openedx/core/djangoapps/dark_lang/migrations/0003_auto_20180425_0359.py +++ b/openedx/core/djangoapps/dark_lang/migrations/0003_auto_20180425_0359.py @@ -15,11 +15,11 @@ class Migration(migrations.Migration): migrations.AddField( model_name='darklangconfig', name='beta_languages', - field=models.TextField(blank=True, help_text=b'A comma-separated list of language codes to release to the public as beta languages.'), + field=models.TextField(blank=True, help_text=u'A comma-separated list of language codes to release to the public as beta languages.'), ), migrations.AddField( model_name='darklangconfig', name='enable_beta_languages', - field=models.BooleanField(default=False, help_text=b'Enable partially supported languages to display in language drop down.'), + field=models.BooleanField(default=False, help_text=u'Enable partially supported languages to display in language drop down.'), ), ] diff --git a/openedx/core/djangoapps/dark_lang/models.py b/openedx/core/djangoapps/dark_lang/models.py index e67f03259d..22bbfbf54c 100644 --- a/openedx/core/djangoapps/dark_lang/models.py +++ b/openedx/core/djangoapps/dark_lang/models.py @@ -17,15 +17,15 @@ class DarkLangConfig(ConfigurationModel): """ released_languages = models.TextField( blank=True, - help_text="A comma-separated list of language codes to release to the public." + help_text=u"A comma-separated list of language codes to release to the public." ) enable_beta_languages = models.BooleanField( default=False, - help_text="Enable partially supported languages to display in language drop down." + help_text=u"Enable partially supported languages to display in language drop down." ) beta_languages = models.TextField( blank=True, - help_text="A comma-separated list of language codes to release to the public as beta languages." + help_text=u"A comma-separated list of language codes to release to the public as beta languages." ) def __str__(self): diff --git a/openedx/core/djangoapps/oauth_dispatch/migrations/0002_scopedapplication_scopedapplicationorganization.py b/openedx/core/djangoapps/oauth_dispatch/migrations/0002_scopedapplication_scopedapplicationorganization.py index 44958c9daf..ddf2f1340d 100644 --- a/openedx/core/djangoapps/oauth_dispatch/migrations/0002_scopedapplication_scopedapplicationorganization.py +++ b/openedx/core/djangoapps/oauth_dispatch/migrations/0002_scopedapplication_scopedapplicationorganization.py @@ -39,7 +39,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('short_name', models.CharField(help_text='The short_name of an existing Organization.', max_length=255)), - ('provider_type', models.CharField(choices=[(b'content_org', 'Content Provider')], default=b'content_org', max_length=32)), + ('provider_type', models.CharField(choices=[(u'content_org', 'Content Provider')], default=u'content_org', max_length=32)), ('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='organizations', to=settings.OAUTH2_PROVIDER_APPLICATION_MODEL)), ], ), diff --git a/openedx/core/djangoapps/oauth_dispatch/migrations/0004_auto_20180626_1349.py b/openedx/core/djangoapps/oauth_dispatch/migrations/0004_auto_20180626_1349.py index 8ec37e3708..6a4b4b61e8 100644 --- a/openedx/core/djangoapps/oauth_dispatch/migrations/0004_auto_20180626_1349.py +++ b/openedx/core/djangoapps/oauth_dispatch/migrations/0004_auto_20180626_1349.py @@ -29,7 +29,7 @@ class Migration(migrations.Migration): name='ApplicationOrganization', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('relation_type', models.CharField(choices=[(b'content_org', 'Content Provider')], default=b'content_org', max_length=32)), + ('relation_type', models.CharField(choices=[(u'content_org', 'Content Provider')], default=u'content_org', max_length=32)), ('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='organizations', to=settings.OAUTH2_PROVIDER_APPLICATION_MODEL)), ('organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organizations.Organization')), ], diff --git a/openedx/core/djangoapps/oauth_dispatch/models.py b/openedx/core/djangoapps/oauth_dispatch/models.py index fb383ee4cf..dd24bed7d6 100644 --- a/openedx/core/djangoapps/oauth_dispatch/models.py +++ b/openedx/core/djangoapps/oauth_dispatch/models.py @@ -104,7 +104,7 @@ class ApplicationOrganization(models.Model): .. no_pii: """ - RELATION_TYPE_CONTENT_ORG = 'content_org' + RELATION_TYPE_CONTENT_ORG = u'content_org' RELATION_TYPES = ( (RELATION_TYPE_CONTENT_ORG, _('Content Provider')), )