Commit b3e03cd8 by kazmiruk

fixes broken test + importlib warnings

parent 47c61679
...@@ -16,7 +16,7 @@ import datetime ...@@ -16,7 +16,7 @@ import datetime
import inspect import inspect
import types import types
from decimal import Decimal from decimal import Decimal
from django.contrib.contenttypes.generic import GenericForeignKey from django.contrib.contenttypes.fields import GenericForeignKey
from django.core.paginator import Page from django.core.paginator import Page
from django.db import models from django.db import models
from django.forms import widgets from django.forms import widgets
...@@ -114,6 +114,9 @@ class OrderedDictWithMetadata(OrderedDict): ...@@ -114,6 +114,9 @@ class OrderedDictWithMetadata(OrderedDict):
""" """
A sorted dict-like object, that can have additional properties attached. A sorted dict-like object, that can have additional properties attached.
""" """
def __reduce__(self):
return self.__class__, (OrderedDict(self), )
def __getstate__(self): def __getstate__(self):
""" """
Used by pickle (e.g., caching). Used by pickle (e.g., caching).
......
...@@ -19,9 +19,14 @@ back to the defaults. ...@@ -19,9 +19,14 @@ back to the defaults.
""" """
from __future__ import unicode_literals from __future__ import unicode_literals
from django.conf import settings from django.conf import settings
from django.utils import importlib, six from django.utils import six
from rest_framework import ISO_8601 from rest_framework import ISO_8601
try:
import importlib
except ImportError:
from django.utils import importlib
USER_SETTINGS = getattr(settings, 'REST_FRAMEWORK', None) USER_SETTINGS = getattr(settings, 'REST_FRAMEWORK', None)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment