Dear ALL, I have this code for my CMS , am trying to make a button that downloads a csv file for the table auth_event , i did this :
def UserEvents(): import cStringIO file = cStringIO.StringIO() db(db.auth_event.id >0).select(orderby=~db.auth_event.id).export_to_csv_file(file) return file.getvalue() But i dont understand why is it opening the csv in the browser and now download it , its a file !!! any help Regards, --