Skip to content

jiangsutx/FlaskAPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlaskAPP

This is the re-implemented code following The Flask Mega-Tutorial, which is very useful for beginners of flask, datebases or web developers.

Prerequisites

  • flask for Python HTTP server
  • flask_wtf for flask forms
  • flask_sqlalchemy for SQL and databases
  • flask_migrate for database upgrade

Structure

Run

1. Start flask server:

export FLASK_APP=./microblog.py
flask run

2. Update database structure:

export FLASK_APP=./microblog.py
flask db migrate
flask db upgrade

3. Use temporary debug email server:

python -m smtpd -n -c DebuggingServer localhost:8025

Then set up temporary server and start flask

export MAIL_SERVER=localhost
export MAIL_PORT=8025
export FLASK_APP=./microblog.py
flask run

4. Run unit test:

python tests.py

About

The Flask Mega-Tutorial

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published