Fixes for review feedback
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user