Give your app the ability to create, read, update, and delete database objects.

This is Part 6 of a series of articles that will walk you through the basics of Flask Web Development by developing and hosting a simple CRUD application.

This series is split into 6 parts:

  1. Rendering HTML templates.
  2. Building a scaleable file structure.
  3. Configuring a database.
  4. Handling user login and registration.
  5. Adding CRUD (Create, Read, Update, Delete) functionality.

Technically we have already conquered the create and read portion of this by creating users in our database. But we will go one step further and create a new database object…


This is Part 5 of a series of articles that will walk you through the basics of Flask Web Development by developing and hosting a simple CRUD application.

This series is split into 6 parts:

  1. Rendering HTML templates.
  2. Building a scaleable file structure.
  3. Configuring a database.
  4. Handling user login and registration.
  5. Adding CRUD (Create, Read, Update, Delete) functionality.

Part 5: Handling User Login and Registration

In this part we will be using the User object we created in our database during part 4 to create new users and allow them to log in and out of our app.

Step 1. Add Cross Site Forgery Protection and Bcrypt

First we will install 3 more flask extensions by running these…


Create a simple SQL Alchemy database.

This is Part 4 of a series of articles that will walk you through the basics of Flask Web Development by developing and hosting a simple CRUD application.

This series is split into 6 parts:

  1. Rendering HTML templates.
  2. Building a scaleable file structure.
  3. Configuring a database.
  4. Handling user login and registration.
  5. Adding CRUD (Create, Read, Update, Delete) functionality.

Part 4: Database Configuration

In this part of the tutorial we will set up an SQL database and create a user object that will be used in our next part to handle login and register.

Step 1. Updating our config.py file to configure our database.

At the end of our part 3…


This is Part 3 of a series of articles that will walk you through the basics of Flask Web Development by developing and hosting a simple CRUD application.

This series is split into 6 parts:

  1. Rendering HTML templates.
  2. Building a scaleable file structure.
  3. Configuring a database.
  4. Handling user login and registration.
  5. Adding CRUD (Create, Read, Update, Delete) functionality.

Part 3: Building a Scalable File Structure.

So far we just have one file for the backend python code and one file for the front end html code. As our app gets more complex and we add more code we will want to split these off into multiple files. …


This is Part 2 of a series of articles that will walk you through the basics of Flask Web Development by developing and hosting a simple CRUD application.

This series is split into 6 parts:

  1. Rendering HTML templates.
  2. Building a scaleable file structure.
  3. Configuring a database.
  4. Handling user login and registration.
  5. Adding CRUD (Create, Read, Update, Delete) functionality.

Part 2: Rendering HTML Templates

In the last post we learnt to run a Flask App and use it to show “Hello, world!” in our browser using this code.

from flask import Flask
app = Flask(__name__)
@app.route('/')
@app.route('/index')
def hello_world():
return 'Hello, World!'
if __name__ == '__main__': app.run(host="localhost", port=8000)


This is Part 1 of a series of articles that will walk you through the basics of Flask Web Development by developing and hosting a simple CRUD application.

This series is split into 6 parts:

  1. Rendering HTML templates.
  2. Building a scaleable file structure.
  3. Configuring a database.
  4. Handling user login and registration.
  5. Adding CRUD (Create, Read, Update, Delete) functionality.

This series assumes you:

2. Understand how to download and import Python packages.

3. Understand basic HTML.

4. Understand basic Python.


Quick guide to Python packages

In this post I will walk you through installing packages and importing them into Python files. I will also show you how to import your own packages.

I will use Atom for this tutorial. If you don’t have an IDE set up you can check this out: https://medium.com/@shawnhymers/getting-started-with-the-atom-ide-macos-7279b8c119f2

Lets install pandas. Pandas is data analysis package that is very worth learning.

To install it open your terminal and run the following line of code.

pip install pandas

To import it into your python file add the following line to the top of your .py file.


Simple Atom setup guide.

In this post I will walk you through how to install and set up Atom to develop and run Python code.

  1. Download Atom.

2. Set up your preferred theme.

  • From the menu at the top click Atom > Preferences and the settings pane shown below should open up.

If your project has many JS files in the static directory, maintaining import links can be a pain.

This is a simple method to import all JS files from the static directory with three lines of code:

{% for file in js_files %}
<script type="text/javascript" src = {{file}}> </script>
{% endfor %}

Now I will explain how to generate and pass the js_files object to the front end.

Given a static folder organized like this each file would need to be imported using a url which can quickly become difficult to maintain.

First we need to import the listdir module.

Shawn Hymers

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store