-
Notifications
You must be signed in to change notification settings - Fork 308
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
Recommended way to setup SQLAlchemy #13
Comments
Hi @fraunos - But since I remember the pain of running into these issue as if it was yesterday,
It's important to understand After watching the video these should be very easy to understand:
It's hard to say anything about this without seeing the whole repo, but from the sound of it it's probably a circular import issue, like this one I would suggest you also see this video from Miguel:
There are many examples out in the wild of how this is usually done. The only weird thing is that sometimes an import needs to go at the end of the file to avoid cicular imports. Miguells' video on imports above goes deep into to the issue and will help you understand and decide how to best organize your app. Other Examples:
Up to you. |
Thanks a lot, it helped me clarify these problems |
Hi,
I'm new to Python and Flask - I'm trying to setup a db connection in a project based on this template, which is quite problematic for me. I'm following some tutorials, but some are outdated and most show only very simple setups. (http://exploreflask.com/en/latest/storing.html http://flask-sqlalchemy.pocoo.org/2.3/)
While trying to use
current_app
imported fromflask
in adb.py
file based inapp/api
I getCurrently the error I'm facing is -
I imported and initialized
flask_sqlalchemy
inapp/__init__.py
.So I've got following questions:
The text was updated successfully, but these errors were encountered: