mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-03 20:10:10 +03:00
Fallback to OrderedDict from ordereddict
This commit is contained in:
parent
5e6f015ee3
commit
ccf071f9a7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user