Skip to content
Snippets Groups Projects
Unverified Commit daa38296 authored by Awais Qureshi's avatar Awais Qureshi Committed by GitHub
Browse files

Merge pull request #28317 from edx/python2_unicode_new

chore: Django3 has removed python_2_unicode_compatible.
parents 54fc5c35 82ef28b4
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,6 @@ Module for the Storage of BlockStructure objects. ...@@ -6,7 +6,6 @@ Module for the Storage of BlockStructure objects.
from logging import getLogger from logging import getLogger
from django.utils.encoding import python_2_unicode_compatible
from openedx.core.lib.cache_utils import zpickle, zunpickle from openedx.core.lib.cache_utils import zpickle, zunpickle
...@@ -20,7 +19,6 @@ from .transformer_registry import TransformerRegistry ...@@ -20,7 +19,6 @@ from .transformer_registry import TransformerRegistry
logger = getLogger(__name__) # pylint: disable=C0103 logger = getLogger(__name__) # pylint: disable=C0103
@python_2_unicode_compatible
class StubModel: class StubModel:
""" """
Stub model to use when storage backing is disabled. Stub model to use when storage backing is disabled.
......
...@@ -78,7 +78,7 @@ from django.core import signing ...@@ -78,7 +78,7 @@ from django.core import signing
from django.http import HttpResponse from django.http import HttpResponse
from django.utils.crypto import get_random_string from django.utils.crypto import get_random_string
from django.utils.deprecation import MiddlewareMixin from django.utils.deprecation import MiddlewareMixin
from django.utils.encoding import python_2_unicode_compatible
from edx_django_utils.monitoring import set_custom_attribute from edx_django_utils.monitoring import set_custom_attribute
from openedx.core.lib.mobile_utils import is_request_from_mobile_app from openedx.core.lib.mobile_utils import is_request_from_mobile_app
...@@ -106,7 +106,6 @@ class SafeCookieError(Exception): ...@@ -106,7 +106,6 @@ class SafeCookieError(Exception):
log.error(error_message) log.error(error_message)
@python_2_unicode_compatible
class SafeCookieData: class SafeCookieData:
""" """
Cookie data that cryptographically binds and timestamps the user Cookie data that cryptographically binds and timestamps the user
......
...@@ -2,12 +2,9 @@ ...@@ -2,12 +2,9 @@
Custom user-related utility code. Custom user-related utility code.
""" """
from django.utils.encoding import python_2_unicode_compatible
from django.contrib.auth.models import AnonymousUser from django.contrib.auth.models import AnonymousUser
@python_2_unicode_compatible
class SystemUser(AnonymousUser): class SystemUser(AnonymousUser):
""" """
A User that can act on behalf of system actions, when a user object is A User that can act on behalf of system actions, when a user object is
......
...@@ -4,10 +4,8 @@ Models for Announcements ...@@ -4,10 +4,8 @@ Models for Announcements
from django.db import models from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Announcement(models.Model): class Announcement(models.Model):
"""Site-wide announcements to be displayed on the dashboard""" """Site-wide announcements to be displayed on the dashboard"""
class Meta: class Meta:
......
...@@ -5,14 +5,13 @@ Content Type Gating Configuration Models ...@@ -5,14 +5,13 @@ Content Type Gating Configuration Models
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
from django.db import models from django.db import models
from django.utils import timezone from django.utils import timezone
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from openedx.core.djangoapps.config_model_utils.models import StackedConfigurationModel from openedx.core.djangoapps.config_model_utils.models import StackedConfigurationModel
from openedx.features.content_type_gating.helpers import correct_modes_for_fbe, enrollment_date_for_fbe from openedx.features.content_type_gating.helpers import correct_modes_for_fbe, enrollment_date_for_fbe
@python_2_unicode_compatible
class ContentTypeGatingConfig(StackedConfigurationModel): class ContentTypeGatingConfig(StackedConfigurationModel):
""" """
A ConfigurationModel used to manage configuration for Content Type Gating (Feature Based Enrollments). A ConfigurationModel used to manage configuration for Content Type Gating (Feature Based Enrollments).
......
...@@ -5,14 +5,13 @@ Course Duration Limit Configuration Models ...@@ -5,14 +5,13 @@ Course Duration Limit Configuration Models
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
from django.db import models from django.db import models
from django.utils import timezone from django.utils import timezone
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from openedx.core.djangoapps.config_model_utils.models import StackedConfigurationModel from openedx.core.djangoapps.config_model_utils.models import StackedConfigurationModel
from openedx.features.content_type_gating.helpers import correct_modes_for_fbe, enrollment_date_for_fbe from openedx.features.content_type_gating.helpers import correct_modes_for_fbe, enrollment_date_for_fbe
@python_2_unicode_compatible
class CourseDurationLimitConfig(StackedConfigurationModel): class CourseDurationLimitConfig(StackedConfigurationModel):
""" """
Configuration to manage the Course Duration Limit facility. Configuration to manage the Course Duration Limit facility.
......
...@@ -6,13 +6,12 @@ DiscountRestrictionConfig Models ...@@ -6,13 +6,12 @@ DiscountRestrictionConfig Models
from django.db import models from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from openedx.core.djangoapps.config_model_utils.models import StackedConfigurationModel from openedx.core.djangoapps.config_model_utils.models import StackedConfigurationModel
@python_2_unicode_compatible
class DiscountRestrictionConfig(StackedConfigurationModel): class DiscountRestrictionConfig(StackedConfigurationModel):
""" """
A ConfigurationModel used to manage restrictons for lms-controlled discounts A ConfigurationModel used to manage restrictons for lms-controlled discounts
...@@ -41,7 +40,6 @@ class DiscountRestrictionConfig(StackedConfigurationModel): ...@@ -41,7 +40,6 @@ class DiscountRestrictionConfig(StackedConfigurationModel):
) )
@python_2_unicode_compatible
class DiscountPercentageConfig(StackedConfigurationModel): class DiscountPercentageConfig(StackedConfigurationModel):
""" """
A ConfigurationModel to configure the discount percentage for the first purchase discount A ConfigurationModel to configure the discount percentage for the first purchase discount
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment