1
我試圖使用從形式獲得用戶價值和值發送到另一個控制器做一些操作上的web2py從表單值發送到另一個控制器
簡單的例子: 如何發送X從(默認/ index.html的)到(輸出/ index.html的) 或 如何調用該函數(輸出/指數)(默認/ index.html的)
default.py
index():
return dict()
index.html
{{extend 'layout.html'}}
<form enctype="multipart/form-data" action="{{=URL()}}" method="post">
Your name: <input name="name" /> <input type="submit" />
</form>
{{x=request.vars.name}}
output.py
index(x):
return x
非常感謝,我知道這是愚蠢的問題,但我是新來的web2py :) – Jimey1000