mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-05-17 06:13:43 +03:00
Tidy up oauth imports slightly
This commit is contained in:
parent
5d61ff3508
commit
8bafa01abd
|
@ -84,7 +84,7 @@ TEMPLATE_DIRS = (
|
||||||
# Don't forget to use absolute paths, not relative paths.
|
# Don't forget to use absolute paths, not relative paths.
|
||||||
)
|
)
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = (
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
|
@ -95,15 +95,15 @@ INSTALLED_APPS = [
|
||||||
# Uncomment the next line to enable admin documentation:
|
# Uncomment the next line to enable admin documentation:
|
||||||
# 'django.contrib.admindocs',
|
# 'django.contrib.admindocs',
|
||||||
'djangorestframework',
|
'djangorestframework',
|
||||||
]
|
)
|
||||||
|
|
||||||
# OAuth support is optional, so we only test oauth if it's installed.
|
# OAuth support is optional, so we only test oauth if it's installed.
|
||||||
try:
|
try:
|
||||||
import oauth_provider
|
import oauth_provider
|
||||||
except:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
INSTALLED_APPS.append('oauth_provider')
|
INSTALLED_APPS += ('oauth_provider',)
|
||||||
|
|
||||||
# If we're running on the Jenkins server we want to archive the coverage reports as XML.
|
# If we're running on the Jenkins server we want to archive the coverage reports as XML.
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -15,7 +15,7 @@ try:
|
||||||
from oauth_provider.decorators import oauth_required
|
from oauth_provider.decorators import oauth_required
|
||||||
from oauth_provider.models import Resource, Consumer, Token
|
from oauth_provider.models import Resource, Consumer, Token
|
||||||
|
|
||||||
except:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user