chore: Django3 has removed python_2_unicode_compatible.

Execute the codemodes.
This commit is contained in:
Awais Qureshi
2021-07-29 18:24:39 +05:00
parent 1f12ab186c
commit 82ef28b43f
4 changed files with 3 additions and 9 deletions

View File

@@ -4,10 +4,8 @@ Models for Announcements
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Announcement(models.Model):
"""Site-wide announcements to be displayed on the dashboard"""
class Meta:

View File

@@ -5,14 +5,13 @@ Content Type Gating Configuration Models
from django.core.exceptions import ValidationError
from django.db import models
from django.utils import timezone
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
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
@python_2_unicode_compatible
class ContentTypeGatingConfig(StackedConfigurationModel):
"""
A ConfigurationModel used to manage configuration for Content Type Gating (Feature Based Enrollments).

View File

@@ -5,14 +5,13 @@ Course Duration Limit Configuration Models
from django.core.exceptions import ValidationError
from django.db import models
from django.utils import timezone
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
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
@python_2_unicode_compatible
class CourseDurationLimitConfig(StackedConfigurationModel):
"""
Configuration to manage the Course Duration Limit facility.

View File

@@ -6,13 +6,12 @@ DiscountRestrictionConfig Models
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from openedx.core.djangoapps.config_model_utils.models import StackedConfigurationModel
@python_2_unicode_compatible
class DiscountRestrictionConfig(StackedConfigurationModel):
"""
A ConfigurationModel used to manage restrictons for lms-controlled discounts
@@ -41,7 +40,6 @@ class DiscountRestrictionConfig(StackedConfigurationModel):
)
@python_2_unicode_compatible
class DiscountPercentageConfig(StackedConfigurationModel):
"""
A ConfigurationModel to configure the discount percentage for the first purchase discount