You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a ModelSchema class in one of my folders that uses models.py from the other folder. SQLAlchemy by default solves this problem by using the string name of the class but I get circular import errors in Marshmallow SQLAlchemy. Is there a way to solve this? Or shoud I change my structure?
The text was updated successfully, but these errors were encountered:
See #143; the solution is to keep the schemas in a separate module from models and ensure that models are all initialized before schemas are initialized.
This needs to be documented better, as suggested on the linked issue.
I have a Flask app that has a structure like the following:
I have a ModelSchema class in one of my folders that uses models.py from the other folder. SQLAlchemy by default solves this problem by using the string name of the class but I get circular import errors in Marshmallow SQLAlchemy. Is there a way to solve this? Or shoud I change my structure?
The text was updated successfully, but these errors were encountered: