Creating a basic product model
In this recipe, we will create an application that will help us to store products to be displayed on the catalog section of a website. It should be possible to add products to the catalog and then delete them as and when required. As you saw in the last chapter, this is possible to do using non-persistent storage as well. Here, however, we will store data in a database to have persistent storage.
How to do it…
The new directory layout would appear as follows:
flask_catalog/ run.py my_app/ __init__.py catalog/ __init__.py &...