multiple database connection define same models? #396
erhuabushuo
started this conversation in
General
Replies: 1 comment
-
@erhuabushuo it's not supported, as you can call the model class directly (eg: You can, thus, define your common model as a class, and then inherit, eg: class Todo(Model):
...
class TodoA(Todo):
tablename = "todos"
class TodoB(Todo):
tablename = "todos"
db1.define_models(TodoA)
db2.define_models(TodoB) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
multiple database connection define same models?
Beta Was this translation helpful? Give feedback.
All reactions