예제 #1
0
def send_delete_topic_email(email, topic):
    token = gen_salt(16)
    key = 'account:delete-topic:%s' % token
    redis.set(key, topic.id, ONE_DAY)
    url = full_url('account.delete_topic', token=token)
    title = 'Deteting %s' % topic.title
    text = '%s\n\n%s' % (title, url)
    run_task(send_text, email, title, text)
예제 #2
0
파일: account.py 프로젝트: Gwill/zerqu
def social_login(name):
    remote = SocialUser.get_remote_app(name)
    if not remote:
        abort(404)

    session['next_url'] = request.referrer or '/'
    callback = full_url('.social_authorize', name=name)
    return remote.authorize(callback=callback)
예제 #3
0
def send_delete_topic_email(email, topic):
    token = gen_salt(16)
    key = 'account:delete-topic:%s' % token
    redis.set(key, topic.id, ONE_DAY)
    url = full_url('account.delete_topic', token=token)
    title = 'Deteting %s' % topic.title
    text = '%s\n\n%s' % (title, url)
    run_task(send_text, email, title, text)
예제 #4
0
def social_login(name):
    remote = SocialUser.get_remote_app(name)
    if not remote:
        abort(404)

    session['next_url'] = request.referrer or '/'
    callback = full_url('.social_authorize', name=name)
    return remote.authorize(callback=callback)
예제 #5
0
def send_change_password_email(email):
    token = create_email_signature(email, 'password')
    title = 'Change password for %s' % current_app.config['SITE_NAME']
    url = full_url('account.change_password', token=token)
    text = '%s\n\n%s' % (title, url)
    run_task(send_text, email, title, text)
예제 #6
0
def send_signup_email(email):
    token = create_email_signature(email, 'signup')
    url = full_url('account.signup', token=token)
    title = 'Sign up account for %s' % current_app.config['SITE_NAME']
    text = '%s\n\n%s' % (title, url)
    run_task(send_text, email, title, text)
예제 #7
0
def send_change_password_email(email):
    token = create_email_signature(email, 'password')
    title = 'Change password for %s' % current_app.config['SITE_NAME']
    url = full_url('account.change_password', token=token)
    text = '%s\n\n%s' % (title, url)
    run_task(send_text, email, title, text)
예제 #8
0
def send_signup_email(email):
    token = create_email_signature(email, 'signup')
    url = full_url('account.signup', token=token)
    title = 'Sign up account for %s' % current_app.config['SITE_NAME']
    text = '%s\n\n%s' % (title, url)
    run_task(send_text, email, title, text)