aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/compat.py
diff options
context:
space:
mode:
authorPierre Dulac2013-03-03 01:09:39 +0100
committerPierre Dulac2013-03-06 22:42:09 +0100
commit8845c0be88bf68fa0e42d05c7196cd52d897623b (patch)
tree820a7e5ad1f3de55e4862f091b421c67692a6de2 /rest_framework/compat.py
parent30e3775b8b209242141357bad0a69b6cc503c6f9 (diff)
downloaddjango-rest-framework-8845c0be88bf68fa0e42d05c7196cd52d897623b.tar.bz2
Fix import errors
Diffstat (limited to 'rest_framework/compat.py')
-rw-r--r--rest_framework/compat.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/rest_framework/compat.py b/rest_framework/compat.py
index e0a43f3f..1e04e8f6 100644
--- a/rest_framework/compat.py
+++ b/rest_framework/compat.py
@@ -431,5 +431,12 @@ except ImportError:
# OAuth 2 support is optional
try:
import provider.oauth2 as oauth2_provider
+
+ # Hack to fix submodule import issues
+ submodules = ['backends', 'forms','managers','models','urls','views']
+ for s in submodules:
+ mod = __import__('provider.oauth2.%s.*' % s)
+ setattr(oauth2_provider, s, mod)
+
except ImportError:
oauth2_provider = None