mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-02 20:54:42 +03:00
Only add the django-oauth2-provider apps if the module is installed
otherwise log a warning
This commit is contained in:
parent
6f5764105b
commit
cda21a306e
|
@ -98,10 +98,18 @@ INSTALLED_APPS = (
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
'rest_framework.authtoken',
|
'rest_framework.authtoken',
|
||||||
'rest_framework.tests',
|
'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/'
|
STATIC_URL = '/static/'
|
||||||
|
|
||||||
PASSWORD_HASHERS = (
|
PASSWORD_HASHERS = (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user