diff --git a/rest_framework/compat.py b/rest_framework/compat.py index da276b40f..7f9800202 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -601,6 +601,10 @@ except ImportError: return klass if django.VERSION >= (1, 7): - from collections import OrderedDict + try: + from collections import OrderedDict + except ImportError: + # Fall-back to OrderedDict from ordereddict module + from ordereddict import OrderedDict else: from django.utils.datastructures import SortedDict as OrderedDict