aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/compat.py
diff options
context:
space:
mode:
authorEric Buehl2014-03-06 20:19:21 +0000
committerEric Buehl2014-03-06 20:21:44 +0000
commit34887ed75625a58d00c986b3ea5526877f4724b2 (patch)
tree9550083d51dce99acf2e744e85d891dd803d645c /rest_framework/compat.py
parent86375f2d9506bcd3c95cb9901d2237672a47da3f (diff)
downloaddjango-rest-framework-34887ed75625a58d00c986b3ea5526877f4724b2.tar.bz2
it's safe to import scope and constants
Diffstat (limited to 'rest_framework/compat.py')
-rw-r--r--rest_framework/compat.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/rest_framework/compat.py b/rest_framework/compat.py
index f60a180d..d155f554 100644
--- a/rest_framework/compat.py
+++ b/rest_framework/compat.py
@@ -551,6 +551,8 @@ except (ImportError, ImproperlyConfigured):
# OAuth 2 support is optional
try:
import provider as oauth2_provider
+ from provider import scope as oauth2_provider_scope
+ from provider import constants as oauth2_constants
if oauth2_provider.__version__ in ('0.2.3', '0.2.4'):
# 0.2.3 and 0.2.4 are supported version that do not support
# timezone aware datetimes
@@ -561,6 +563,8 @@ try:
from django.utils.timezone import now as provider_now
except ImportError:
oauth2_provider = None
+ oauth2_provider_scope = None
+ oauth2_constants = None
provider_now = None
# Handle lazy strings