Create Tables: Usage
Explore creating and managing database tables by coding the Usage table in a Flask application. Learn to run commands to initialize the database with SQLite and prepare database setup for deployment with PostgreSQL.
We'll cover the following...
We'll cover the following...
The plan from the chapter, Design A Web Application, describes the needed fields and tables.
Creating langman_orm.py
In this chapter, we convert these to code, creating the file called langman_orm.py located in langman/server. We begin with the Usage table, including the import commands and the call to create_all. As before, we carry on the development using SQLite and then ...