Skip to content
Snippets Groups Projects
Yukun Ge's avatar
Yukun Ge authored
fe7986c9
History
Name Last commit Last update
blog
.gitignore
README.md
requirements.txt
wsgi.py

Flask - blog

Student Number: 21107895

CHECKSUM of last commit: 4ca5f6cb

URL: http://blog-21107895-cmt-120-cw-2-git-blog-21107895.apps.openshift.cs.cf.ac.uk/

Initial Project Setup Required:

to create a virtual environment (first run only)

  • on Windows:
python -m venv venv
  • on *nix:
python3 -m venv venv

to activate the environment (every startup)

  • on Windows:
venv/Scripts/activate
  • on *nix:
source venv/bin/activate

Project Dependencies

  • to install a particular library:
pip install <LIBRARY>

    e.g.: pip install flask

  • to install all dependencies recursively from requirements.txt file:
pip install -r requirements.txt
  • to see all installed dependencies in the console:
pip freeze
  • to save the project dependencies in requirements.txt file:
pip freeze > requirements.txt

Running the project

  • to run (after venv/Scripts/activate and specifying FLASK_APP=...; as well FLASK_ENV=development - if desired)
flask run