Bug 542

Summary: [NEW] 使用 JavaScript 的 localStorage 或 sessionStorage 来存储用户浏览过的文章
Product: EnglishPal Reporter: Hui Lan <lanhui>
Component: 改进建议Assignee: Hui Lan <lanhui>
Status: CONFIRMED ---    
Severity: enhancement    
Priority: Normal    
Version: 0.1   
Hardware: PC   
OS: Windows   
Deadline: 2023-12-31   

Description Hui Lan 2023-08-12 15:51:28 CST
目前使用的是 Flask 的 session 对象。 

感觉编程起来比较复杂。

而且,在更新程序后,原来的 session 会丢失,导致点击“下一篇文章”按钮时,会报错。


  File "./EnglishPal/app/templates/userpage_get.html", line 73, in top-level template code
    <div class="alert alert-success" role="alert">According to your word list, your level is <span class="text-decoration-underline" id="user_level">{{ '%0.1f' % today_article["user_level"] }}</span>  and we have chosen an article with a difficulty level of <span class="text-decoration-underline" id="text_level">{{ today_article["text_level"] }}</span> for you.</div>
TypeError: must be real number, not str

Hui