forked from mrlan/EnglishPal
上传文件至 'app'
parent
9e36644215
commit
22775f9797
|
@ -22,6 +22,20 @@ path_prefix = '/var/www/wordfreq/wordfreq/'
|
||||||
path_prefix = './' # comment this line in deployment
|
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'])
|
@userService.route("/<username>/reset", methods=['GET', 'POST'])
|
||||||
def user_reset(username):
|
def user_reset(username):
|
||||||
'''
|
'''
|
||||||
|
@ -29,12 +43,25 @@ def user_reset(username):
|
||||||
:param username: 用户名
|
:param username: 用户名
|
||||||
:return: 返回页面内容
|
:return: 返回页面内容
|
||||||
'''
|
'''
|
||||||
|
session['temp'] = 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))
|
||||||
else:
|
else:
|
||||||
return 'Under construction'
|
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'])
|
@userService.route("/<username>/<word>/unfamiliar", methods=['GET', 'POST'])
|
||||||
def unfamiliar(username, word):
|
def unfamiliar(username, word):
|
||||||
|
|
Loading…
Reference in New Issue