Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix quickstart for flask-sqlalchemy-lite #1047

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading