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):