Part 3: Baby flask app with postgres db deployed on Heroku
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

#--------------------------------------------------- #PART THREE: Not so fast, yet another Flask Tutorial

AnotherForm_deployed #---------------------------------------------------

This is yet another Flask tutorial in the world, but...I don't jump from hello world to deployment. My aim was to explain the hidden brain of flask a bit more pedantically for newbies and none software developers.

This code belongs to the tutorial katya_flask_tutorial

Part One uses:

Part Two uses:

Part Three uses:

The app is deployed to:

In this section we will deploy this small but not simple app to Heroku. A number of steps (more detailed list is in steps.txt) to do this are infront of us: -Creating a file to pull global vars connecting to Heroku db instance

-Setting up an account, app, and DB on Heroku

-Creating Procfile to tell Heroku how to run stuff

-Creating pgsql files to create tables

-Replacing db connections with those on Heroku

-Spin up a DB on Heroku

-For the purposes of live Python meetup tutorial December 17, 2016, we'll be going through these step-by-step.

#Here's what our new file structure looks like now locally, which will get pushed to Git and automatically deployed to Heroku:

├── .gitignore              # So that we don't commit compiled files or our environment passwords
├── Procfile                # Use the Procfile to tell Heroku how to run various pieces of your app
├── .env                    # So that we don't commit compiled files or our environment passwords
├──               # This will be how to test/run the app & have basic info
├── requirements.txt        # These are the dependencies that you need to install for the app to run
├── runtime.txt        	  # Tells Heroku to run in python 3.5.2
├──  				  # Runs the app!
├── test.csv                # sample csv to load
├──  Form/                  # Everything our app includes is inside this folder
│   ├──        # App-wide setup. Called by ``
│   ├──          # Configuration Files. i.e. Login related things. Pulls from .env
│   ├──           # All the view routes
│   ├── # All the view routes
│   ├──           # Folder for any data we might want to use
│   ├──  templates/         # HTML files go here
│   │   ├──  index.html     # JavaScript & HTML
│   ├──  scripts/           # Postgres database creation scripts 
│   │   ├──  test.pgsql     # Test pgsql

-The cat.jpg, steps.tex, and are anciallary to the app