diff options
| author | swistakm | 2013-02-26 11:27:06 +0100 | 
|---|---|---|
| committer | swistakm | 2013-02-26 11:27:06 +0100 | 
| commit | a4304458f5a07acc400b7630a59a4a0996e166d9 (patch) | |
| tree | eca6346a0a66fc77bdab35a0f81461c5e0d1abf0 /rest_framework | |
| parent | d84c2cf2752467c835200a54601f77ad1cee6b38 (diff) | |
| download | django-rest-framework-a4304458f5a07acc400b7630a59a4a0996e166d9.tar.bz2 | |
runtest.settings fixed if django-oauth-plus or oauth2 are not installed
oauth_provider can be added to INSTALLED_APPS only if these packages are installed
Diffstat (limited to 'rest_framework')
| -rw-r--r-- | rest_framework/runtests/settings.py | 12 | 
1 files changed, 10 insertions, 2 deletions
diff --git a/rest_framework/runtests/settings.py b/rest_framework/runtests/settings.py index 683669ce..eb3f1115 100644 --- a/rest_framework/runtests/settings.py +++ b/rest_framework/runtests/settings.py @@ -98,10 +98,18 @@ INSTALLED_APPS = (      'rest_framework',      'rest_framework.authtoken',      'rest_framework.tests', -    'oauth_provider', -  ) +# OAuth is optional and won't work if there is no oauth_provider & oauth2 +try: +    import oauth_provider +    import oauth2 +except ImportError: +    pass +else: +    INSTALLED_APPS += ('oauth_provider',) + +  STATIC_URL = '/static/'  PASSWORD_HASHERS = (  | 
