def get_destination(self): destination_address = self.clean_data['destination_address'] if GoogleMaps.is_valid_address(destination_address): return Location.get_by_address(destination_address, create=True) else: return None
def get_source(self): source_address = self.clean_data['source_address'] if GoogleMaps.is_valid_address(source_address): return Location.get_by_address(source_address, create=True) else: return None