diff options
| author | Pierre Dulac | 2013-03-02 20:20:26 +0100 |
|---|---|---|
| committer | Pierre Dulac | 2013-03-06 19:16:13 +0100 |
| commit | cda21a306e8fdb713d26726964be10e2862140c3 (patch) | |
| tree | 7695208f7c7b4eddba1be20f7b27617a448c9588 | |
| parent | 6f5764105b2c361a85bc3933c943d98659bdbd68 (diff) | |
| download | django-rest-framework-cda21a306e8fdb713d26726964be10e2862140c3.tar.bz2 | |
Only add the django-oauth2-provider apps if the module is installed
otherwise log a warning
| -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 67dc7fff..b1501cf3 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', - 'provider', - 'provider.oauth2', ) +try: + import provider + INSTALLED_APPS += ( + 'provider', + 'provider.oauth2', + ) +except ImportError, inst: + import logging + logging.warning("django-oauth2-provider is not install, some tests will be skipped") + STATIC_URL = '/static/' PASSWORD_HASHERS = ( |
