National Kaohsiung University of Hospitality and Tourism
Uedu Main Site
Explore Uedu
Student Console
Register as Member/Login
Research Informed Consent Center
Survey Center
Educational Big Data Challenge
Claim or create a course
Try an AI Scenario Task
Support & Messages
Uptime Data

UeduGPTs

--

Jupyters

3

Local AI

--

Uedu Code

--

高餐大 AQI 92 26°C PM2.5 31
AI Reply Desktop Notifications

Show a desktop notification when the AI TA finishes replying

Chat Message Notifications

Notify me when classmates post messages in the forum

Sound notification

Play an alert sound whenever there is a new notification

後端開發

20 堂互動課:瀏覽器和伺服器怎麼對話、Flask 的路由與請求回應、Jinja2 模板與表單、用 SQLite 存資料、設計 REST API、Cookie、Session 與登入、權限與常見攻擊的防護,最後寫測試、部署上線、完成一個小型網站。範例是真的 Flask,在你的瀏覽器裡執行:可以逐步看一個請求怎麼走進你的函數,也可以改程式、在模擬瀏覽器裡操作網站、查看資料庫。建議先學過 Python 軌前 15 課;會一點 HTML 與 SQL 更好,但不是必要條件。
20 堂課 approx. 9.8 hour(s)

學習路徑

  1. 01
    網頁的運作方式
    瀏覽器、伺服器與 HTTP:請求與回應的內容
    Interaction實作 20 minute(s)
  2. 02
    第一個 Flask 程式
    虛擬環境、安裝、路由與 view 函數的本機執行
    Interaction實作導覽 25 minute(s)
  3. 03
    路由與動態網址
    網址裡的變數、型別轉換、HTTP 方法與 url_for
    Interaction實作 25 minute(s)
  4. 04
    讀取請求的內容
    request 物件:查詢字串、表單、JSON、標頭
    Interaction實作 25 minute(s)
  5. 05
    回應與請求勾點
    狀態碼、標頭、轉址、abort、before_request 與 g
    Interaction實作 25 minute(s)
  6. 06
    Jinja2 模板基礎
    HTML 與程式的分離:變數、過濾器、判斷、迴圈與自動跳脫
    Interaction實作 25 minute(s)
  7. 07
    版型與靜態檔案
    模板繼承、include、巨集、CSS 與圖片、自訂錯誤頁
    Interaction實作 25 minute(s)
  8. 08
    表單與驗證
    接收表單、檢查輸入、重新顯示錯誤、送出後轉址
    Interaction實作 30 minute(s)
  9. 09
    連接資料庫
    sqlite3、每個請求一條連線、參數化查詢
    Interaction實作 30 minute(s)
  10. 10
    新增、查詢、修改與刪除的實作
    留言板實作:CRUD 對應的路由、交易與查無資料的處理
    Interaction實作 30 minute(s)
  11. 11
    設計 REST API
    資源、方法、狀態碼與 JSON 回應
    Interaction實作導覽 30 minute(s)
  12. 12
    API 的驗證、分頁與錯誤格式
    檢查輸入、統一的錯誤格式、分頁與篩選
    Interaction實作 30 minute(s)
  13. 13
    前端呼叫 API
    fetch 取得資料與更新畫面、同源政策與 CORS
    Interaction實作 30 minute(s)
  14. 14
    Cookie 與 Session
    HTTP 的無狀態、Cookie 的運作方式與 Flask Session 的簽章
    Interaction實作 30 minute(s)
  15. 15
    註冊與登入
    密碼雜湊、登入與登出、login_required 裝飾器
    Interaction實作 30 minute(s)
  16. 16
    權限與資料的擁有者
    401 與 403、角色、隱藏按鈕的不足
    Interaction實作 30 minute(s)
  17. 17
    常見攻擊與防護
    SQL 注入、XSS、CSRF,以及金鑰與除錯模式
    Interaction實作 35 minute(s)
  18. 18
    專案結構與自動測試
    應用程式工廠、藍圖、設定檔與 pytest
    Interaction實作 35 minute(s)
  19. 19
    部署上線
    requirements、環境變數、Gunicorn、Nginx 與 HTTPS
    Interaction實作導覽 30 minute(s)
  20. 20
    專題:小型課程討論區
    路由、模板、資料庫、API、登入與權限的整合
    Interaction實作 45 minute(s)