aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/compat.py
diff options
context:
space:
mode:
authorPierre Dulac2013-03-01 02:08:58 +0100
committerPierre Dulac2013-03-01 02:08:58 +0100
commitda9d7fb8ec19f289d9d2777738a45007c41a1289 (patch)
tree5086af70af8dd827aa9cf9a2a1933688bd45b58e /rest_framework/compat.py
parent592a0a5980e4baf18102769997de8011be72cd6b (diff)
downloaddjango-rest-framework-da9d7fb8ec19f289d9d2777738a45007c41a1289.tar.bz2
Add the OAuth2Authentication class
Diffstat (limited to 'rest_framework/compat.py')
-rw-r--r--rest_framework/compat.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/rest_framework/compat.py b/rest_framework/compat.py
index 07fdddce..5bba0c86 100644
--- a/rest_framework/compat.py
+++ b/rest_framework/compat.py
@@ -426,3 +426,14 @@ try:
import defusedxml.ElementTree as etree
except ImportError:
etree = None
+
+
+# OAuth 2 support is optional
+try:
+ import provider as oauth2_provider
+except ImportError:
+ oauth2_provider = None
+try:
+ import provider.oauth2 as oauth2
+except ImportError:
+ oauth2 = None