Add indexes and pagination to improve app performance
This commit is contained in:
@@ -33,7 +33,7 @@ def create_app():
|
||||
# Set up the user_loader function
|
||||
@login_manager.user_loader
|
||||
def load_user(user_id):
|
||||
return User.query.get(int(user_id)) # Query the User model by ID
|
||||
return db.session.get(User, int(user_id))
|
||||
|
||||
# Register blueprints
|
||||
from app.routes.auth import auth
|
||||
|
||||
Reference in New Issue
Block a user