diff --git a/django/core/serializers/base.py b/django/core/serializers/base.py
index e5c295131eb04fe40cbfb2a7a850793e59283706..c78b0d390ff592e104b227e7ed198c2449e92f21 100644
a
|
b
|
Module for abstract serializer/unserializer base classes.
|
3 | 3 | """ |
4 | 4 | import warnings |
5 | 5 | |
6 | | from django.db import models |
7 | 6 | from django.utils import six |
8 | 7 | |
9 | 8 | |
… |
… |
class DeserializedObject(object):
|
166 | 165 | self.object._meta.app_label, self.object._meta.object_name, self.object.pk) |
167 | 166 | |
168 | 167 | def save(self, save_m2m=True, using=None): |
| 168 | from django.db import models |
169 | 169 | # Call save on the Model baseclass directly. This bypasses any |
170 | 170 | # model-defined save. The save is also forced to be raw. |
171 | 171 | # raw=True is passed to any pre/post_save signals. |
diff --git a/django/core/serializers/python.py b/django/core/serializers/python.py
index 249dc5a054d32901aa50a51b11a763b191d29d1a..c108b55ebd120979010f3cd99bacb265bf65d6f4 100644
a
|
b
|
from __future__ import unicode_literals
|
8 | 8 | from django.apps import apps |
9 | 9 | from django.conf import settings |
10 | 10 | from django.core.serializers import base |
11 | | from django.db import models, DEFAULT_DB_ALIAS |
12 | 11 | from django.utils.encoding import smart_text, is_protected_type |
13 | 12 | from django.utils import six |
14 | 13 | |
… |
… |
def Deserializer(object_list, **options):
|
85 | 84 | It's expected that you pass the Python objects themselves (instead of a |
86 | 85 | stream or a string) to the constructor |
87 | 86 | """ |
| 87 | from django.db import models, DEFAULT_DB_ALIAS |
88 | 88 | db = options.pop('using', DEFAULT_DB_ALIAS) |
89 | 89 | ignore = options.pop('ignorenonexistent', False) |
90 | 90 | |