-
-
Save katie7r/535e12b556c220ca9fff5200f1e6a6b6 to your computer and use it in GitHub Desktop.
Flask-Bitmapist - example Flask app with Flask-Login
This file contains 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
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) |
This file contains 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
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