Ticket #15488: django.patch

File django.patch, 725 bytes (added by anonymous, 13 years ago)

a draft

  • django/core/serializers/xml_serializer.py

     
    121121                    natural = value.natural_key()
    122122                    # Iterable natural keys are rolled out as subelements
    123123                    self.xml.startElement("object", {})
     124                    if not type(natural) == type((1,)):
     125                      natural = (natural,)
    124126                    for key_value in natural:
    125127                        self.xml.startElement("natural", {})
    126128                        self.xml.characters(smart_unicode(key_value))
Back to Top