Fix for django-jsonfield to work on Django 1.4.1 (default with Ubuntu 12.10, fix for AC-222), update settings to provide more information when unable to load local/global settings file.

This commit is contained in:
Chris Church
2013-07-28 16:30:19 -04:00
parent 4c2af3a879
commit 92bfddb834
4 changed files with 31 additions and 27 deletions

View File

@@ -16,5 +16,8 @@ try:
class dummymodule(str):
__file__ = property(lambda self: self)
sys.modules['local_settings'] = dummymodule(local_settings_file)
except IOError:
pass
except IOError, e:
from django.core.exceptions import ImproperlyConfigured
if os.path.exists(settings_file):
msg = 'Unable to load %s: %s' % (local_settings_file, str(e))
raise ImproperlyConfigured(msg)