File tree 2 files changed +10
-2
lines changed 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 16
16
import inspect
17
17
import types
18
18
from decimal import Decimal
19
- from django .contrib .contenttypes .generic import GenericForeignKey
19
+ from django .contrib .contenttypes .fields import GenericForeignKey
20
20
from django .core .paginator import Page
21
21
from django .db import models
22
22
from django .forms import widgets
@@ -114,6 +114,9 @@ class OrderedDictWithMetadata(OrderedDict):
114
114
"""
115
115
A sorted dict-like object, that can have additional properties attached.
116
116
"""
117
+ def __reduce__ (self ):
118
+ return self .__class__ , (OrderedDict (self ), )
119
+
117
120
def __getstate__ (self ):
118
121
"""
119
122
Used by pickle (e.g., caching).
Original file line number Diff line number Diff line change 19
19
"""
20
20
from __future__ import unicode_literals
21
21
from django .conf import settings
22
- from django .utils import importlib , six
22
+ from django .utils import six
23
23
from rest_framework import ISO_8601
24
24
25
+ try :
26
+ import importlib
27
+ except ImportError :
28
+ from django .utils import importlib
29
+
25
30
26
31
USER_SETTINGS = getattr (settings , 'REST_FRAMEWORK' , None )
27
32
You can’t perform that action at this time.
0 commit comments