aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/compat.py
diff options
context:
space:
mode:
authorTom Christie2013-06-27 20:29:52 +0100
committerTom Christie2013-06-27 20:29:52 +0100
commit3fcc01273c5efef26d911e50c02a4a43f89b34eb (patch)
tree9dd6294ffcfb199bd01c6527d8cdf349ddea82c9 /rest_framework/compat.py
parent1f6a59d76da286e7a89e8e41317beb16a4aab7c7 (diff)
downloaddjango-rest-framework-3fcc01273c5efef26d911e50c02a4a43f89b34eb.tar.bz2
Remove deprecated code
Diffstat (limited to 'rest_framework/compat.py')
-rw-r--r--rest_framework/compat.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/rest_framework/compat.py b/rest_framework/compat.py
index b748dcc5..161fffa8 100644
--- a/rest_framework/compat.py
+++ b/rest_framework/compat.py
@@ -494,11 +494,14 @@ try:
if 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
- from datetime.datetime import now as provider_now
+ import datetime
+ provider_now = datetime.datetime.now
else:
# Any other supported version does use timezone aware datetimes
from django.utils.timezone import now as provider_now
except ImportError:
+ import traceback
+ traceback.print_exc()
oauth2_provider = None
oauth2_provider_models = None
oauth2_provider_forms = None