From 50758b2dd694655b128b8f71fb994e68ac35373e Mon Sep 17 00:00:00 2001 From: Chris Wagner Date: Thu, 26 Dec 2024 17:29:11 -0800 Subject: [PATCH] Fix quickstart for flask-sqlalchemy-lite (#1047) close #1046 --- docs/quickstart.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 7cc6022c..ab50af6e 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -158,9 +158,10 @@ pure sqlalchemy (unlike Flask-SQLAlchemy). import os + from sqlalchemy.orm import DeclarativeBase from flask import Flask, render_template_string from flask_sqlalchemy_lite import SQLAlchemy - from flask_security import Security, SQLAlchemyUserDatastore, auth_required, hash_password + from flask_security import Security, FSQLALiteUserDatastore, auth_required, hash_password from flask_security.models import sqla as sqla # Create app @@ -194,11 +195,11 @@ pure sqlalchemy (unlike Flask-SQLAlchemy). sqla.FsModels.set_db_info(base_model=Model) class Role(Model, sqla.FsRoleMixin): - __tablename__ = "Role" + __tablename__ = "role" pass class User(Model, sqla.FsUserMixin): - __tablename__ = "User" + __tablename__ = "user" pass # Setup Flask-Security