Skip to content

belongs_to in User model #308

Answered by gi0baro
josejachuf asked this question in Q&A
Discussion options

You must be logged in to vote

@josejachuf you can call define_models how many times you prefer, just define auth models ancestors before, eg:

db.define_models(MyModel)
auth = Auth(app, db, user_model=User)
db.define_models(AnotherModel)

Note: you don't need to define User model on the database since the Auth module takes care of it.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by gi0baro
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #307 on January 19, 2021 23:43.