Creating a basic database web application
We will start by building a skeleton of our Crime Map application. It'll be a basic Flask application with a single page that:
- Displays all the data in the
crimestable of our database
- Allows users to input data and stores this data in the database
- Has a Clear button that deletes all the previously input data
Although what we will store and display can't really be described as crime data yet, we'll store it in the
crimes table that we created earlier. We'll just use the
description field for now, ignoring all the other ones.
The process of setting up the Flask application is very similar to what we did before. We will separate out the database logic into a separate file, leaving our main
crimemap.py file for ...