コード例 #1
0
ファイル: views.py プロジェクト: agmenut/sabotage2_revamp
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_mail(current_user.email, 'Confirm your account',
              'auth/email/confirm', user=current_user, token=token)
    flash('A new confirmation email has been sent to {}.'.format(current_user.email))
    current_app.logger.info("A new confirmation email has been sent to {}.".format(current_user.email))
    return redirect(url_for('front_page.home_page'))
コード例 #2
0
ファイル: views.py プロジェクト: tanny2015/Blog_Flask
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email, 'Confirm Your Account',
               'auth/email/confirm', user = current_user, token=token)

    flash('A new confirmation email has been sent to you by email.')
    return redirect(url_for('main.index'))
コード例 #3
0
ファイル: views.py プロジェクト: brandonsato/cbbpoll
def retry_confirm():
    if current_user.emailConfirmed:
        flash('Your email address has been confirmed.', 'success')
        return redirect(url_for('index'))
    token = current_user.generate_confirmation_token()
    message.send_email('Confirm Your Account', [current_user], 'confirmation', token=token)
    flash('A new confirmation email has been sent to you. Please check your spam or junk folder.', 'info')
    return redirect(url_for('index'))
コード例 #4
0
ファイル: views.py プロジェクト: Infixz/chengs.site
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    rendered_content = render_template(
                'auth/email/confirm.html', user=current_user, token=token)
    send_email.delay(
            current_user.email, u'确认注册'.encode('utf-8'), rendered_content)
    flash(u'新的确认注册链接已经发送到你的邮箱')
    return redirect(url_for('main.index'))
コード例 #5
0
ファイル: views.py プロジェクト: ycngu/flask-blog
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               u'激活您的帐号',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash(u'激活邮件已重新发送到您的邮箱')
    return redirect(url_for('main.index'))
コード例 #6
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirm your email address.',
               'users/email/confirm',
               user=current_user,
               token=token)
    flash('New confirmation email has been sent.')
    return redirect('url_for(staff.search_title)')
コード例 #7
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               '确认您的账户',
               'confirm',
               u=current_user,
               token=token)
    flash('一封新的确认邮件已发送')
    return redirect(url_for('main.index'))
コード例 #8
0
ファイル: views.py プロジェクト: pengjinfu/blog-1
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirm your account',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('a new confirmation has been send to you by email')
    return redirect(url_for('main.index'))
コード例 #9
0
ファイル: routes.py プロジェクト: PythonBiellaGroup/SitoPGB
def resend_confirmation():
    #Token e mail
    token = current_user.generate_confirmation_token()

    send_email(current_user.email, 'Conferma il tuo account',
               '/email/confirm', user=current_user, token=token)

    flash('Una nuova mail di conferma è stata inviata', 'success')
    return redirect(url_for('main.index'))
コード例 #10
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirm your account',
               'mail/new_user',
               user=current_user,
               token=token)
    flash('已经重新发送邮件了')
    return redirect(url_for('main.index'))
コード例 #11
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirm your account',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('确认邮件已经发送到您的邮箱,请前往邮箱确认!')
    return redirect(url_for('main.index'))
コード例 #12
0
def resend_confirmation():  # 重新发送一封确认邮件
    token = current_user.generate_confirmation_token()
    send_email(to=current_user.email,
               subject='confirm you account',
               template='auth/email/confirm',
               user=current_user,
               token=token)
    flash('a new confirmation email has been sent to you email')
    return redirect(url_for('main.index'))
コード例 #13
0
ファイル: views.py プロジェクト: wangxiaoyangwz/WANG
def resend_confirmation():
    token = current_user.generate_confirmation_token()  #生成令牌
    send_email(user.email,
               "Confirm Your Account",
               'auth/email/confirm',
               user=user,
               token=token)  #发送邮件
    flash('A new confirmation email has been sent to you by email.')
    return redirect(url_for('main.index'))
コード例 #14
0
ファイル: views.py プロジェクト: WRAllen/share
def resend_confirmation():

    token = current_user.generate_confirmation_token()

    send_email(current_user.email, '确认你的账户', 'auth/email/confirm',
               current_user, token)

    flash("已经重新发送一份邮件到你的邮箱")
    return redirect(url_for('auth.unconfirmed'))
コード例 #15
0
ファイル: views.py プロジェクト: jesskarl/BOLG-python-webapp
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               u"确认你的账户",
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash(u'一封信的确认邮件已经发送到您的邮箱!(*^_^*)')
    return redirect(url_for('main.index'))
コード例 #16
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.user_email,
               '确认邮件',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('确认邮件已经发送至你的邮箱 %s。' % current_user.user_email)
    return redirect(url_for('main.index'))
コード例 #17
0
ファイル: views.py プロジェクト: HuipengXu/tjBBS
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               '账户认证',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('认证邮件已经重新发送到您的邮箱!', 'ok')
    return redirect(url_for('main.index'))
コード例 #18
0
def before_request():
    global ip 
    ip = request.remote_addr
    g.user = current_user
    if g.user is not None and current_user.is_authenticated \
            and not current_user.confirmed:
        token = current_user.generate_confirmation_token()
        current_user.confirm(token)
        return redirect(url_for('login'))
コード例 #19
0
ファイル: views.py プロジェクト: rafaeldblima/userly
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirme sua conta',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('Um novo e-mail de confirmação foi enviado para você por e-mail.')
    return redirect(url_for('main.index'))
コード例 #20
0
ファイル: views.py プロジェクト: happy-place/flasky
def resend_confirmation():  # unconfirmed页 重新发送激活邮件,然后重定向到主页,避免重复发送
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirm Your Account',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('A new confirmation email has been sent to you by email.')
    return redirect(url_for('main.index'))
コード例 #21
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirm Your Account',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash("A new confirmation email have been sent to you by email.")
    return render_template(url_for('main.index'))
コード例 #22
0
def resend_confirm_email():
    token = current_user.generate_confirmation_token()
    send_mail(current_user.email,
              '再次确认您的账户',
              'auth/emails/confirm',
              user=current_user,
              token=token)
    flash('新的确认邮件已发送')
    return redirect('main.index')
コード例 #23
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               '确认你的账号',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('一封新的确认邮件已发送至你的邮箱。')
    return redirect(url_for('main.index'))
コード例 #24
0
ファイル: views.py プロジェクト: LeeSangMin1029/FlaskProject
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirm Your Account',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('A new confirmation email has been sent to you by email.')
    return redirect(url_for('main.home'))
コード例 #25
0
ファイル: views.py プロジェクト: Vic177/Faiwong_s_blog
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               'Confirm Your Account',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash(u'带有确认信息的邮件已经发送到你的邮箱')
    return redirect(url_for('main.index'))
コード例 #26
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    rendered_content = render_template('auth/email/confirm.html',
                                       user=current_user,
                                       token=token)
    send_email.delay(current_user.email, u'确认注册'.encode('utf-8'),
                     rendered_content)
    flash(u'新的确认注册链接已经发送到你的邮箱')
    return redirect(url_for('main.index'))
コード例 #27
0
ファイル: views.py プロジェクト: zhaoxingrong/flask_movie_3
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               '确认账户',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('一封新的确认邮件已经发送, 请检查你的邮箱')
    return redirect(url_for('home.index'))
コード例 #28
0
ファイル: views.py プロジェクト: BoyceYang/LiteBlog
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               "Confirm Your Account",
               "auth/email/confirm",
               user=current_user,
               token=token)
    flash("A new confirmation email has been sent to your email")
    return redirect(url_for("main.index"))
コード例 #29
0
ファイル: views.py プロジェクト: vigotseng/flask-bms
def resend_confirm_email():
    token = current_user.generate_confirmation_token()
    email.send_email(current_user.email,
                     u'激活邮箱账号',
                     'auth/email/confirm',
                     user=current_user,
                     token=token)
    flash(u'新的激活邮件已经发送给您,请前往邮箱完成激活')
    return redirect(url_for('main.index'))
コード例 #30
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_mail(current_user.email,
              '账号激活',
              'mail/confirm',
              user=current_user,
              token=token)
    flash(u'激活邮件发送成功')
    return redirect(url_for('main.index'))
コード例 #31
0
ファイル: views.py プロジェクト: QinlinChen/StuHub
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               '激活您的账户',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('新的激活邮件已经发往到您的邮箱。')
    return redirect(url_for('main.index'))
コード例 #32
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               u'确认你的邮箱',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('A new confirmation email has been sent to you by email.')
    return redirect(url_for('main.index'))
コード例 #33
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               u'确认账户',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('一封确认邮件已经发送到你的邮箱.', "success")
    return redirect(url_for('main.index'))
コード例 #34
0
ファイル: views.py プロジェクト: jiangyanglinlan/dog_book
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email,
               '确认您的账户',
               'auth/email/confirm',
               user=current_user,
               token=token)
    flash('一个新的确认邮件已经发送到您的邮箱, 请注意查收。')
    return redirect(url_for('main.index'))
コード例 #35
0
ファイル: views.py プロジェクト: guomaoqiu/Flask_webdemo
def resend_confirmation():
    '''
    @note: 从新发送确认邮件
    '''
    token = current_user.generate_confirmation_token()

    send_email(current_user.email, 'Confirm Your Account',
               'auth/email/confirm', user=current_user, token=token)
    flash('通过电子邮件发送了一封新的确认电子邮件.','info')
    return redirect(url_for('main.index'))
コード例 #36
0
ファイル: views.py プロジェクト: Qumeric/instabattle
def resend_confirmation():
    if not current_user.confirmed:
        token = current_user.generate_confirmation_token()
        send_email(current_user.email,
                   "Confirm Your Account",
                   'auth/email/confirm',
                   user=current_user,
                   token=token)
        flash("A new confirmation email has been sent")
    return redirect(url_for('main.index'))
コード例 #37
0
ファイル: views.py プロジェクト: Git-Hexin/zhihuweb
def reconfirm():
    '''重新发送邮箱认证'''
    if current_user.confirmed:
        return redirect(url_for('main.index'))
    else:
        token = current_user.generate_confirmation_token()
        send_email(current_user.email, u'注册账户邮箱认证', '/email/register.txt',
                   user=current_user, token=token)
        flash(u'注册邮箱认证邮件已发送至您的邮箱,请前去邮箱完成注册')
    return redirect(url_for('auth.login'))
コード例 #38
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(
        to=current_user.email,
        subject='Confirm your account',
        template='auth/email/confirm',
        user=current_user,
        token=token
    )
    flash('A new confirmation email has been sent to your email account.')
    return redirect(url_for('main.index'))
コード例 #39
0
ファイル: views.py プロジェクト: abondar24/FlaskBlogging
def change_email_request():
    form = ChangeEmailForm()
    if form.validate_on_submit():
        new_email = form.email.data
        current_user.verify_password(form.password.data)
        token = current_user.generate_confirmation_token()
        send_email(new_email, "Confirm Your Account", "auth/email/change_email", user=current_user, token=token)
        flash("An email with instructions has been sent")
        return redirect(url_for("main.index"))
    else:
        flash("Invalid password")
    return render_template("auth/change_email.html", form=form)
コード例 #40
0
ファイル: views.py プロジェクト: wangrenlearn/flask
def change_email_request():
    form = ChangeEmailForm()
    if form.validate_on_submit():
        if current_user.verify_password(form.password.data):
            new_email = form.email.data
            token = current_user.generate_confirmation_token(new_email)
            send_email(new_email, '确认你的邮箱地址' \
                    'auth/email/change_email', \
                    user=current_user, token=token)
            flash('用于更改并确认新邮箱的邮件已发送至你的新邮箱。')
            return redirect(url_for('main.index'))
        else:
            flash('邮箱或密码不正确。')
    return render_template('auth/change_email.html', form=form)
コード例 #41
0
ファイル: views.py プロジェクト: ColinHaley/PTFMapper
def confirm_request():
    """Respond to new user's request to confirm their account."""
    token = current_user.generate_confirmation_token()
    confirm_link = url_for('account.confirm', token=token, _external=True)
    get_queue().enqueue(
        send_email,
        recipient=current_user.email,
        subject='Confirm Your Account',
        template='account/email/confirm',
        # current_user is a LocalProxy, we want the underlying user object
        user=current_user._get_current_object(),
        confirm_link=confirm_link)
    flash('A new confirmation link has been sent to {}.'.format(
        current_user.email), 'warning')
    return redirect(url_for('main.index'))
コード例 #42
0
ファイル: auth.py プロジェクト: Y-Lab/Y-System
def resend_confirmation():
    '''auth.resend_confirmation()'''
    token = current_user.generate_confirmation_token()
    send_email(
        recipient=current_user.email,
        subject='确认您的邮箱账户',
        template='auth/mail/confirm',
        user=current_user._get_current_object(),
        token=token
    )
    flash('一封新的确认邮件已经发送至您的邮箱', category='info')
    add_user_log(
        user=current_user._get_current_object(),
        event='请求重发邮箱确认邮件至:{}'.format(current_user.email),
        category='auth'
    )
    return redirect(url_for('auth.unconfirmed'))
コード例 #43
0
ファイル: views.py プロジェクト: marinamarina/sure-thing
def resend_verification_email():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email, 'Please, verify your account', 'auth/email/verify', user=current_user, token=token)
    flash ('Verification email has been sent to your email.')

    return redirect(url_for('main.index'))
コード例 #44
0
ファイル: views.py プロジェクト: ZAS0RIN/lbt
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email, "Confirm Your Account", "/email/cnf", token=token)
    flash("Письмо с подтверждением высланно повторно.")
    return redirect("/events")
コード例 #45
0
ファイル: decorators.py プロジェクト: AlvinRenNo1/clife
 def decorated_function(*args, **kwargs):
     if not current_user.confirmed:
         token = current_user.generate_confirmation_token()
         send_email([current_user.email], token=token)
         return render_template('auth/confirm_required.html')
     return fn(*args, **kwargs)
コード例 #46
0
ファイル: views.py プロジェクト: StitchIQ/dts_test
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email, u'确认账户',
               'auth/email/confirm', user=current_user, token=token)
    flash('一封确认邮件已经发送到你的邮箱.', "success")
    return redirect(url_for('main.index'))
コード例 #47
0
ファイル: views.py プロジェクト: yuyanqiuqiu/flaskblog
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email, 'Confirm your account',
               'auth/email/confirm', user=current_user, token=token)
    flash(u'已经发送一封邮件到您的邮箱,请登录邮箱进行确认')
    return redirect(url_for('main.index'))
コード例 #48
0
ファイル: views.py プロジェクト: jesskarl/BOLG-python-webapp
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email, u"确认你的账户",
               'auth/email/confirm', user=current_user, token=token)
    flash(u'一封信的确认邮件已经发送到您的邮箱!(*^_^*)')
    return redirect(url_for('main.index'))
コード例 #49
0
ファイル: views.py プロジェクト: Limpan/bytardag
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    from ..email import send_email
    send_email.delay(current_user.email, 'Bekräfta din epostadress', 'main/email/confirm', token=token)
    flash('Ett nytt bekräftelsemail har skickats.')
    return redirect(url_for('main.index'))
コード例 #50
0
ファイル: views.py プロジェクト: python-0/flask_blog
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_mail(current_user.email, "Confirm Your Account", "auth/email/confirm", user=current_user, token=token)
    flash("A new confirmation email has been sent to you by email")
    return redirect(url_for("main.index"))
コード例 #51
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.login_email, 'Your email is used to register a joyTu.be account. Please confirm',
               'auth/email/confirm', user=current_user, token=token)
    flash('A new confirmation email has been sent to your registered email.')
    return redirect(url_for('main.index'))
コード例 #52
0
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email, '确认账户',
               'auth/email/confirm', user=current_user, token=token)
    flash('咱寄出了一封确认账户的电子邮件呐~去看看汝的收件箱呗.')
    return redirect(url_for('main.index'))
コード例 #53
0
ファイル: views.py プロジェクト: wangrenlearn/flask
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email, 'Confirm Your Account',
            'auth/email/confirm', user=current_user, token=token)
    flash('新的认证邮件已发送到你的邮箱。')
    return redirect(url_for('main.index'))
コード例 #54
0
ファイル: views.py プロジェクト: polyval/HUSTRunner
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email, u'邮箱验证', 'auth/email/confirm', user=current_user, token=token)
    flash(u'新的验证邮件已发送到您的邮箱')
    return redirect(url_for('main.index'))
コード例 #55
0
ファイル: views.py プロジェクト: TaiyuanHot/blog
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email, '帐号确认', 'auth/email/confirm', user=current_user, token=token)
    flash('一封确认邮件已经发往你的邮箱')
    return redirect(url_for('main.index'))
コード例 #56
0
ファイル: views.py プロジェクト: zkwolf/zk-blog
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email, "Confirm Your Account", "auth/email/confirm", user=current_user, token=token)
    flash("激活邮件已邮递到您的信箱.")
    return redirect(url_for("main.index"))
コード例 #57
0
ファイル: views.py プロジェクト: dannyX21/twittec
def resend_confirmation():
    token = current_user.generate_confirmation_token()
    send_email(current_user.email, 'Confirm Your Account',
               'auth/email/confirm', user=current_user, token=token)
    flash('Se envio un nuevo correo de confirmacion a tu direccion de Email.')
    return redirect(url_for('main.index'))
コード例 #58
0
ファイル: views.py プロジェクト: stormlands/zhihu
def resend_confirmation():
	token = current_user.generate_confirmation_token()
	send_email()
	flash('A new confirmation email has been sent to you by email.')
	return redirect(url_for('main.index'))