diff --git a/common/djangoapps/course_action_state/migrations/0001_initial.py b/common/djangoapps/course_action_state/migrations/0001_initial.py index ed18f83d47..4e589c9178 100644 --- a/common/djangoapps/course_action_state/migrations/0001_initial.py +++ b/common/djangoapps/course_action_state/migrations/0001_initial.py @@ -25,7 +25,7 @@ class Migration(migrations.Migration): ('should_display', models.BooleanField(default=False)), ('message', models.CharField(max_length=1000)), ('source_course_key', CourseKeyField(max_length=255, db_index=True)), - ('display_name', models.CharField(default=b'', max_length=255, blank=True)), + ('display_name', models.CharField(default=u'', max_length=255, blank=True)), ('created_user', models.ForeignKey(related_name='created_by_user+', on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True)), ('updated_user', models.ForeignKey(related_name='updated_by_user+', on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True)), ], diff --git a/common/djangoapps/course_action_state/models.py b/common/djangoapps/course_action_state/models.py index aca7c48626..f1ef19e710 100644 --- a/common/djangoapps/course_action_state/models.py +++ b/common/djangoapps/course_action_state/models.py @@ -117,7 +117,7 @@ class CourseRerunState(CourseActionUIState): source_course_key = CourseKeyField(max_length=255, db_index=True) # Display name for destination course - display_name = models.CharField(max_length=255, default="", blank=True) + display_name = models.CharField(max_length=255, default=u"", blank=True) # MANAGERS # Override the abstract class' manager with a Rerun-specific manager that inherits from the base class' manager. diff --git a/common/djangoapps/course_modes/migrations/0001_initial.py b/common/djangoapps/course_modes/migrations/0001_initial.py index 11692dcad0..1dcfad38cc 100644 --- a/common/djangoapps/course_modes/migrations/0001_initial.py +++ b/common/djangoapps/course_modes/migrations/0001_initial.py @@ -19,12 +19,12 @@ class Migration(migrations.Migration): ('mode_slug', models.CharField(max_length=100, verbose_name='Mode')), ('mode_display_name', models.CharField(max_length=255, verbose_name='Display Name')), ('min_price', models.IntegerField(default=0, verbose_name='Price')), - ('currency', models.CharField(default=b'usd', max_length=8)), + ('currency', models.CharField(default=u'usd', max_length=8)), ('expiration_datetime', models.DateTimeField(default=None, help_text='OPTIONAL: After this date/time, users will no longer be able to enroll in this mode. Leave this blank if users can enroll in this mode until enrollment closes for the course.', null=True, verbose_name='Upgrade Deadline', blank=True)), ('expiration_date', models.DateField(default=None, null=True, blank=True)), - ('suggested_prices', models.CommaSeparatedIntegerField(default=b'', max_length=255, blank=True)), + ('suggested_prices', models.CommaSeparatedIntegerField(default=u'', max_length=255, blank=True)), ('description', models.TextField(null=True, blank=True)), - ('sku', models.CharField(help_text='OPTIONAL: This is the SKU (stock keeping unit) of this mode in the external ecommerce service. Leave this blank if the course has not yet been migrated to the ecommerce service.', max_length=255, null=True, verbose_name=b'SKU', blank=True)), + ('sku', models.CharField(help_text='OPTIONAL: This is the SKU (stock keeping unit) of this mode in the external ecommerce service. Leave this blank if the course has not yet been migrated to the ecommerce service.', max_length=255, null=True, verbose_name=u'SKU', blank=True)), ], ), migrations.CreateModel( @@ -35,8 +35,8 @@ class Migration(migrations.Migration): ('mode_slug', models.CharField(max_length=100)), ('mode_display_name', models.CharField(max_length=255)), ('min_price', models.IntegerField(default=0)), - ('suggested_prices', models.CommaSeparatedIntegerField(default=b'', max_length=255, blank=True)), - ('currency', models.CharField(default=b'usd', max_length=8)), + ('suggested_prices', models.CommaSeparatedIntegerField(default=u'', max_length=255, blank=True)), + ('currency', models.CharField(default=u'usd', max_length=8)), ('expiration_date', models.DateField(default=None, null=True, blank=True)), ('expiration_datetime', models.DateTimeField(default=None, null=True, blank=True)), ], diff --git a/common/djangoapps/course_modes/migrations/0005_auto_20151217_0958.py b/common/djangoapps/course_modes/migrations/0005_auto_20151217_0958.py index 574575749b..b08347568f 100644 --- a/common/djangoapps/course_modes/migrations/0005_auto_20151217_0958.py +++ b/common/djangoapps/course_modes/migrations/0005_auto_20151217_0958.py @@ -21,7 +21,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='coursemode', name='_expiration_datetime', - field=models.DateTimeField(db_column=b'expiration_datetime', default=None, blank=True, help_text='OPTIONAL: After this date/time, users will no longer be able to enroll in this mode. Leave this blank if users can enroll in this mode until enrollment closes for the course.', null=True, verbose_name='Upgrade Deadline'), + field=models.DateTimeField(db_column=u'expiration_datetime', default=None, blank=True, help_text='OPTIONAL: After this date/time, users will no longer be able to enroll in this mode. Leave this blank if users can enroll in this mode until enrollment closes for the course.', null=True, verbose_name='Upgrade Deadline'), ), ] ) diff --git a/common/djangoapps/course_modes/migrations/0007_coursemode_bulk_sku.py b/common/djangoapps/course_modes/migrations/0007_coursemode_bulk_sku.py index 8a81d980cd..47123d7b0e 100644 --- a/common/djangoapps/course_modes/migrations/0007_coursemode_bulk_sku.py +++ b/common/djangoapps/course_modes/migrations/0007_coursemode_bulk_sku.py @@ -14,6 +14,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='coursemode', name='bulk_sku', - field=models.CharField(default=None, max_length=255, blank=True, help_text='This is the bulk SKU (stock keeping unit) of this mode in the external ecommerce service.', null=True, verbose_name=b'Bulk SKU'), + field=models.CharField(default=None, max_length=255, blank=True, help_text='This is the bulk SKU (stock keeping unit) of this mode in the external ecommerce service.', null=True, verbose_name=u'Bulk SKU'), ), ] diff --git a/common/djangoapps/course_modes/migrations/0009_suggested_prices_to_charfield.py b/common/djangoapps/course_modes/migrations/0009_suggested_prices_to_charfield.py index c6ba8b0b43..967f6d8d32 100644 --- a/common/djangoapps/course_modes/migrations/0009_suggested_prices_to_charfield.py +++ b/common/djangoapps/course_modes/migrations/0009_suggested_prices_to_charfield.py @@ -17,6 +17,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='coursemode', name='suggested_prices', - field=models.CharField(default=b'', max_length=255, blank=True, validators=[django.core.validators.RegexValidator(re.compile('^[\\d,]+\\Z'), 'Enter only digits separated by commas.', 'invalid')]), + field=models.CharField(default=u'', max_length=255, blank=True, validators=[django.core.validators.RegexValidator(re.compile('^[\\d,]+\\Z'), 'Enter only digits separated by commas.', 'invalid')]), ), ] diff --git a/common/djangoapps/course_modes/migrations/0010_archived_suggested_prices_to_charfield.py b/common/djangoapps/course_modes/migrations/0010_archived_suggested_prices_to_charfield.py index 56254117ed..ee15a7cb00 100644 --- a/common/djangoapps/course_modes/migrations/0010_archived_suggested_prices_to_charfield.py +++ b/common/djangoapps/course_modes/migrations/0010_archived_suggested_prices_to_charfield.py @@ -17,6 +17,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='coursemodesarchive', name='suggested_prices', - field=models.CharField(default=b'', max_length=255, blank=True, validators=[django.core.validators.RegexValidator(re.compile('^[\\d,]+\\Z'), 'Enter only digits separated by commas.', 'invalid')]), + field=models.CharField(default=u'', max_length=255, blank=True, validators=[django.core.validators.RegexValidator(re.compile('^[\\d,]+\\Z'), 'Enter only digits separated by commas.', 'invalid')]), ), ] diff --git a/common/djangoapps/course_modes/migrations/0011_change_regex_for_comma_separated_ints.py b/common/djangoapps/course_modes/migrations/0011_change_regex_for_comma_separated_ints.py index a69f54997d..0c36dbfacc 100644 --- a/common/djangoapps/course_modes/migrations/0011_change_regex_for_comma_separated_ints.py +++ b/common/djangoapps/course_modes/migrations/0011_change_regex_for_comma_separated_ints.py @@ -18,11 +18,11 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='coursemode', name='suggested_prices', - field=models.CharField(blank=True, default=b'', max_length=255, validators=[django.core.validators.RegexValidator(re.compile('^\d+(?:\,\d+)*\Z'), code='invalid', message='Enter only digits separated by commas.')]), + field=models.CharField(blank=True, default=u'', max_length=255, validators=[django.core.validators.RegexValidator(re.compile('^\d+(?:\,\d+)*\Z'), code='invalid', message='Enter only digits separated by commas.')]), ), migrations.AlterField( model_name='coursemodesarchive', name='suggested_prices', - field=models.CharField(blank=True, default=b'', max_length=255, validators=[django.core.validators.RegexValidator(re.compile('^\d+(?:\,\d+)*\Z'), code='invalid', message='Enter only digits separated by commas.')]), + field=models.CharField(blank=True, default=u'', max_length=255, validators=[django.core.validators.RegexValidator(re.compile('^\d+(?:\,\d+)*\Z'), code='invalid', message='Enter only digits separated by commas.')]), ), ] diff --git a/common/djangoapps/course_modes/migrations/0012_historicalcoursemode.py b/common/djangoapps/course_modes/migrations/0012_historicalcoursemode.py index d3d61a1ace..ab748c583b 100644 --- a/common/djangoapps/course_modes/migrations/0012_historicalcoursemode.py +++ b/common/djangoapps/course_modes/migrations/0012_historicalcoursemode.py @@ -26,14 +26,14 @@ class Migration(migrations.Migration): ('mode_slug', models.CharField(max_length=100, verbose_name='Mode')), ('mode_display_name', models.CharField(max_length=255, verbose_name='Display Name')), ('min_price', models.IntegerField(default=0, verbose_name='Price')), - ('currency', models.CharField(default='usd', max_length=8)), - ('_expiration_datetime', models.DateTimeField(blank=True, db_column='expiration_datetime', default=None, help_text='OPTIONAL: After this date/time, users will no longer be able to enroll in this mode. Leave this blank if users can enroll in this mode until enrollment closes for the course.', null=True, verbose_name='Upgrade Deadline')), + ('currency', models.CharField(default=u'usd', max_length=8)), + ('_expiration_datetime', models.DateTimeField(blank=True, db_column=u'expiration_datetime', default=None, help_text='OPTIONAL: After this date/time, users will no longer be able to enroll in this mode. Leave this blank if users can enroll in this mode until enrollment closes for the course.', null=True, verbose_name='Upgrade Deadline')), ('expiration_datetime_is_explicit', models.BooleanField(default=False)), ('expiration_date', models.DateField(blank=True, default=None, null=True)), - ('suggested_prices', models.CharField(blank=True, default='', max_length=255, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z'), code='invalid', message='Enter only digits separated by commas.')])), + ('suggested_prices', models.CharField(blank=True, default=u'', max_length=255, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z'), code='invalid', message='Enter only digits separated by commas.')])), ('description', models.TextField(blank=True, null=True)), - ('sku', models.CharField(blank=True, help_text='OPTIONAL: This is the SKU (stock keeping unit) of this mode in the external ecommerce service. Leave this blank if the course has not yet been migrated to the ecommerce service.', max_length=255, null=True, verbose_name='SKU')), - ('bulk_sku', models.CharField(blank=True, default=None, help_text='This is the bulk SKU (stock keeping unit) of this mode in the external ecommerce service.', max_length=255, null=True, verbose_name='Bulk SKU')), + ('sku', models.CharField(blank=True, help_text='OPTIONAL: This is the SKU (stock keeping unit) of this mode in the external ecommerce service. Leave this blank if the course has not yet been migrated to the ecommerce service.', max_length=255, null=True, verbose_name=u'SKU')), + ('bulk_sku', models.CharField(blank=True, default=None, help_text='This is the bulk SKU (stock keeping unit) of this mode in the external ecommerce service.', max_length=255, null=True, verbose_name=u'Bulk SKU')), ('history_id', models.AutoField(primary_key=True, serialize=False)), ('history_date', models.DateTimeField()), ('history_change_reason', models.CharField(max_length=100, null=True)), diff --git a/common/djangoapps/course_modes/models.py b/common/djangoapps/course_modes/models.py index 04588a3428..5d824ac83f 100644 --- a/common/djangoapps/course_modes/models.py +++ b/common/djangoapps/course_modes/models.py @@ -84,7 +84,7 @@ class CourseMode(models.Model): min_price = models.IntegerField(default=0, verbose_name=_("Price")) # the currency these prices are in, using lower case ISO currency codes - currency = models.CharField(default="usd", max_length=8) + currency = models.CharField(default=u"usd", max_length=8) # The datetime at which the course mode will expire. # This is used to implement "upgrade" deadlines. @@ -98,7 +98,7 @@ class CourseMode(models.Model): u"OPTIONAL: After this date/time, users will no longer be able to enroll in this mode. " u"Leave this blank if users can enroll in this mode until enrollment closes for the course." ), - db_column='expiration_datetime', + db_column=u'expiration_datetime', ) # The system prefers to set this automatically based on default settings. But @@ -112,7 +112,7 @@ class CourseMode(models.Model): # DEPRECATED: the suggested prices for this mode # We used to allow users to choose from a set of prices, but we now allow only # a single price. This field has been deprecated by `min_price` - suggested_prices = models.CharField(max_length=255, blank=True, default='', + suggested_prices = models.CharField(max_length=255, blank=True, default=u'', validators=[validate_comma_separated_integer_list]) # optional description override @@ -124,7 +124,7 @@ class CourseMode(models.Model): max_length=255, null=True, blank=True, - verbose_name="SKU", + verbose_name=u"SKU", help_text=_( u"OPTIONAL: This is the SKU (stock keeping unit) of this mode in the external ecommerce service. " u"Leave this blank if the course has not yet been migrated to the ecommerce service." @@ -137,7 +137,7 @@ class CourseMode(models.Model): null=True, blank=True, default=None, # Need this in order to set DEFAULT NULL on the database column - verbose_name="Bulk SKU", + verbose_name=u"Bulk SKU", help_text=_( u"This is the bulk SKU (stock keeping unit) of this mode in the external ecommerce service." ) @@ -892,11 +892,11 @@ class CourseModesArchive(models.Model): min_price = models.IntegerField(default=0) # the suggested prices for this mode - suggested_prices = models.CharField(max_length=255, blank=True, default='', + suggested_prices = models.CharField(max_length=255, blank=True, default=u'', validators=[validate_comma_separated_integer_list]) # the currency these prices are in, using lower case ISO currency codes - currency = models.CharField(default="usd", max_length=8) + currency = models.CharField(default=u"usd", max_length=8) # turn this mode off after the given expiration date expiration_date = models.DateField(default=None, null=True, blank=True) diff --git a/lms/djangoapps/grades/config/models.py b/lms/djangoapps/grades/config/models.py index bc433198c4..24f6024d95 100644 --- a/lms/djangoapps/grades/config/models.py +++ b/lms/djangoapps/grades/config/models.py @@ -94,5 +94,5 @@ class ComputeGradesSetting(ConfigurationModel): batch_size = IntegerField(default=100) course_ids = TextField( blank=False, - help_text="Whitespace-separated list of course keys for which to compute grades." + help_text=u"Whitespace-separated list of course keys for which to compute grades." ) diff --git a/lms/djangoapps/grades/constants.py b/lms/djangoapps/grades/constants.py index d38d6b80d8..2d5fb8f979 100644 --- a/lms/djangoapps/grades/constants.py +++ b/lms/djangoapps/grades/constants.py @@ -13,6 +13,6 @@ class ScoreDatabaseTableEnum(object): class GradeOverrideFeatureEnum(object): - proctoring = 'PROCTORING' - gradebook = 'GRADEBOOK' + proctoring = u'PROCTORING' + gradebook = u'GRADEBOOK' grade_import = 'grade-import' diff --git a/lms/djangoapps/grades/migrations/0012_computegradessetting.py b/lms/djangoapps/grades/migrations/0012_computegradessetting.py index d6ab58fe8e..275e3a79b8 100644 --- a/lms/djangoapps/grades/migrations/0012_computegradessetting.py +++ b/lms/djangoapps/grades/migrations/0012_computegradessetting.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')), ('batch_size', models.IntegerField(default=100)), - ('course_ids', models.TextField(help_text=b'Whitespace-separated list of course keys for which to compute grades.')), + ('course_ids', models.TextField(help_text=u'Whitespace-separated list of course keys for which to compute grades.')), ('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/grades/migrations/0014_persistentsubsectiongradeoverridehistory.py b/lms/djangoapps/grades/migrations/0014_persistentsubsectiongradeoverridehistory.py index b9cb3d6b7a..445cb656ef 100644 --- a/lms/djangoapps/grades/migrations/0014_persistentsubsectiongradeoverridehistory.py +++ b/lms/djangoapps/grades/migrations/0014_persistentsubsectiongradeoverridehistory.py @@ -20,8 +20,8 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('override_id', models.IntegerField(db_index=True)), - ('feature', models.CharField(choices=[(b'PROCTORING', b'proctoring'), (b'GRADEBOOK', b'gradebook')], default=b'PROCTORING', max_length=32)), - ('action', models.CharField(choices=[(b'CREATEORUPDATE', b'create_or_update'), (b'DELETE', b'delete')], default=b'CREATEORUPDATE', max_length=32)), + ('feature', models.CharField(choices=[(u'PROCTORING', u'proctoring'), (u'GRADEBOOK', u'gradebook')], default=u'PROCTORING', max_length=32)), + ('action', models.CharField(choices=[(u'CREATEORUPDATE', u'create_or_update'), (u'DELETE', u'delete')], default=u'CREATEORUPDATE', max_length=32)), ('comments', models.CharField(blank=True, max_length=300, null=True)), ('created', models.DateTimeField(auto_now_add=True, db_index=True)), ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), diff --git a/lms/djangoapps/grades/models.py b/lms/djangoapps/grades/models.py index c6cb91b1d8..e132d53d98 100644 --- a/lms/djangoapps/grades/models.py +++ b/lms/djangoapps/grades/models.py @@ -781,15 +781,15 @@ class PersistentSubsectionGradeOverrideHistory(models.Model): .. no_pii: """ OVERRIDE_FEATURES = ( - (constants.GradeOverrideFeatureEnum.proctoring, 'proctoring'), - (constants.GradeOverrideFeatureEnum.gradebook, 'gradebook'), + (constants.GradeOverrideFeatureEnum.proctoring, u'proctoring'), + (constants.GradeOverrideFeatureEnum.gradebook, u'gradebook'), ) - CREATE_OR_UPDATE = 'CREATEORUPDATE' - DELETE = 'DELETE' + CREATE_OR_UPDATE = u'CREATEORUPDATE' + DELETE = u'DELETE' OVERRIDE_ACTIONS = ( - (CREATE_OR_UPDATE, 'create_or_update'), - (DELETE, 'delete') + (CREATE_OR_UPDATE, u'create_or_update'), + (DELETE, u'delete') ) class Meta(object): diff --git a/openedx/core/djangoapps/api_admin/migrations/0001_initial.py b/openedx/core/djangoapps/api_admin/migrations/0001_initial.py index 371f9d96a4..e4b23e9a97 100644 --- a/openedx/core/djangoapps/api_admin/migrations/0001_initial.py +++ b/openedx/core/djangoapps/api_admin/migrations/0001_initial.py @@ -21,7 +21,7 @@ class Migration(migrations.Migration): ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), - ('status', models.CharField(default=b'pending', help_text='Status of this API access request', max_length=255, db_index=True, choices=[(b'pending', 'Pending'), (b'denied', 'Denied'), (b'approved', 'Approved')])), + ('status', models.CharField(default=u'pending', help_text='Status of this API access request', max_length=255, db_index=True, choices=[(u'pending', 'Pending'), (u'denied', 'Denied'), (u'approved', 'Approved')])), ('website', models.URLField(help_text='The URL of the website associated with this API user.')), ('reason', models.TextField(help_text='The reason this user wants to access the API.')), ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)), @@ -38,7 +38,7 @@ class Migration(migrations.Migration): ('id', models.IntegerField(verbose_name='ID', db_index=True, auto_created=True, blank=True)), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)), - ('status', models.CharField(default=b'pending', help_text='Status of this API access request', max_length=255, db_index=True, choices=[(b'pending', 'Pending'), (b'denied', 'Denied'), (b'approved', 'Approved')])), + ('status', models.CharField(default=u'pending', help_text='Status of this API access request', max_length=255, db_index=True, choices=[(u'pending', 'Pending'), (u'denied', 'Denied'), (u'approved', 'Approved')])), ('website', models.URLField(help_text='The URL of the website associated with this API user.')), ('reason', models.TextField(help_text='The reason this user wants to access the API.')), ('history_id', models.AutoField(serialize=False, primary_key=True)), diff --git a/openedx/core/djangoapps/api_admin/migrations/0003_auto_20160404_1618.py b/openedx/core/djangoapps/api_admin/migrations/0003_auto_20160404_1618.py index 53070c22d5..54132a12ec 100644 --- a/openedx/core/djangoapps/api_admin/migrations/0003_auto_20160404_1618.py +++ b/openedx/core/djangoapps/api_admin/migrations/0003_auto_20160404_1618.py @@ -30,22 +30,22 @@ class Migration(migrations.Migration): migrations.AddField( model_name='apiaccessrequest', name='company_address', - field=models.CharField(default=b'', max_length=255), + field=models.CharField(default=u'', max_length=255), ), migrations.AddField( model_name='apiaccessrequest', name='company_name', - field=models.CharField(default=b'', max_length=255), + field=models.CharField(default=u'', max_length=255), ), migrations.AddField( model_name='historicalapiaccessrequest', name='company_address', - field=models.CharField(default=b'', max_length=255), + field=models.CharField(default=u'', max_length=255), ), migrations.AddField( model_name='historicalapiaccessrequest', name='company_name', - field=models.CharField(default=b'', max_length=255), + field=models.CharField(default=u'', max_length=255), ), migrations.AlterField( model_name='apiaccessrequest', diff --git a/openedx/core/djangoapps/api_admin/models.py b/openedx/core/djangoapps/api_admin/models.py index 316fe00c77..8f6aacea8c 100644 --- a/openedx/core/djangoapps/api_admin/models.py +++ b/openedx/core/djangoapps/api_admin/models.py @@ -36,9 +36,9 @@ class ApiAccessRequest(TimeStampedModel): .. pii_retirement: local_api """ - PENDING = 'pending' - DENIED = 'denied' - APPROVED = 'approved' + PENDING = u'pending' + DENIED = u'denied' + APPROVED = u'approved' STATUS_CHOICES = ( (PENDING, _('Pending')), (DENIED, _('Denied')), @@ -54,8 +54,8 @@ class ApiAccessRequest(TimeStampedModel): ) website = models.URLField(help_text=_('The URL of the website associated with this API user.')) reason = models.TextField(help_text=_('The reason this user wants to access the API.')) - company_name = models.CharField(max_length=255, default='') - company_address = models.CharField(max_length=255, default='') + company_name = models.CharField(max_length=255, default=u'') + company_address = models.CharField(max_length=255, default=u'') site = models.ForeignKey(Site, on_delete=models.CASCADE) contacted = models.BooleanField(default=False) diff --git a/openedx/core/djangoapps/credentials/migrations/0003_auto_20170525_1109.py b/openedx/core/djangoapps/credentials/migrations/0003_auto_20170525_1109.py index 3532f681bc..f229452c98 100644 --- a/openedx/core/djangoapps/credentials/migrations/0003_auto_20170525_1109.py +++ b/openedx/core/djangoapps/credentials/migrations/0003_auto_20170525_1109.py @@ -14,11 +14,11 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='credentialsapiconfig', name='internal_service_url', - field=models.URLField(help_text=b'DEPRECATED: Use the setting CREDENTIALS_INTERNAL_SERVICE_URL.', verbose_name='Internal Service URL'), + field=models.URLField(help_text=u'DEPRECATED: Use the setting CREDENTIALS_INTERNAL_SERVICE_URL.', verbose_name='Internal Service URL'), ), migrations.AlterField( model_name='credentialsapiconfig', name='public_service_url', - field=models.URLField(help_text=b'DEPRECATED: Use the setting CREDENTIALS_PUBLIC_SERVICE_URL.', verbose_name='Public Service URL'), + field=models.URLField(help_text=u'DEPRECATED: Use the setting CREDENTIALS_PUBLIC_SERVICE_URL.', verbose_name='Public Service URL'), ), ] diff --git a/openedx/core/djangoapps/credentials/models.py b/openedx/core/djangoapps/credentials/models.py index af32e4c9b1..7bb8bd3b44 100644 --- a/openedx/core/djangoapps/credentials/models.py +++ b/openedx/core/djangoapps/credentials/models.py @@ -35,11 +35,11 @@ class CredentialsApiConfig(ConfigurationModel): internal_service_url = models.URLField( verbose_name=_('Internal Service URL'), - help_text='DEPRECATED: Use the setting CREDENTIALS_INTERNAL_SERVICE_URL.' + help_text=u'DEPRECATED: Use the setting CREDENTIALS_INTERNAL_SERVICE_URL.' ) public_service_url = models.URLField( verbose_name=_('Public Service URL'), - help_text='DEPRECATED: Use the setting CREDENTIALS_PUBLIC_SERVICE_URL.' + help_text=u'DEPRECATED: Use the setting CREDENTIALS_PUBLIC_SERVICE_URL.' ) enable_learner_issuance = models.BooleanField( diff --git a/openedx/core/djangoapps/schedules/migrations/0006_scheduleexperience.py b/openedx/core/djangoapps/schedules/migrations/0006_scheduleexperience.py index 6fe2e9ba3e..2730ce62d1 100644 --- a/openedx/core/djangoapps/schedules/migrations/0006_scheduleexperience.py +++ b/openedx/core/djangoapps/schedules/migrations/0006_scheduleexperience.py @@ -15,7 +15,7 @@ class Migration(migrations.Migration): name='ScheduleExperience', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('experience_type', models.PositiveSmallIntegerField(default=0, choices=[(0, b'Recurring Nudge and Upgrade Reminder'), (1, b'Course Updates')])), + ('experience_type', models.PositiveSmallIntegerField(default=0, choices=[(0, u'Recurring Nudge and Upgrade Reminder'), (1, u'Course Updates')])), ('schedule', models.OneToOneField(related_name='experience', to='schedules.Schedule', on_delete=models.CASCADE)), ], ), diff --git a/openedx/core/djangoapps/schedules/models.py b/openedx/core/djangoapps/schedules/models.py index 80bebdb8b6..fe6013f369 100644 --- a/openedx/core/djangoapps/schedules/models.py +++ b/openedx/core/djangoapps/schedules/models.py @@ -62,8 +62,8 @@ class ScheduleExperience(models.Model): .. no_pii: """ EXPERIENCES = Choices( - (0, 'default', 'Recurring Nudge and Upgrade Reminder'), - (1, 'course_updates', 'Course Updates') + (0, 'default', u'Recurring Nudge and Upgrade Reminder'), + (1, 'course_updates', u'Course Updates') ) schedule = models.OneToOneField(Schedule, related_name='experience', on_delete=models.CASCADE) diff --git a/openedx/core/djangoapps/video_pipeline/migrations/0001_initial.py b/openedx/core/djangoapps/video_pipeline/migrations/0001_initial.py index 636878c23b..0966beb8c8 100644 --- a/openedx/core/djangoapps/video_pipeline/migrations/0001_initial.py +++ b/openedx/core/djangoapps/video_pipeline/migrations/0001_initial.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')), ('api_url', models.URLField(help_text='edx-video-pipeline API URL.', verbose_name='Internal API URL')), - ('service_username', models.CharField(default=b'video_pipeline_service_user', help_text='Username created for Video Pipeline Integration, e.g. video_pipeline_service_user.', max_length=100)), + ('service_username', models.CharField(default=u'video_pipeline_service_user', help_text='Username created for Video Pipeline Integration, e.g. video_pipeline_service_user.', max_length=100)), ('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_pipeline/migrations/0002_auto_20171114_0704.py b/openedx/core/djangoapps/video_pipeline/migrations/0002_auto_20171114_0704.py index d454d9a48f..18e120c640 100644 --- a/openedx/core/djangoapps/video_pipeline/migrations/0002_auto_20171114_0704.py +++ b/openedx/core/djangoapps/video_pipeline/migrations/0002_auto_20171114_0704.py @@ -15,11 +15,11 @@ class Migration(migrations.Migration): migrations.AddField( model_name='videopipelineintegration', name='client_name', - field=models.CharField(default=b'VEDA-Prod', help_text='Oauth client name of video pipeline service.', max_length=100), + field=models.CharField(default=u'VEDA-Prod', help_text='Oauth client name of video pipeline service.', max_length=100), ), migrations.AlterField( model_name='videopipelineintegration', name='service_username', - field=models.CharField(default=b'veda_service_user', help_text='Username created for Video Pipeline Integration, e.g. veda_service_user.', max_length=100), + field=models.CharField(default=u'veda_service_user', help_text='Username created for Video Pipeline Integration, e.g. veda_service_user.', max_length=100), ), ] diff --git a/openedx/core/djangoapps/video_pipeline/models.py b/openedx/core/djangoapps/video_pipeline/models.py index 87a2a10dfd..6048ecd2dc 100644 --- a/openedx/core/djangoapps/video_pipeline/models.py +++ b/openedx/core/djangoapps/video_pipeline/models.py @@ -19,7 +19,7 @@ class VideoPipelineIntegration(ConfigurationModel): """ client_name = models.CharField( max_length=100, - default='VEDA-Prod', + default=u'VEDA-Prod', null=False, blank=False, help_text=_('Oauth client name of video pipeline service.') @@ -32,7 +32,7 @@ class VideoPipelineIntegration(ConfigurationModel): service_username = models.CharField( max_length=100, - default='veda_service_user', + default=u'veda_service_user', null=False, blank=False, help_text=_('Username created for Video Pipeline Integration, e.g. veda_service_user.') diff --git a/openedx/core/djangoapps/video_pipeline/tests/mixins.py b/openedx/core/djangoapps/video_pipeline/tests/mixins.py index 6a3b37025f..c5efa24aee 100644 --- a/openedx/core/djangoapps/video_pipeline/tests/mixins.py +++ b/openedx/core/djangoapps/video_pipeline/tests/mixins.py @@ -15,7 +15,7 @@ class VideoPipelineIntegrationMixin(object): video_pipeline_integration_defaults = { 'enabled': True, 'api_url': 'https://video-pipeline.example.com/api/v1/', - 'service_username': 'cms_video_pipeline_service_user', + 'service_username': u'cms_video_pipeline_service_user', 'client_name': 'video_pipeline' }