iT邦幫忙

0

Python Flask 架站筆記 第3天 表單建立與資料庫連接

本堂課教如何建立表單與串接firebase的資料庫,其中要firebase拿到key才能連到自己的資料庫。
但本次的課程尚未完整完成,部分物件會在下堂課完成。

1.key.json :為金鑰
2.index.html :主頁模板
3.create_product.html : 建立表單頁
4.form_feedback.html :返回頁
5.forms.py :建立表單
6.layout.html : 框架模板
7.app.py : 主程式

https://ithelp.ithome.com.tw/upload/images/20210219/20134897nWDuwqOfpx.png

1.index.html
引用模板layout.html,目前裡面只有home和product兩個文字

https://ithelp.ithome.com.tw/upload/images/20210219/20134897sDiYGPRqAh.png

2.create_product.html
設定輸入表單的頁面

上面引用模板,基本上所有頁面的上方都引用模板都會長一樣的,下面就是刻每一個輸入的輸入框,並有些限制只能輸入數字。

https://ithelp.ithome.com.tw/upload/images/20210219/20134897dqhCY3qiIP.png

老師本堂課程花很多的時間在串接firebase,但該步驟我跳過所以進度很少,下堂課見了^^。

PS.

https://console.firebase.google.com/

https://picsum.photos/


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言