Created
January 2, 2019 17:23
-
-
Save okomarov/4561cb77141957cb6da0d13e52326f11 to your computer and use it in GitHub Desktop.
Excerpt from dash_on_flask/app/webapp.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Imports here | |
# .... | |
server_bp = Blueprint('main', __name__) | |
@server_bp.route('/') | |
def index(): | |
return render_template("index.html", title='Home Page') | |
@server_bp.route('/login', methods=['GET', 'POST']) | |
def login(): | |
# ... | |
@server_bp.route('/logout') | |
@login_required | |
def logout(): | |
logout_user() | |
return redirect(url_for('main.index')) | |
@server_bp.route('/register', methods=['GET', 'POST']) | |
def register(): | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment