def save_event_image(image_url, upload_path, ext='png', remove_after_upload=True):
 filename = '{filename}.{ext}'.format(filename=time.time(), ext=ext)
 file_path = get_path_of_temp_url(image_url)
 logo_file = UploadedFile(file_path, filename)
 url = upload(logo_file, upload_path)
 if remove_after_upload:
  os.remove(file_path)
 return (url if url else '')

def save_event_image ( image_url , upload_path , ext = 'png' , remove_after_upload = True ) : filename = '{filename}.{ext}' . format ( filename = time . time ( ) , ext = ext ) file_path = get_path_of_temp_url ( image_url ) logo_file = UploadedFile ( file_path , filename ) url = upload ( logo_file , upload_path ) if remove_after_upload : os . remove ( file_path ) return ( url if url else '' )
save the image .