Django3 has removed python_2_unicode_compatible.

Execute the codemodes on this file and removed all usage.
This commit is contained in:
Awais Qureshi
2021-07-15 12:09:50 +05:00
parent 6dc6777354
commit fe8a0c6f00
3 changed files with 8 additions and 0 deletions

View File

@@ -972,6 +972,8 @@ class PendingSecondaryEmailChange(DeletableByUserValue, models.Model):
EVENT_NAME_ENROLLMENT_ACTIVATED = 'edx.course.enrollment.activated'
EVENT_NAME_ENROLLMENT_DEACTIVATED = 'edx.course.enrollment.deactivated'
EVENT_NAME_ENROLLMENT_MODE_CHANGED = 'edx.course.enrollment.mode_changed'
class LoginFailures(models.Model):
"""
This model will keep track of failed login attempts.
@@ -1198,6 +1200,8 @@ class CourseEnrollmentManager(models.Manager):
# CourseEnrollment for a user in a course. This type
# is used to cache the state in the request cache.
CourseEnrollmentState = namedtuple('CourseEnrollmentState', 'mode, is_active')
class CourseEnrollment(models.Model):
"""
Represents a Student's Enrollment record for a single Course. You should

View File

@@ -180,6 +180,8 @@ class BadgeAssertion(TimeStampedModel):
# Abstract model doesn't index this, so we have to.
BadgeAssertion._meta.get_field('created').db_index = True
class CourseCompleteImageConfiguration(models.Model):
"""
Contains the icon configuration for badges for a specific course mode.

View File

@@ -56,6 +56,8 @@ EMAIL_TARGET_CHOICES = list(zip(
['Myself', 'Staff and instructors', 'All students', 'Specific cohort', 'Specific course mode']
))
EMAIL_TARGETS = {target[0] for target in EMAIL_TARGET_CHOICES}
class Target(models.Model):
"""
A way to refer to a particular group (within a course) as a "Send to:" target.