def load_image(filename): id = os.path.basename(filename) ob = Image(id, '', '') ob.update_data(file(filename, 'rb').read()) return ob