Permalink
Browse files

nice messages if SITE_URL is blank

  • Loading branch information...
1 parent 3d41cde commit 8d8c34d724f9a5b40f7761ddb8da371d5d9e458e @andymckay andymckay committed Mar 11, 2013
Showing with 10 additions and 1 deletion.
  1. +4 −1 docs/topics/setup.rst
  2. +3 −0 solitude/authentication.py
  3. +3 −0 solitude/settings/local.py-dist
View
@@ -65,8 +65,11 @@ settings::
},
}
- STATSD_CLIENT = 'django_statsd.clients.null'
CLEANSED_SETTINGS_ACCESS = True
+
+ SITE_URL = 'http://your.solitude.instance/'
+ STATSD_CLIENT = 'django_statsd.clients.null'
+
PAYPAL_USE_SANDBOX = True
Solitude requires some keys on the file system. For each key in `base.py`,
@@ -68,6 +68,9 @@ def initialize_oauth_server_request(request):
if 'HTTP_AUTHORIZATION' in request.META:
auth_header = {'Authorization': request.META.get('HTTP_AUTHORIZATION')}
+ if not settings.SITE_URL:
+ raise ValueError('SITE_URL cannot be blank')
+
url = urljoin(settings.SITE_URL, request.path)
# Note: we are only signing using the QUERY STRING. We are not signing the
@@ -78,3 +78,6 @@ SECRET_KEY = ''
# The Bango API environment. This value must be an existing subdirectory
# under lib/bango/wsdl.
#BANGO_ENV = 'prod'
+
+# Used by OAuth, it cannot be blank.
+SITE_URL = ''

0 comments on commit 8d8c34d

Please sign in to comment.