Commit 8bafa01a by Tom Christie

Tidy up oauth imports slightly

parent 5d61ff35
...@@ -84,7 +84,7 @@ TEMPLATE_DIRS = ( ...@@ -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 = [ ...@@ -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: ...@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment