mirror of
https://github.com/Project-Redacted/Highscores-Server.git
synced 2025-05-29 14:33:13 +00:00
Sassy
This commit is contained in:
parent
62945c943d
commit
ebdef07840
7 changed files with 222 additions and 127 deletions
|
@ -1,6 +1,7 @@
|
|||
from flask import Flask
|
||||
from flask_assets import Bundle
|
||||
from server.extensions import db, migrate, cache, assets
|
||||
from server.extensions import db, migrate, cache, assets, login_manager
|
||||
from server.models import Users
|
||||
from server import views, auth
|
||||
|
||||
app = Flask(__name__)
|
||||
|
@ -12,6 +13,9 @@ migrate.init_app(app, db)
|
|||
with app.app_context():
|
||||
db.create_all()
|
||||
|
||||
login_manager.init_app(app)
|
||||
login_manager.login_view = "auth.auth"
|
||||
|
||||
assets.init_app(app)
|
||||
styles = Bundle("style.sass", filters="libsass, cssmin", output="gen/styles.css", depends="style.sass")
|
||||
assets.register("styles", styles)
|
||||
|
@ -19,3 +23,8 @@ assets.register("styles", styles)
|
|||
cache.init_app(app)
|
||||
app.register_blueprint(views.blueprint)
|
||||
app.register_blueprint(auth.blueprint)
|
||||
|
||||
|
||||
@login_manager.user_loader
|
||||
def load_user(user_id):
|
||||
return Users.query.filter_by(alt_id=user_id).first()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue