'Called to handle a ForeignKey (we need to treat them slightly
differently from regular fields).'

def handle_fk_field(self, obj, field):

    self._start_relational_field(field)
    related = getattr(obj, field.name)
    if (related is not None):
        if (self.use_natural_keys and hasattr(related, 'natural_key')):
            related = related.natural_key()
            for key_value in related:
                self.xml.startElement('natural', {})
                self.xml.characters(smart_unicode(key_value))
                self.xml.endElement('natural')
        else:
            if (field.rel.field_name == related._meta.pk.name):
                related = related._get_pk_val()
            else:
                related = getattr(related, field.rel.field_name)
            self.xml.characters(smart_unicode(related))
    else:
        self.xml.addQuickElement('None')
    self.xml.endElement('field')
