1
0
Fork 0

Use a better variable name.

Bug422-XuXing
Lan Hui 2022-07-21 22:17:50 +08:00
parent 4513a80bdd
commit 2a553e0f8f
2 changed files with 4 additions and 4 deletions

View File

@ -29,8 +29,8 @@
{{ flashed_messages|safe }}
<a class="btn btn-success" href="/{{ username }}/reset" role="button"> 下一篇 Next Article </a>
{% 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 %}
<a class="btn btn-success" href="/{{ username }}/back" role="button"> 上一篇 Previous Article </a>
{% endif%}
{% endif %}

View File

@ -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))