listener/app_engine/appengine_django/__init__.py
def PatchDjangoSerializationModules(settings):
  """Monkey patches the Django serialization modules.

  The standard Django serialization modules to not correctly handle the
  datastore models provided by this package. This method installs replacements
  for selected modules and methods to give Django the capability to correctly
  serialize and deserialize datastore models.
  """
  # These can't be imported until InstallAppengineDatabaseBackend has run.
  from django.core.serializers import python
  from appengine_django.serializer.python import Deserializer
  if not hasattr(settings, "SERIALIZATION_MODULES"):
    settings.SERIALIZATION_MODULES = {}
  base_module = "appengine_django"
  settings.SERIALIZATION_MODULES["xml"] = "%s.serializer.xml" % base_module
  python.Deserializer = Deserializer
  # This must be imported after the Deserializer has been mokey patched above.
  from django.core.serializers import json
  from appengine_django.serializer.json import DjangoJSONEncoder
  json.DjangoJSONEncoder = DjangoJSONEncoder
  from django.core.serializers import pyyaml
  from appengine_django.serializer.pyyaml import DjangoSafeDumper
  pyyaml.DjangoSafeDumper = DjangoSafeDumper
  PatchDeserializedObjectClass()
  DisableModelValidation()
  logging.debug("Installed appengine json and python serialization modules")
Monkey patches the Django serialization modules.

  The standard Django serialization modules to not correctly handle the
  datastore models provided by this package. This method installs replacements
  for selected modules and methods to give Django the capability to correctly
  serialize and deserialize datastore models.
  
Monkey patches the Django serialization modules.
The standard Django serialization modules to not correctly handle the
datastore models provided by this package. This method installs replacements
for selected modules and methods to give Django the capability to correctly
serialize and deserialize datastore models.
Monkey patches the Django serialization modules . The standard Django serialization modules to not correctly handle the datastore models provided by this package . This method installs replacements for selected modules and methods to give Django the capability to correctly serialize and deserialize datastore models .
def PatchDjangoSerializationModules(settings):
  from django.core.serializers import python
  from appengine_django.serializer.python import Deserializer
  if not hasattr(settings, "SERIALIZATION_MODULES"):
    settings.SERIALIZATION_MODULES = {}
  base_module = "appengine_django"
  settings.SERIALIZATION_MODULES["xml"] = "%s.serializer.xml" % base_module
  python.Deserializer = Deserializer
  from django.core.serializers import json
  from appengine_django.serializer.json import DjangoJSONEncoder
  json.DjangoJSONEncoder = DjangoJSONEncoder
  from django.core.serializers import pyyaml
  from appengine_django.serializer.pyyaml import DjangoSafeDumper
  pyyaml.DjangoSafeDumper = DjangoSafeDumper
  PatchDeserializedObjectClass()
  DisableModelValidation()
  logging.debug("Installed appengine json and python serialization modules")
def PatchDjangoSerializationModules ( settings ) : from django . core . serializers import python from appengine_django . serializer . python import Deserializer if not hasattr ( settings , "SERIALIZATION_MODULES" ) : settings . SERIALIZATION_MODULES = { } base_module = "appengine_django" settings . SERIALIZATION_MODULES [ "xml" ] = "%s.serializer.xml" % base_module python . Deserializer = Deserializer from django . core . serializers import json from appengine_django . serializer . json import DjangoJSONEncoder json . DjangoJSONEncoder = DjangoJSONEncoder from django . core . serializers import pyyaml from appengine_django . serializer . pyyaml import DjangoSafeDumper pyyaml . DjangoSafeDumper = DjangoSafeDumper PatchDeserializedObjectClass ( ) DisableModelValidation ( ) logging . debug ( "Installed appengine json and python serialization modules" )
Monkey patches the Django serialization modules.
Monkey patches the Django serialization modules .
"""Monkey patches the Django serialization modules.

  The standard Django serialization modules to not correctly handle the
  datastore models provided by this package. This method installs replacements
  for selected modules and methods to give Django the capability to correctly
  serialize and deserialize datastore models.
  """ # These can't be imported until InstallAppengineDatabaseBackend has run. # This must be imported after the Deserializer has been mokey patched above.
settings