def kit_import_csv():
 file = request.vars.filename.file
 try:
  budget_import_csv(file)
  session.flash = T('Data uploaded')
 except:
  session.error = T('Unable to parse CSV file!')
 redirect(URL(f='kit'))

def kit_import_csv ( ) : file = request . vars . filename . file try : budget_import_csv ( file ) session . flash = T ( 'Data uploaded' ) except : session . error = T ( 'Unable to parse CSV file!' ) redirect ( URL ( f = 'kit' ) )
import kits in csv format assumes concatenated: kits .