New blog software for 2018
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
.DS_Store
.gitignore
LICENSE
README.md
config.py.example
manage.py
requirements.txt
run.py

README.md

The blog software for spudz.org

Features

  • Flask Setup for expansion via MVC

    • Default site pages controlled with Flask Blueprints [app/home folder]
    • Token authentication for the API
    • DB controlled by SQLAlchemy [SQLite by default]
  • Bootstrap Theme from HTML5up

Install

I wrote this for Python 3.6.

  • git clone https://github.com/spdz/spudz_flask_2018.git
  • cd spudz_flask_2018
  • virtualenv -p python3 venv
  • source venv/bin/activate
  • pip install -r requirements.txt

To start the app use the following commands.

  • Copy config.py.example to config.py

    • Change user, passwords, and API keys according to your setup
  • You probably want to change resume.html in the folder app/templates to reflect you experiences.

  • Get your system exports in order:

    • export FLASK_APP=run.py
  • Create the DB

    • python manage.py create_db
  • Init the DB with Flask

    • flask db init
  • Perform Migrations

    • flask db migrate
  • Perform Upgrades

    • flask db upgrade
  • Create your user.

    • python manage.py create_user
  • Reset the users token while locally testing the API

    • python manage.py update_token
  • Run the app:

    • flask run

Finally, open http://127.0.0.1:5000/ in your browser of choice.

The API is based on the Flask RestPlus module.

  • To work with the API via the Swagger UI go to:
    • http://127.0.0.1:5000/api/