aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/compat.py
diff options
context:
space:
mode:
authorTom Christie2013-03-07 09:01:53 +0000
committerTom Christie2013-03-07 09:01:53 +0000
commitd4e3610e716f2fbbda32aefb972e604446054127 (patch)
treedb9daafbe8736d7c8854bd5ef4c310ad1dd6cb0b /rest_framework/compat.py
parentddd7125a63c5187483058bad27c94676b9b6c16e (diff)
parent2eabc5c2b46d9f4cc7a467af849ff31397b9d7bf (diff)
downloaddjango-rest-framework-d4e3610e716f2fbbda32aefb972e604446054127.tar.bz2
Merge & clean OAuth support
Diffstat (limited to 'rest_framework/compat.py')
-rw-r--r--rest_framework/compat.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/rest_framework/compat.py b/rest_framework/compat.py
index 07fdddce..6efe6762 100644
--- a/rest_framework/compat.py
+++ b/rest_framework/compat.py
@@ -426,3 +426,18 @@ try:
import defusedxml.ElementTree as etree
except ImportError:
etree = None
+
+# OAuth is optional
+try:
+ # Note: The `oauth2` package actually provides oauth1.0a support. Urg.
+ import oauth2 as oauth
+except ImportError:
+ oauth = None
+
+# OAuth is optional
+try:
+ import oauth_provider
+ from oauth_provider.store import store as oauth_provider_store
+except ImportError:
+ oauth_provider = None
+ oauth_provider_store = None