mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-03-20 09:54:15 +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.
|
||||
)
|
||||
|
||||
INSTALLED_APPS = [
|
||||
INSTALLED_APPS = (
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
|
@ -95,15 +95,15 @@ INSTALLED_APPS = [
|
|||
# Uncomment the next line to enable admin documentation:
|
||||
# 'django.contrib.admindocs',
|
||||
'djangorestframework',
|
||||
]
|
||||
)
|
||||
|
||||
# OAuth support is optional, so we only test oauth if it's installed.
|
||||
try:
|
||||
import oauth_provider
|
||||
except:
|
||||
except ImportError:
|
||||
pass
|
||||
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.
|
||||
import os
|
||||
|
|
|
@ -15,7 +15,7 @@ try:
|
|||
from oauth_provider.decorators import oauth_required
|
||||
from oauth_provider.models import Resource, Consumer, Token
|
||||
|
||||
except:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user