# HG changeset patch # User ymh # Date 1352217670 -3600 # Node ID ba43c842648c3d997157fae50693af90680e9875 # Parent e32b7057ca4819a5052927504cff0a2342dbaf52 Correct default value of WEB_AUTH diff -r e32b7057ca48 -r ba43c842648c src/ldt/ldt/settings.py --- 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', '') diff -r e32b7057ca48 -r ba43c842648c src/ldt/ldt/utils/url.py --- 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', ''))