From 13f9609386f8be66616382234cdaaca9c3ffe44d Mon Sep 17 00:00:00 2001 From: aarif Date: Tue, 17 Sep 2019 19:13:16 +0500 Subject: [PATCH] python 3 fixes --- openedx/core/djangoapps/embargo/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openedx/core/djangoapps/embargo/models.py b/openedx/core/djangoapps/embargo/models.py index 0ef5149f6c..0951ffd8aa 100644 --- a/openedx/core/djangoapps/embargo/models.py +++ b/openedx/core/djangoapps/embargo/models.py @@ -18,6 +18,7 @@ import json import logging import six +from django.utils.encoding import python_2_unicode_compatible from config_models.models import ConfigurationModel from django.core.cache import cache from django.db import models @@ -101,6 +102,7 @@ class EmbargoedState(ConfigurationModel): return self.embargoed_countries +@python_2_unicode_compatible class RestrictedCourse(models.Model): """ Course with access restrictions. @@ -267,7 +269,7 @@ class RestrictedCourse(models.Model): elif access_point == 'courseware': return self.access_msg_key - def __unicode__(self): + def __str__(self): return six.text_type(self.course_key) @classmethod