aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/compat.py
diff options
context:
space:
mode:
authorbwreilly2013-09-06 11:01:31 -0500
committerbwreilly2013-09-06 11:01:31 -0500
commit4a9dcfa76089143bbeb5cd43fa3a406365d89e96 (patch)
tree8643a0d9f4b0c3732321e1014a9b0b59141f5eaa /rest_framework/compat.py
parent551fe92078698005fd5a35cc14cef35baf1d2d71 (diff)
downloaddjango-rest-framework-4a9dcfa76089143bbeb5cd43fa3a406365d89e96.tar.bz2
added guardian as optional requirement, stubbed out object-level permission class
Diffstat (limited to 'rest_framework/compat.py')
-rw-r--r--rest_framework/compat.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/rest_framework/compat.py b/rest_framework/compat.py
index 6f7447ad..b9d1dae6 100644
--- a/rest_framework/compat.py
+++ b/rest_framework/compat.py
@@ -47,6 +47,12 @@ try:
except ImportError:
django_filters = None
+# guardian is optional
+try:
+ import guardian
+except ImportError:
+ guardian = None
+
# cStringIO only if it's available, otherwise StringIO
try: