Ticket #22057: patch_commit_29974eaec3ec.patch

File patch_commit_29974eaec3ec.patch, 1.7 KB (added by Akis Kesoglou, 11 years ago)
  • django/core/serializers/base.py

    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.  
    33"""
    44import warnings
    55
    6 from django.db import models
    76from django.utils import six
    87
    98
    class DeserializedObject(object):  
    166165            self.object._meta.app_label, self.object._meta.object_name, self.object.pk)
    167166
    168167    def save(self, save_m2m=True, using=None):
     168        from django.db import models
    169169        # Call save on the Model baseclass directly. This bypasses any
    170170        # model-defined save. The save is also forced to be raw.
    171171        # raw=True is passed to any pre/post_save signals.
  • django/core/serializers/python.py

    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  
    88from django.apps import apps
    99from django.conf import settings
    1010from django.core.serializers import base
    11 from django.db import models, DEFAULT_DB_ALIAS
    1211from django.utils.encoding import smart_text, is_protected_type
    1312from django.utils import six
    1413
    def Deserializer(object_list, **options):  
    8584    It's expected that you pass the Python objects themselves (instead of a
    8685    stream or a string) to the constructor
    8786    """
     87    from django.db import models, DEFAULT_DB_ALIAS
    8888    db = options.pop('using', DEFAULT_DB_ALIAS)
    8989    ignore = options.pop('ignorenonexistent', False)
    9090
Back to Top