You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
551 B
Python
20 lines
551 B
Python
2 years ago
|
from quart import Blueprint, render_template, request, redirect, url_for, flash
|
||
|
from flask_login import logout_user
|
||
|
|
||
|
|
||
|
bp = Blueprint('meta', 'meta')
|
||
|
|
||
|
@bp.route('/')
|
||
|
async def index():
|
||
|
return await render_template('index.html')
|
||
|
|
||
|
|
||
|
@bp.route('/logout')
|
||
|
async def logout():
|
||
|
"""
|
||
|
Log the current user out and redirect someplace within app if needed.
|
||
|
If 'next' is in the request args and is valid route, redirect there,
|
||
|
otherwise, redirect to peel off args and go home.
|
||
|
"""
|
||
|
logout_user()
|
||
|
return redirect(url_for('meta.index'))
|