예제 #1
0
파일: views.py 프로젝트: lagougou/flask
def confirm(token):
    if current_user.confirm(token):
        flash('You have confirmed your account. Thanks!')

    else:
        flash('The confirmation link is invalid or has expired.')
    return redirect(url_for('main.index'))
예제 #2
0
def confirm_change_email(email, token):
    if current_user.confirm(token):
        current_user.change_email(email)
        flash('You changed your email address')
    else:
        flash('The confirmation link is invalid or has expired')
    return redirect(url_for('index'))
예제 #3
0
파일: views.py 프로젝트: brantonb/cbbpoll
def confirm(token):
    if current_user.confirm(token):
        print(current_user.email)
        flash('You have successfully confirmed your email address.  Thanks!', 'success')
    else:
        flash('The confirmation link is invalid or has expired.', 'danger')
    return redirect(url_for('index'))
예제 #4
0
파일: auth.py 프로젝트: sumandeng/fanclley
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash(u'你的帐户已确认.')
    else:
        flash(u'确认链接已失效.')
    return redirect(url_for('main.index'))
예제 #5
0
파일: views.py 프로젝트: yelongyu/chihu
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('邮箱确认成功!请登录。')
    else:
        flash('邮箱确认链接有误或已失效!请重新确认。')
    return redirect(url_for('main.index'))
예제 #6
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('你已经确认过邮件了,谢谢!')
    else:
        flash('认证链接无效或已过期。')
    return redirect(url_for('main.index'))
예제 #7
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash(u'您的账户已确认。')
    else:
        flash(u'确认链接非法或者已过期。')
    return redirect(url_for('main.index'))
예제 #8
0
def confirm(token):
    if current_user.confirmed:  # "confirmed" here is database field.
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash("You have confirmed your account, thanks!")
    else:
        flash("You confirmation link is not yet validated or expired")
    return redirect(url_for('main.index'))
예제 #9
0
파일: views.py 프로젝트: chenxi6996/myblog
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('您的账户已经认证!')
    else:
        flash('认证链接已经失效!')
    return redirect(url_for('main.index'))
예제 #10
0
파일: views.py 프로젝트: doocan/zuixinke
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash(u'帐号已确认')
    else:
        flash(u'链接无效或者已超时')
    return redirect(url_for('main.index'))
예제 #11
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('账户确认成功!')
    else:
        flash('确认链接无效或已超时')
    return redirect(url_for('main.index'))
예제 #12
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('你已经确认,谢谢!')
    else:
        flash('确认链接已经失效。')
    return redirect(url_for('main.index'))
예제 #13
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('index'))
    if current_user.confirm(token):
        flash('Вы успешно подтвердили свой аккаунт. Спасибо!')
    else:
        flash('Проверочная сслыка неверна или истекло время ожидания.')
    return redirect(url_for('index'))
예제 #14
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash(u'你已经确认你的账号,谢谢!')
    else:
        flash(u'确认链接非法或者已经失效')
    return redirect(url_for('main.index'))
예제 #15
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('您已经确认了您的账户,多谢!')
    else:
        flash('您的连接不可用或者已失效。')
    return redirect(url_for('main.index'))
예제 #16
0
파일: controller.py 프로젝트: bajief/malice
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('malice.index'))
    if current_user.confirm(token):
        flash('You have confirmed your account. Thanks!', 'warning')
    else:
        flash('The confirmation link is invalid or has expired.', 'warning')
    return redirect(url_for('malice.index'), code=307)
예제 #17
0
def confirm(token):
    if current_user.confirmed:  # User obj has been loaded in route /login
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('你的账户已经激活')
    else:
        flash('激活链接无效或已过期')
    return redirect(url_for('main.index'))
예제 #18
0
파일: views.py 프로젝트: baizhan/flask-web
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('您已经确认过邮箱了!谢谢!')
    else:
        flash('链接失效或已过期!')
    return redirect(url_for('main.index'))
예제 #19
0
def confirm(token):
	if current_user.confirmed:#避免重复点击邮件链接的确认
		return redirect(url_for('main.index'))
	if current_user.confirm(token):
		flash(u'账号验证完成')
	else:
		flash(u'错误的验证链接或链接已失效')
	return redirect(url_for('main.index'))
예제 #20
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.show_landing_page'))
    if current_user.confirm(token):
        flash('Account confirmed -- Thanks!')
    else:
        flash('The confirmation link is invalid or expired.')
    return redirect(url_for('main.show_landing_page'))
예제 #21
0
파일: views.py 프로젝트: hellckt/SONGXUE
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash(u'你已经验证你的邮箱。谢谢!')
    else:
        flash(u'该确认链接错误或者已失效。')
    return redirect(url_for('main.index'))
예제 #22
0
파일: views.py 프로젝트: Lijin111/Flasky-1
def confirm(token):
    if current_user.confirmed:      #对于已经验证的用户,忽略,返回主页
        return redirect(url_for('main.index'))
    if current_user.confirm(token):     #对于未验证用户,根据验证结果返回信息
        flash('您成功验证了您的邮箱,谢谢!')
    else:
        flash('链接无效或者过期.')
    return redirect(url_for('main.index'))   #返回主页
예제 #23
0
파일: views.py 프로젝트: UNEIEI/meiyoublog
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash(u'成功验证你的账户!')
    else:
        flash(u'验证连接无效或者已过期')
    return redirect(url_for('main.index'))
예제 #24
0
파일: views.py 프로젝트: yuzhou6/myflask
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash(u'你已经确认你的账号,谢谢!')
    else:
        flash(u'确认链接非法或者已经失效')
    return redirect(url_for('main.index'))
예제 #25
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('Your account has been confirmed')
    else:
        flash(u'认证失败,请重新认证')
    return redirect(url_for('main.index'))
예제 #26
0
파일: views.py 프로젝트: caser789/xblog
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash(u'您的账号已验证')
    else:
        flash(u'验证链接无效或者已过期,请重新验证')
    return redirect(url_for('main.index'))
예제 #27
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash(u'你已验证账户,谢谢!')
    else:
        flash(u'认证地址不可用,或者已过期')
    return redirect(url_for('main.index'))
예제 #28
0
파일: cstcmp.py 프로젝트: coolplay/cstcmp
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('index'))
    if current_user.confirm(token):
        flash('Account has been confirmed.')
    else:
        flash('Token invalid or expires.')
    return redirect(url_for('index'))
예제 #29
0
파일: views.py 프로젝트: lianshitong/learn
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('账号已激活,感谢您的注册')
    else:
        flash('激活失败。链接错误或者失效')
    return redirect(url_for('main.index'))
예제 #30
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('Вы подтвердили свой email. Большое спасибо', 'success')
    else:
        flash('Ваша ссылка устарела, попробуйте ещё раз.', 'warning')
    return redirect(url_for('main.index'))
예제 #31
0
파일: views.py 프로젝트: lpwm/zhihufake
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('您已经确认了你的帐号。谢谢!')
    else:
        flash('确认链接不可用或已经过期!')
    return redirect(url_for('main.index'))
예제 #32
0
파일: views.py 프로젝트: DdragonEver/jxnugo
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('trade.trade_list'))
    if current_user.confirm(token):
        flash(u'恭喜您完成账户验证')
    else:
        flash(u'验证信息已过期,请申请系统重新发送邮件')
    return redirect(url_for('trade.trade_list'))
예제 #33
0
파일: controller.py 프로젝트: zippav/malice
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('malice.index'))
    if current_user.confirm(token):
        flash('You have confirmed your account. Thanks!', 'warning')
    else:
        flash('The confirmation link is invalid or has expired.', 'warning')
    return redirect(url_for('malice.index'), code=307)
예제 #34
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('您已经确认了你的邮件,欢迎')
    else:
        flash('您的邮件无效或过期')
    return redirect(url_for('main.index'))
예제 #35
0
파일: views.py 프로젝트: eltonto187/flaskr
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('你已经激活你的账户,谢谢!')
    else:
        flash('这个确认链接无效或已经过期。')
    return redirect(url_for('main.index'))
예제 #36
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('邮箱已被验证,谢谢!')
    else:
        flash('链接已超时.')
    return redirect(url_for('main.index'))
예제 #37
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('你已经确认您的帐户。谢谢!')
    else:
        flash('确认链接无效或已过期。')
    return redirect(url_for('main.index'))
예제 #38
0
파일: views.py 프로젝트: Matrixes/zuixinke
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash(u'帐号已确认')
    else:
        flash(u'链接无效或者已超时')
    return redirect(url_for('main.index'))
예제 #39
0
def confirm(token):  #验证邮箱
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('你已成功验证邮箱,谢谢')
    else:
        flash('此验证信息无效或已过期')
    return redirect(url_for('main.index'))
예제 #40
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('你已经验证了你的账户。谢谢!')
    else:
        flash('这个验证链接是无效的或者已经泄漏。')
    return redirect(url_for('main.index'))
예제 #41
0
파일: views.py 프로젝트: richgieg/flask-now
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash_it(AuthMessages.ACCOUNT_CONFIRMED)
    else:
        flash_it(AuthMessages.INVALID_CONFIRMATION_LINK)
    return redirect(url_for('main.index'))
예제 #42
0
파일: views.py 프로젝트: whisperbot/webblog
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('You have confirm your account. Thanks!')
    else:
        flash('The confirmation link is invalid or has expired.')
    return redirect(url_for('main.index'))
예제 #43
0
def confirm(token):
    if current_user.confirmed:  #对于已经验证的用户,忽略,返回主页
        return redirect(url_for('main.index'))
    if current_user.confirm(token):  #对于未验证用户,根据验证结果返回信息
        flash('您成功验证了您的邮箱,谢谢!')
    else:
        flash('链接无效或者过期.')
    return redirect(url_for('main.index'))  #返回主页
예제 #44
0
파일: views.py 프로젝트: yyt030/badou.com
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for("main.index"))
    if current_user.confirm(token):
        flash(u"你已确认")
    else:
        flash(u"确认链接已过期")
    return redirect(url_for("main.index"))
예제 #45
0
파일: auth.py 프로젝트: gudabai/fanclley
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash(u'你的帐户已确认.')
    else:
        flash(u'确认链接已失效.')
    return redirect(url_for('main.index'))
예제 #46
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('Your account has been confirmed')
    else:
        flash(u'认证失败,请重新认证')
    return redirect(url_for('main.index'))
예제 #47
0
파일: views.py 프로젝트: chaonet/flask_blog
def confirm(token):
    if current_user.confirmed: # 检查状态是否是 已经确认
        return redirect(url_for('main.index')) # 直接重定向到主页
    if current_user.confirm(token): # 令牌确认,完全在 User 模型中完成,视图函数只需调用 confirm() 方法,完成对用户的状态属性 转换。
        flash('You have confirmed your account. Thanks!')  # 完成账号确认,状态
    else:
        flash('The confirmation link is invalid or has expired.') # 连接无效 或 超时。需要重发确认邮件……
    return redirect(url_for('main.index'))
예제 #48
0
파일: views.py 프로젝트: khalily/myblog
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash("you have confirm your account")
    else:
        flash("Invalidated confirm")
    return redirect(url_for('main.index'))
예제 #49
0
파일: front.py 프로젝트: finron/finepy
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('.index'))
    if current_user.confirm(token):
        flash(u'已验证邮箱,谢谢')
    else:
        flash(u'验证邮箱链箱无效或已失效')
    return redirect(url_for('.index'))
예제 #50
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('你的账户已经确认!', "success")
    else:
        flash('你的确认链接已经超时.', "danger")
    return redirect(url_for('main.index'))
예제 #51
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('您已经确认了你的邮件,欢迎')
    else:
        flash('您的邮件无效或过期')
    return redirect(url_for('main.index'))
예제 #52
0
파일: views.py 프로젝트: guo-ge/hellowor1d
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('您已成功确认帐户,么么哒~')
    else:
        flash('非法的确认链接或者已经失效!')
    return redirect(url_for('main.index'))
예제 #53
0
def confirm(token):
    if current_user.confirmed:  # User obj has been loaded in route /login
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('你的账户已经激活', category='success')
    else:
        flash('激活链接无效或已过期', category='danger')
    return redirect(url_for('main.index'))
예제 #54
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('您已经确认了你的帐号。谢谢!')
    else:
        flash('确认链接不可用或已经过期!')
    return redirect(url_for('main.index'))
예제 #55
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('You have confirmed you account! You may now log in.')
    else:
        flash('The confirmation link you used is invalid or has expired.')
    return redirect(url_for('main.index'))
예제 #56
0
파일: views.py 프로젝트: richlyon/flasky
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for("main.index"))
    if current_user.confirm(token):
        flash("You have confirmed your account. Thanks!")
    else:
        flash("The confirmation link is invalid or has expired.")
    return redirect(url_for("main.index"))
예제 #57
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash('您的账户已验证,enjoy it!')
    else:
        flash('验证链接无效或已过期.')
    return redirect(url_for('main.index'))
예제 #58
0
def confirm(token):#这个token是由register函数传给用户的email中的链接,即本链接所指的本路由
	if current_user.confirmed:#current_user是指当前登录的用户
		return redirect(url_for('main.index'))
	if current_user.confirm(token):
		flash('You have confirmd your account. Thanks!')
	else:
		flash('The confirmation link is invalid or has expired.')
	return redirect(url_for('main.index'))
예제 #59
0
def confirm(token):
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    if current_user.confirm(token):
        flash(u'您的邮箱已经激活!')
    else:
        flash(u'激活链接已经过期或无效!')
    return redirect(url_for('main.index'))