From 2a553e0f8f91f6d0b3d625edbc2a45afb8da806f Mon Sep 17 00:00:00 2001
From: Lan Hui <1348141770@qq.com>
Date: Thu, 21 Jul 2022 22:17:50 +0800
Subject: [PATCH] Use a better variable name.
---
app/templates/userpage_get.html | 4 ++--
app/user_service.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/templates/userpage_get.html b/app/templates/userpage_get.html
index 9eecbd2..be503e6 100644
--- a/app/templates/userpage_get.html
+++ b/app/templates/userpage_get.html
@@ -29,8 +29,8 @@
{{ flashed_messages|safe }}
下一篇 Next Article
- {% if session.get('articleID') != session.get('temp') %}
- {% if session.get('temp') != None %}
+ {% if session.get('articleID') != session.get('old_articleID') %}
+ {% if session.get('old_articleID') != None %}
上一篇 Previous Article
{% endif%}
{% endif %}
diff --git a/app/user_service.py b/app/user_service.py
index f758f77..7ae608a 100644
--- a/app/user_service.py
+++ b/app/user_service.py
@@ -29,7 +29,7 @@ def user_reset(username):
:param username: 用户名
:return: 返回页面内容
'''
- session['temp'] = session.get('articleID')
+ session['old_artcileID'] = session.get('articleID')
if request.method == 'GET':
session['articleID'] = None
return redirect(url_for('user_bp.userpage', username=username))
@@ -44,7 +44,7 @@ def user_back(username):
:return: 返回页面内容
'''
if request.method == 'GET':
- session['articleID'] = session.get('temp')
+ session['articleID'] = session.get('old_artcileID')
return redirect(url_for('user_bp.userpage', username=username))