diff --git a/CHANGES b/CHANGES index bf037c3..1d9ad62 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +Version 0.7.2 +------------- +* Fix for when settings imports unicode_literals for some reason (Issue #67) + Version 0.7.1 ------------- * Fix: value missing in context diff --git a/rosetta/__init__.py b/rosetta/__init__.py index 6439f43..711524e 100644 --- a/rosetta/__init__.py +++ b/rosetta/__init__.py @@ -1,4 +1,4 @@ -VERSION = (0, 7, 1) +VERSION = (0, 7, 2) def get_version(svn=False, limit=3): diff --git a/rosetta/poutil.py b/rosetta/poutil.py index 2a63989..f22c6e9 100644 --- a/rosetta/poutil.py +++ b/rosetta/poutil.py @@ -1,9 +1,10 @@ -import os -import django -from django.conf import settings -from rosetta.conf import settings as rosetta_settings -from django.core.cache import cache from datetime import datetime +from django.conf import settings +from django.core.cache import cache +from rosetta.conf import settings as rosetta_settings +import django +import os +import six try: from django.utils import timezone except: @@ -73,7 +74,7 @@ def find_pos(lang, project_apps=True, django_apps=False, third_party_apps=False) continue p = appname.rfind('.') if p >= 0: - app = getattr(__import__(appname[:p], {}, {}, [appname[p + 1:]]), appname[p + 1:]) + app = getattr(__import__(appname[:p], {}, {}, [str(appname[p + 1:])]), appname[p + 1:]) else: app = __import__(appname, {}, {}, []) diff --git a/testproject/settings.py b/testproject/settings.py index c92095e..9d397d4 100644 --- a/testproject/settings.py +++ b/testproject/settings.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- +#from __future__ import unicode_literals import django import os import sys + SITE_ID = 1 PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))