现在我有两种看法
@view_config(route_name='upload',render='foo.mako')
if 'upload.submitted' in request.params:
input_file = request.POST['upload'].file
while 1:
data = imput_file.readline().strip()
if no data:
break
data_list = data.split(',')
email = data_list[0]
password = data_list[1]
return HTTPFound(location=request.route_url('manage')
return {}
@view_config(route_name='manage',render='bar.mako')
return {}
如何将数据从视图“上传”传递到“mamage”