Flaskr tutorial, doing databases
Added view functions