代码拉取完成,页面将自动刷新
serverpython
是一个基于 Flask 框架开发的 Python 项目,主要用于管理用户信息和日语单词数据。项目使用 SQLite 数据库存储数据,提供了用户和单词的增删改查接口,同时支持通过网页进行单词的添加、筛选和背诵练习等功能。
words
表中的所有项目添加 add_time
和 last_test_time
两个属性。add_time
和 last_test_time
的格式为 时间戳 类型,并在前端渲染界面上以 日期格式展示。learn_by_chinese
和 learn_by_meaning
页面添加更新last_test_time
的功能。├── README.en.md
├── README.md
├── app.py
├── database.py
├── user_routes.py
├── word_routes.py
├── learn_routes.py
├── example.db
├── import_excel_to_sqlite.py
├── static
│ └── script.js
├── templates
│ ├── addword.html
│ ├── edit_word.html
│ ├── index.html
│ ├── learn_by_chinese.html
│ ├── learn_by_meaning.html
│ ├── navbar.html
│ ├── word_list.html
│ └── wrong_book.html
└── update_words_time.py
pip install flask pandas
app.py
中的 init_db()
函数,或者在 Python 交互式环境中执行以下代码:from app import init_db
init_db()
python app.py
http://127.0.0.1:5000
进入项目主页。/users
接口,或者使用前端页面进行添加。/words
接口,或者访问 /addword
页面进行添加。/word_list
页面,可以根据条件筛选单词。/learn_by_chinese
或 /learn_by_meaning
页面进行日语单词背诵练习。Feat_xxx
分支。import_excel_to_sqlite.py
脚本将 Excel 文件中的单词数据导入到数据库中。python import_excel_to_sqlite.py <excel_file_path>
update_words_time.py
脚本给 words
表中的所有项目添加 add_time
和 last_test_time
两个属性。python update_words_time.py
import_excel_to_sqlite.py
脚本时,请将 <excel_file_path>
替换为实际的 Excel 文件路径。(!https://max.book118.com/html/2021/1023/7003165161004025.shtm)单词网址
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。