Added ability to switch off Service API

This commit is contained in:
2010-03-05 00:50:36 +01:00
parent 0f41d4c1b0
commit 7fe039764b
2 changed files with 8 additions and 1 deletions

View File

@@ -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

View File

@@ -1,5 +1,10 @@
import settings
def get_api(api):
if settings.DISABLE_SERVICES:
return BaseService()
try:
mod = __import__(api)
except ImportError: