def to_xmlrpc(self):
        locations = self.locations.all()
        locations_dict = []
        for location in locations:
            locations_dict.append(location.to_xmlrpc())
        trip_dict = {
            'id': self.id,
            'published': self.published,
            'updated': self.updated,
            'expires': self.expires,
            'modality': self.modality.to_xmlrpc(),
            'preferences': self.preferences.to_xmlrpc(),
            'locations': locations_dict,
            'author': self.author.to_xmlrpc(),
        }
        return trip_dict
Returns a Python dict that contains just the attributes we want to expose
dataset/ETHPy150Open dgraziotin/dycapo/server/models/trip.py/Trip.to_xmlrpc