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

Quickstart for sqlalchemy lite with wrong imports #1046

Closed
tillwenke opened this issue Dec 24, 2024 · 2 comments · Fixed by #1047
Closed

Quickstart for sqlalchemy lite with wrong imports #1046

tillwenke opened this issue Dec 24, 2024 · 2 comments · Fixed by #1047
Assignees

Comments

@tillwenke
Copy link

see https://flask-security-too.readthedocs.io/en/stable/quickstart.html#basic-flask-sqlalchemy-lite-application

DeclarativeBase

and

FSQLALiteUserDatastore

missing

@tillwenke
Copy link
Author

tillwenke commented Dec 25, 2024

If then imported I get

raise exc.NoReferencedTableError(
sqlalchemy.exc.NoReferencedTableError: Foreign key associated with column 'roles_users.role_id' could not find table 'role' with which to generate a foreign key to target column 'id'

when running the flask app

@jwag956
Copy link
Collaborator

jwag956 commented Dec 27, 2024

To get things working - be sure to change the tablename values to lower case "User"->"user" and "Role"->"role"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants