This fork was created because the original code for the angular-flask application, https://github.com/shea256/angular-flask, is not compatible with the more recent versions of angular and the new JSON API media type, as of June, 2017.
This fork includes more recent versions of the following packages:
- angular-1.6.4
- angular-resource-1.6.4
- angular-route-1.6.4
- bootstrap-3.3.7
- jquery-3.2.1
Summary of code changes:
- manage.py: revised to conform to the newer JSON API media type, 'application/vnd.api+json', for exchanging data.
- data/db_items.json: revised
- templates/index.html: revised to include angular-route.js
- static/js/app.js: revised to include the ngRoute package, which is needed for $routeProvider
- static/js/services.js: revised the Post factory object to conform to the JSON API media type.
- static/js/controllers.js: revised to format the result of the Post query properly for display.
- HTML5 mode for AngularJS routing: see https://stackoverflow.com/questions/16677528/location-switching-between-html5-and-hashbang-mode-link-rewriting
The following is from the README for the original application.
A template for building apps with an Angular frontend and a Flask / python backend.
-
clone this repo
-
install all the necessary packages (best done inside of a virtual environment)
pip install -r requirements.txt
- run the app
python runserver.py
- create and seed the db (the server must still be running, so open a new terminal window first)
python manage.py create_db && python manage.py seed_db --seedfile ./data/db_items.json
- check out your blog