@require_role('admin')
def asset_upload(request):
 if (request.method == 'POST'):
  excel_file = request.FILES.get('file_name', '')
  ret = excel_to_db(excel_file)
  if ret:
   smg = u'\u6279\u91cf\u6dfb\u52a0\u6210\u529f'
  else:
   emg = u'\u6279\u91cf\u6dfb\u52a0\u5931\u8d25,\u8bf7\u68c0\u67e5\u683c\u5f0f.'
 return my_render('jasset/asset_add_batch.html', locals(), request)

@ require_role ( 'admin' ) def asset_upload ( request ) : if ( request . method == 'POST' ) : excel_file = request . FILES . get ( 'file_name' , '' ) ret = excel_to_db ( excel_file ) if ret : smg = u'\u6279\u91cf\u6dfb\u52a0\u6210\u529f' else : emg = u'\u6279\u91cf\u6dfb\u52a0\u5931\u8d25,\u8bf7\u68c0\u67e5\u683c\u5f0f.' return my_render ( 'jasset/asset_add_batch.html' , locals ( ) , request )
upload asset excel file view .