chore: Django3 has removed python_2_unicode_compatible.
Execute the codemodes.
This commit is contained in:
@@ -14,7 +14,7 @@ import psutil
|
||||
from celery.states import READY_STATES, RETRY, SUCCESS
|
||||
from django.core.cache import cache
|
||||
from django.db import DatabaseError, transaction
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
|
||||
from common.djangoapps.util.db import outer_atomic
|
||||
|
||||
@@ -120,7 +120,6 @@ def _generate_items_for_subtask(
|
||||
TASK_LOG.info("Number of items generated by chunking %s not equal to original total %s", num_items_queued, total_num_items) # lint-amnesty, pylint: disable=line-too-long
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class SubtaskStatus:
|
||||
"""
|
||||
Create and return a dict for tracking the status of a subtask.
|
||||
|
||||
@@ -5,7 +5,7 @@ ConfigurationModel for the mobile_api djangoapp.
|
||||
|
||||
from config_models.models import ConfigurationModel
|
||||
from django.db import models
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
|
||||
from . import utils
|
||||
from .mobile_platform import PLATFORM_CLASSES
|
||||
@@ -36,7 +36,6 @@ class MobileApiConfig(ConfigurationModel):
|
||||
return [profile.strip() for profile in cls.current().video_profiles.split(",") if profile]
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class AppVersionConfig(models.Model):
|
||||
"""
|
||||
Configuration for mobile app versions available.
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
Models for the rss_proxy djangoapp.
|
||||
"""
|
||||
from django.db import models
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
from model_utils.models import TimeStampedModel
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class WhitelistedRssUrl(TimeStampedModel):
|
||||
"""
|
||||
Model for persisting RSS feed URLs which are whitelisted
|
||||
|
||||
@@ -8,7 +8,7 @@ from collections import OrderedDict
|
||||
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.db import models
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
from lxml import etree
|
||||
from model_utils.models import TimeStampedModel
|
||||
from opaque_keys.edx.django.models import CourseKeyField
|
||||
@@ -20,7 +20,6 @@ from openedx.core.djangolib.markup import HTML
|
||||
log = logging.getLogger("edx.survey")
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class SurveyForm(TimeStampedModel):
|
||||
"""
|
||||
Model to define a Survey Form that contains the HTML form data
|
||||
|
||||
@@ -11,7 +11,7 @@ from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imp
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from django.db import models
|
||||
from django.dispatch import receiver
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
from django.utils.text import slugify
|
||||
from django.utils.translation import ugettext_lazy
|
||||
from django_countries.fields import CountryField
|
||||
@@ -104,7 +104,6 @@ def utc_now():
|
||||
return datetime.utcnow().replace(tzinfo=pytz.utc)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class CourseTeam(models.Model):
|
||||
"""
|
||||
This model represents team related info.
|
||||
@@ -224,7 +223,6 @@ class CourseTeam(models.Model):
|
||||
self.save()
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class CourseTeamMembership(models.Model):
|
||||
"""
|
||||
This model represents the membership of a single user in a single team.
|
||||
|
||||
@@ -25,7 +25,7 @@ from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imp
|
||||
from django.core.files.base import ContentFile
|
||||
from django.db import models, transaction
|
||||
from django.urls import reverse
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
from django.utils.functional import cached_property
|
||||
from django.utils.timezone import now
|
||||
from django.utils.translation import ugettext_lazy
|
||||
@@ -158,7 +158,6 @@ class IDVerificationAttempt(StatusModel):
|
||||
)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class ManualVerification(IDVerificationAttempt):
|
||||
"""
|
||||
Each ManualVerification represents a user's verification that bypasses the need for
|
||||
@@ -193,7 +192,6 @@ class ManualVerification(IDVerificationAttempt):
|
||||
return False
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class SSOVerification(IDVerificationAttempt):
|
||||
"""
|
||||
Each SSOVerification represents a Student's attempt to establish their identity
|
||||
|
||||
Reference in New Issue
Block a user