Commit cb392214 by George Song Committed by GitHub

Merge pull request #82 from ahmedaljazzar/jazzar/upgrading-enum

Updating enum43 to support Python3 versions
parents cc558a6d 93cf1e84
...@@ -22,6 +22,7 @@ from django.dispatch import receiver ...@@ -22,6 +22,7 @@ from django.dispatch import receiver
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
from django.core.validators import MinValueValidator, RegexValidator from django.core.validators import MinValueValidator, RegexValidator
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.utils.six import python_2_unicode_compatible
from model_utils.models import TimeStampedModel from model_utils.models import TimeStampedModel
...@@ -60,6 +61,7 @@ class ModelFactoryWithValidation(object): ...@@ -60,6 +61,7 @@ class ModelFactoryWithValidation(object):
return cls.create_with_validation(*args, **kwargs), True return cls.create_with_validation(*args, **kwargs), True
@python_2_unicode_compatible
class Profile(models.Model): class Profile(models.Model):
""" """
Details for pre-defined encoding format Details for pre-defined encoding format
...@@ -79,7 +81,7 @@ class Profile(models.Model): ...@@ -79,7 +81,7 @@ class Profile(models.Model):
] ]
) )
def __unicode__(self): def __str__(self):
return self.profile_name return self.profile_name
...@@ -131,6 +133,7 @@ class Video(models.Model): ...@@ -131,6 +133,7 @@ class Video(models.Model):
return qset return qset
@python_2_unicode_compatible
class CourseVideo(models.Model, ModelFactoryWithValidation): class CourseVideo(models.Model, ModelFactoryWithValidation):
""" """
Model for the course_id associated with the video content. Model for the course_id associated with the video content.
...@@ -155,7 +158,7 @@ class CourseVideo(models.Model, ModelFactoryWithValidation): ...@@ -155,7 +158,7 @@ class CourseVideo(models.Model, ModelFactoryWithValidation):
if hasattr(self, 'video_image'): if hasattr(self, 'video_image'):
return self.video_image.image_url() return self.video_image.image_url()
def __unicode__(self): def __str__(self):
return self.course_id return self.course_id
......
...@@ -4,6 +4,6 @@ pillow==4.2.1 ...@@ -4,6 +4,6 @@ pillow==4.2.1
boto==2.46.1 boto==2.46.1
django-model-utils==2.3.1 django-model-utils==2.3.1
django-storages==1.5.2 django-storages==1.5.2
enum34==1.0.4 enum34==1.1.6
git+https://github.com/edx/django-rest-framework.git@1ceda7c086fddffd1c440cc86856441bbf0bd9cb#egg=djangorestframework==3.6.3 git+https://github.com/edx/django-rest-framework.git@1ceda7c086fddffd1c440cc86856441bbf0bd9cb#egg=djangorestframework==3.6.3
lxml==3.3.6 lxml==3.3.6
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment