Skip to content

MLH-Fellowship/3.3.1.1-flask-blog

Repository files navigation

Flask-Blog

GitHub all releases GitHub code size in bytes GitHub GitHub issues GitHub forks

Introduction

Minimal Flask template to get started on your blog application for MLH Fellowship Production Engineering track.

Prerequisites and Requirements

Flask version 2.0.1
Python version 3.X

Technologies Used

Python (Flask), Bootstrap, HTML/CSS.

QuickStart Guide

Installation for Windows

Make sure you have python3 and pip installed

Create and activate virtual environment using virtualenv

$ python -m venv python3-virtualenv
$ source python3-virtualenv/bin/activate

Use the package manager pip to install all dependencies

pip install -r requirements.txt

Usage

Create a .env file using the example.env template

Start flask development server

$ export FLASK_ENV=development
$ flask run

Installation for Mac OS:

Set up Python's default version from 2.7 to 3.x

Open ~/.bash_profile file:

vi ~/.bash_profile

Then put the alias as follows:

alias python='python3'

Now save the file and then run the ~/.bash_profile file:

source ~/.bash_profile

Congratulation !!! Now, you can use python3 by typing python. Check version by running:

python --version

After setting up, make sure to run all python commands with 3. For example, instead of:

python -m venv python3-virtualenv

run:

python3 -m venv python3-virtualenv

for other versions