--- a/src/ldt/ldt/settings.py Tue Nov 06 16:23:50 2012 +0100
+++ b/src/ldt/ldt/settings.py Tue Nov 06 17:01:10 2012 +0100
@@ -54,7 +54,7 @@
WEB_URL = getattr(settings, 'WEB_URL', '')
-WEB_AUTH = getattr(settings, 'WEB_AUTH', None)
+WEB_AUTH = getattr(settings, 'WEB_AUTH', {})
BASE_URL = getattr(settings, 'BASE_URL', '')
STATIC_URL = getattr(settings, 'STATIC_URL', '')
MEDIA_URL = getattr(settings, 'MEDIA_URL', '')
--- a/src/ldt/ldt/utils/url.py Tue Nov 06 16:23:50 2012 +0100
+++ b/src/ldt/ldt/utils/url.py Tue Nov 06 17:01:10 2012 +0100
@@ -4,7 +4,7 @@
def request_with_auth(url, method='GET'):
h = httplib2.Http()
- web_auth = getattr(settings, "WEB_AUTH", {})
+ web_auth = settings.WEB_AUTH if settings.WEB_AUTH else {}
for key in web_auth:
if re.search(key, url, re.IGNORECASE):
h.add_credentials(web_auth[key].get('NAME', ''), web_auth[key].get('PASSWORD', ''), web_auth[key].get('DOMAIN', ''))