'Handles the saving of related non-M2M data.
Calling assigning ``child.parent = parent`` & then calling
``Child.save`` isn\'t good enough to make sure the ``parent``
is saved.
To get around this, we go through all our related fields &
call ``save`` on them if they have related, non-M2M data.
M2M data is handled by the ``ModelResource.save_m2m`` method.'

def save_related(self, bundle):

    for (field_name, field_object) in self.fields.items():
        if (not field_object.is_related):
            continue
        if field_object.is_m2m:
            continue
        if (not field_object.attribute):
            continue
        if field_object.readonly:
            continue
        if (field_object.blank and (field_name not in bundle.data)):
            continue
        try:
            related_obj = getattr(bundle.obj, field_object.attribute)
        except ObjectDoesNotExist:
            related_obj = None
        if (related_obj is None):
            related_obj = bundle.related_objects_to_save.get(field_object.attribute, None)
        if (related_obj and field_object.related_name):
            if (not self.get_bundle_detail_data(bundle)):
                bundle.obj.save()
            setattr(related_obj, field_object.related_name, bundle.obj)
        related_resource = field_object.get_related_resource(related_obj)
        if related_obj:
            obj_id = self.create_identifier(related_obj)
            if (obj_id in bundle.objects_saved):
                continue
        if bundle.data.get(field_name):
            if hasattr(bundle.data[field_name], u'keys'):
                related_bundle = related_resource.build_bundle(obj=related_obj, data=bundle.data.get(field_name), request=bundle.request, objects_saved=bundle.objects_saved)
                related_resource.full_hydrate(related_bundle)
                related_resource.save(related_bundle)
                related_obj = related_bundle.obj
            elif field_object.related_name:
                related_bundle = related_resource.build_bundle(obj=related_obj, request=bundle.request, objects_saved=bundle.objects_saved)
                related_resource.save(related_bundle)
                related_obj = related_bundle.obj
        if related_obj:
            setattr(bundle.obj, field_object.attribute, related_obj)
