From 2ed834a36a7edc4f629cf23a33d5af22a080177c Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Thu, 15 Jul 2021 00:33:45 +0500 Subject: [PATCH] Django3 has removed python_2_unicode_compatible. Execute the codemodes on this file and removed all usage. --- cms/djangoapps/course_creators/models.py | 5 +---- cms/lib/xblock/tagging/models.py | 4 ---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/cms/djangoapps/course_creators/models.py b/cms/djangoapps/course_creators/models.py index 40f20db016..153801990d 100644 --- a/cms/djangoapps/course_creators/models.py +++ b/cms/djangoapps/course_creators/models.py @@ -8,7 +8,7 @@ from django.db import models from django.db.models.signals import post_init, post_save from django.dispatch import Signal, receiver from django.utils import timezone -from django.utils.encoding import python_2_unicode_compatible + from django.utils.translation import ugettext_lazy as _ # A signal that will be sent when users should be added or removed from the creator group @@ -19,9 +19,6 @@ send_admin_notification = Signal(providing_args=["user"]) # A signal that will be sent when user should be notified of change in course creator privileges send_user_notification = Signal(providing_args=["user", "state"]) - - -@python_2_unicode_compatible class CourseCreator(models.Model): """ Creates the database table model. diff --git a/cms/lib/xblock/tagging/models.py b/cms/lib/xblock/tagging/models.py index c7d814b001..7350b50984 100644 --- a/cms/lib/xblock/tagging/models.py +++ b/cms/lib/xblock/tagging/models.py @@ -4,10 +4,7 @@ Django Model for tags from django.db import models -from django.utils.encoding import python_2_unicode_compatible - -@python_2_unicode_compatible class TagCategories(models.Model): """ This model represents tag categories. @@ -33,7 +30,6 @@ class TagCategories(models.Model): return [t.value for t in TagAvailableValues.objects.filter(category=self)] -@python_2_unicode_compatible class TagAvailableValues(models.Model): """ This model represents available values for tags.