Closed cloudiirain closed 7 years ago
Jesus fucking christ that's a terrible reasoning to switch away from Flask-SQLAlchemy.
If you have a circular import in that case, fix your design, don't switch away from a library.
Oh, and db.Model
is a declarative base.
What's the point in rebasing while a PR is still under development? You rebase it once it's been approved prior to accepting...
Commit is rebased. PR description is updated with a better summary.
In addition, I've addressed/fixed the suggestions by @SunDwarf and @ccubed.
Made all changes recommended by @zelya and updated PR.
Rebased as per @ccubed's request. A more detailed history of individual commits can be found here.
Summary of Changes:
Dependencies:
Changes to Application Structure/Organization:
views.py
was split into__init__.py
(for startup code) andviews.py
(for base routes). The app should be started by a script outside of the main package (e.g. runserver.py).manage.py runserver
to start app. Manage.py (from Flask-Script) was added to perform/automate all of the necessary database initializations, migrations, etc. This strategy adopted from @SunDwarf's kcsrv repo.Major Changes:
models/
was created (SQLAlchemy), and very minimalistic models were made for:api/v1/
was created (Flask-RESTful), and functioning but minimalistic endpoints were made:Memos on Added Extensions:
Flask-SQLAlchemy
Flask-RESTful
Flask-Migrate