新建flask專案。
設定除錯模式。
理解flask專案主程式。
使用裝飾器,設定路徑與函式之間的關係。
使用flask中render_template,用不同的路徑,返回首頁、登入員、註冊頁。
用檢視函式反轉得到url,},完成導航條裡的鏈結。
fromflask import flask,render_template'/
')def index():
return render_template('
base,html')
'/login/')
def login():
return render_template('
login.html')
'/register/')
def register():
return render_template('
register.html')
if __name__ == '
__main__':
login
"en">class="
bigbox
">
class="
box">class="
input_box
">賬號:
"umane
"type="
text
"placeholder="
請輸入賬號
">
class="
input_box
">密碼:
"upass
"type="
password
"placeholder="
請輸入密碼
">
"error_box
">
class="
input_box
">
"mylogin()
">登入
"是否取消登入?
")>取消
">輸入賬號:
"umane
"type="
text
"placeholder="
請輸入賬號
">
class="
input_box
">輸入密碼:
"upass
"type="
password
"placeholder="
請輸入密碼
">
class="
input_box
">再輸密碼:
"userpass1
" type="
password
" placeholder="
請再次輸入密碼
">
"error_box
">
class="
input_box
">
"radio
" value="
我已閱讀相關條例
">我已閱讀相關條例.
"mylogin()
">註冊
"mylogin()
">取消
開始Flask專案
新建flask專案。設定除錯模式。理解flask專案主程式。使用裝飾器,設定路徑與函式之間的關係。使用flask中render template,用不同的路徑,返回首頁 登入員 註冊頁。用檢視函式反轉得到url,完成導航條裡的鏈結。from flask import flask,render tem...
開始Flask專案
新建flask專案。設定除錯模式。理解flask專案主程式。使用裝飾器,設定路徑與函式之間的關係。使用flask中render template,用不同的路徑,返回首頁 登入員 註冊頁。用檢視函式反轉得到url,完成導航條裡的鏈結。from flask import flask,render tem...
Flask練手專案《愛家租房》 從開始 到總結
ps 有原始碼 但是都是一團糟js js 寫不到點子上 html html 跳轉異常 前天 10.14 經歷了半天 修改好了登入註冊,實在是無力在繼續改下去 拿著靜態資源 去flask 進行二次開發 截止目前為止,除去登入驗證碼,和redis 快取手機驗證碼,基本功能已實現 begingithub ...