Skip to content

Instantly share code, notes, and snippets.

@katie7r

katie7r/app.py Secret

Last active Sep 12, 2016
Embed
What would you like to do?
Flask-Bitmapist - example Flask app with Flask-Login
from flask import Flask
from flask_bitmapist import FlaskBitmapist
from flask_login import LoginManager
app = Flask(__name__)
# Initialize Flask-Login with the Flask app
login_manager = LoginManager()
login_manager.init_app(app)
# Initialize Flask-Bitmapist with the Flask app
flaskbitmapist = FlaskBitmapist()
flaskbitmapist.init_app(app)
from flask_login import UserMixin, login_user, logout_user
class User(UserMixin):
pass
user = User() # needs id
login_user(user)
logout_user()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment