1
0
Fork 0

上传文件至 'app'

Bug422-XuXing
徐幸 2022-06-14 15:58:21 +08:00
parent 9e36644215
commit 22775f9797
1 changed files with 27 additions and 0 deletions

View File

@ -22,6 +22,20 @@ path_prefix = '/var/www/wordfreq/wordfreq/'
path_prefix = './' # comment this line in deployment
#@userService.route("/<username>/reset", methods=['GET', 'POST'])
#def user_reset(username):
#'''
#用户界面
#:param username: 用户名
#:return: 返回页面内容
#'''
# if request.method == 'GET':
# session['articleID'] = None
# return redirect(url_for('user_bp.userpage', username=username))
# else:
# return 'Under construction'
@userService.route("/<username>/reset", methods=['GET', 'POST'])
def user_reset(username):
'''
@ -29,12 +43,25 @@ def user_reset(username):
:param username: 用户名
:return: 返回页面内容
'''
session['temp'] = session.get('articleID')
if request.method == 'GET':
session['articleID'] = None
return redirect(url_for('user_bp.userpage', username=username))
else:
return 'Under construction'
@userService.route("/<username>/back", methods=['GET'])
def user_back(username):
'''
用户界面
:param username: 用户名
:return: 返回页面内容
'''
if request.method == 'GET':
session['articleID'] = session.get('temp')
return redirect(url_for('user_bp.userpage', username=username))
@userService.route("/<username>/<word>/unfamiliar", methods=['GET', 'POST'])
def unfamiliar(username, word):