Fixes for review feedback

This commit is contained in:
Rob Hudson 2014-10-21 10:35:14 -07:00
parent b1f8720983
commit 4c477dd72b
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ except ImportError:
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class StrAndUnicode:
class StrAndUnicode(object):
def __str__(self):
return self.code

View File

@ -11,7 +11,7 @@ os.environ['PYTHONPATH'] = os.pathsep.join([ROOT,
os.path.join(ROOT, 'examples')])
if __name__ == '__main__':
if django.VERSION[:2] >= (1, 7):
if hasattr(django, 'setup'):
# Django's app registry was added in 1.7. We need to call `setup` to
# initiate it.
django.setup()