An project template for creating a web project using Flask, Angular, and SQL Alchemy
Heavily influenced by Overholt with a couple of changes. I moved the models and services into a resources package and moved the api and frontend packages into a package named web. Mainly for organizational purposes. Also, using Click instead of Flask-Script because Click will be used in Flask 1.0. Not using Flask-Security and instead using Flask-JWT for authentication and Flask-Bouncer for authorization. I'm using postgres, but you can use any database that SQLAlchemy supports
The db commands for interacting with alembic are modified commands from Flask-Migrate updated to work with Click
$ git clone [email protected]:surgeforward/flask_angular_template.git
$ cd flask_angular_template
$ mkvirtualenv flask_angular_template
$ pip install -r requirements.txt
$ python manage.py db upgrade
$ python manage.py db seed
$ python manage.py runserver
$ celery -A project.tasks worker
Management commands can be listed with the following command:
$ python manage.py
These can sometimes be useful to manipulate data while debugging in the browser.
To create a database migration, run the following command:
$ python manage.py db migrate
Then run the upgrade command
$ python manage.py db upgrade
To run the tests use the following command:
$ nosetests