You are going to create a site that will have a SQlite.
-
Create the Teacher Model
- Install and connect SQLAlchemy.
- Describe the model for the teacher.
- Check that the primary key, types and constraints are in order.
-
Create a "Booking" model
- Describe the booking model.
- Link the model with a teacher (one to many) relationship.
- Check that the primary key, types and constraints are in order.
-
Create a Sort Requisition Model
- Describe the model.
- Check that the primary key, types and constraints are in order.
-
Populate the database
- Connect and configure migrations inside the app.py file
- Initialize migrations with flask db init
- Write or migration command, which imports the data from JSON teachers base
-
Modify the teacher's route
- Replace getting data from a file to execute a query in the database.
- When the teacher does not exist, roll out a 404.
-
Modify the target route, for example, "to move"
- Get instructors with a filter and sort query.
-
Modify the main route
- Replace getting data from a file to execute a query in the database.
-
Refine the route and booking page with feedback
- Combine routes for displaying and submitting a form into one
- Validate the form: all fields must be completed.
- Replace the write to the file with the write to the database.
-
Modify the route and page of the application for selection
- Combine routes for displaying and submitting a form into one
- Validate the form: all fields must be completed.
- Replace the write to the file with the write to the database
All requirements are listed in the file: requirements.txt
.