Use a better variable name.
parent
4513a80bdd
commit
2a553e0f8f
|
@ -29,8 +29,8 @@
|
||||||
{{ flashed_messages|safe }}
|
{{ flashed_messages|safe }}
|
||||||
|
|
||||||
<a class="btn btn-success" href="/{{ username }}/reset" role="button"> 下一篇 Next Article </a>
|
<a class="btn btn-success" href="/{{ username }}/reset" role="button"> 下一篇 Next Article </a>
|
||||||
{% if session.get('articleID') != session.get('temp') %}
|
{% if session.get('articleID') != session.get('old_articleID') %}
|
||||||
{% if session.get('temp') != None %}
|
{% if session.get('old_articleID') != None %}
|
||||||
<a class="btn btn-success" href="/{{ username }}/back" role="button"> 上一篇 Previous Article </a>
|
<a class="btn btn-success" href="/{{ username }}/back" role="button"> 上一篇 Previous Article </a>
|
||||||
{% endif%}
|
{% endif%}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -29,7 +29,7 @@ def user_reset(username):
|
||||||
:param username: 用户名
|
:param username: 用户名
|
||||||
:return: 返回页面内容
|
:return: 返回页面内容
|
||||||
'''
|
'''
|
||||||
session['temp'] = session.get('articleID')
|
session['old_artcileID'] = session.get('articleID')
|
||||||
if request.method == 'GET':
|
if request.method == 'GET':
|
||||||
session['articleID'] = None
|
session['articleID'] = None
|
||||||
return redirect(url_for('user_bp.userpage', username=username))
|
return redirect(url_for('user_bp.userpage', username=username))
|
||||||
|
@ -44,7 +44,7 @@ def user_back(username):
|
||||||
:return: 返回页面内容
|
:return: 返回页面内容
|
||||||
'''
|
'''
|
||||||
if request.method == 'GET':
|
if request.method == 'GET':
|
||||||
session['articleID'] = session.get('temp')
|
session['articleID'] = session.get('old_artcileID')
|
||||||
return redirect(url_for('user_bp.userpage', username=username))
|
return redirect(url_for('user_bp.userpage', username=username))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue