mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-11 04:07:39 +03:00
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
This commit is contained in:
parent
d84c2cf275
commit
a4304458f5
|
@ -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 = (
|
||||
|
|
Loading…
Reference in New Issue
Block a user