From 7fe039764b450b977c7bdbfa54dcf256da08bc59 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Fri, 5 Mar 2010 00:50:36 +0100 Subject: [PATCH] Added ability to switch off Service API --- settings.py | 4 +++- sso/services/__init__.py | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/settings.py b/settings.py index cd6cd14..fbd63d4 100644 --- a/settings.py +++ b/settings.py @@ -85,8 +85,10 @@ INSTALLED_APPS = ( 'sso', ) -AUTH_PROFILE_MODULE = 'sso.SSOUser' +# Disable the service API, used for data imports +DISABLE_SERVICES = False +AUTH_PROFILE_MODULE = 'sso.SSOUser' LOGIN_REDIRECT_URL = "/profile" ### Jabber Service Settings diff --git a/sso/services/__init__.py b/sso/services/__init__.py index 25cebd6..f515e68 100644 --- a/sso/services/__init__.py +++ b/sso/services/__init__.py @@ -1,5 +1,10 @@ +import settings def get_api(api): + + if settings.DISABLE_SERVICES: + return BaseService() + try: mod = __import__(api) except ImportError: