diff options
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 = ( |
