先奉上源碼
基本demo: https://github.com/SimpleBraver/python_todo_list/tree/master
可編輯demo:
https://github.com/SimpleBraver/python_todo_list_editable
運行說明
1、demo運行前,需先安裝mysql,並創建名爲todo的數據庫,名爲todo_list的數據表,如下圖。
2、mysql調用需安裝pymysql插件。可用命令安裝;也可下載後解壓,執行python setup.py install。
3、在命令行,cd到解壓後的demo目錄,執行python todo.py
4、在瀏覽器打開:http://0.0.0.0:8080/,運行如圖。