listener/app_engine/appengine_django/__init__.py
def PatchDeserializedObjectClass():
  """Patches the DeserializedObject class.

  The default implementation calls save directly on the django Model base
  class to avoid pre-save handlers. The model class provided by this package
  is not derived from the Django Model class and therefore must be called
  directly.

  Additionally we need to clear the internal _parent attribute as it may
  contain a FakeParent class that is used to deserialize instances without
  needing to load the parent instance itself. See the PythonDeserializer for
  more details.
  """
  # This can't be imported until InstallAppengineDatabaseBackend has run.
  from django.core.serializers import base
  class NewDeserializedObject(base.DeserializedObject):
    def save(self, save_m2m=True):
      self.object.save()
      self.object._parent = None
  base.DeserializedObject = NewDeserializedObject
  logging.debug("Replacement DeserializedObject class installed")
Patches the DeserializedObject class.

  The default implementation calls save directly on the django Model base
  class to avoid pre-save handlers. The model class provided by this package
  is not derived from the Django Model class and therefore must be called
  directly.

  Additionally we need to clear the internal _parent attribute as it may
  contain a FakeParent class that is used to deserialize instances without
  needing to load the parent instance itself. See the PythonDeserializer for
  more details.
  
Patches the DeserializedObject class.
The default implementation calls save directly on the django Model base
class to avoid pre-save handlers. The model class provided by this package
is not derived from the Django Model class and therefore must be called
directly.

Additionally we need to clear the internal _parent attribute as it may
contain a FakeParent class that is used to deserialize instances without
needing to load the parent instance itself. See the PythonDeserializer for
more details.
Patches the DeserializedObject class . The default implementation calls save directly on the django Model base class to avoid pre - save handlers . The model class provided by this package is not derived from the Django Model class and therefore must be called directly . Additionally we need to clear the internal _parent attribute as it may contain a FakeParent class that is used to deserialize instances without needing to load the parent instance itself . See the PythonDeserializer for more details .
def PatchDeserializedObjectClass():
  from django.core.serializers import base
  class NewDeserializedObject(base.DeserializedObject):
    def save(self, save_m2m=True):
      self.object.save()
      self.object._parent = None
  base.DeserializedObject = NewDeserializedObject
  logging.debug("Replacement DeserializedObject class installed")
def PatchDeserializedObjectClass ( ) : from django . core . serializers import base class NewDeserializedObject ( base . DeserializedObject ) : def save ( self , save_m2m = True ) : self . object . save ( ) self . object . _parent = None base . DeserializedObject = NewDeserializedObject logging . debug ( "Replacement DeserializedObject class installed" )
Patches the DeserializedObject class.
Patches the DeserializedObject class .
"""Patches the DeserializedObject class.

  The default implementation calls save directly on the django Model base
  class to avoid pre-save handlers. The model class provided by this package
  is not derived from the Django Model class and therefore must be called
  directly.

  Additionally we need to clear the internal _parent attribute as it may
  contain a FakeParent class that is used to deserialize instances without
  needing to load the parent instance itself. See the PythonDeserializer for
  more details.
  """ # This can't be imported until InstallAppengineDatabaseBackend has run.