From 41a23a87e539a616279de8f00b24aec6481c07b0 Mon Sep 17 00:00:00 2001 From: aarif Date: Wed, 28 Aug 2019 17:52:51 +0500 Subject: [PATCH] python 3 fixes changes made as suggested --- lms/djangoapps/survey/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/survey/models.py b/lms/djangoapps/survey/models.py index 53468c2f44..a446dd1bc8 100644 --- a/lms/djangoapps/survey/models.py +++ b/lms/djangoapps/survey/models.py @@ -9,6 +9,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,6 +21,7 @@ from survey.exceptions import SurveyFormNameAlreadyExists, SurveyFormNotFound log = logging.getLogger("edx.survey") +@python_2_unicode_compatible class SurveyForm(TimeStampedModel): """ Model to define a Survey Form that contains the HTML form data @@ -35,7 +37,7 @@ class SurveyForm(TimeStampedModel): class Meta(object): app_label = 'survey' - def __unicode__(self): + def __str__(self): return self.name def save(self, *args, **kwargs):