mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 04:20:12 +03:00
Fallback to OrderedDict from ordereddict
This commit is contained in:
parent
5e6f015ee3
commit
ccf071f9a7
|
@ -601,6 +601,10 @@ except ImportError:
|
||||||
return klass
|
return klass
|
||||||
|
|
||||||
if django.VERSION >= (1, 7):
|
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:
|
else:
|
||||||
from django.utils.datastructures import SortedDict as OrderedDict
|
from django.utils.datastructures import SortedDict as OrderedDict
|
||||||
|
|
Loading…
Reference in New Issue
Block a user