Models in Django
We will introduce Models in Django and give a brief review of the SQL database.
We'll cover the following
Introduction to Models
An essential part of any website is the ability to accept information from a user, input it into a database, retrieve information from a database, and use the retrieved information to generate content for the user. We can use Models to incorporate a database into a Django Project.
Models define the structure of the data stored in a database, including the field types, possibly their maximum size or default values, etc. A Model in Django is a python class that generally maps to a single database table. Django already comes equipped with SQLite. So, we will be using SQLite for our examples in this course. However, Django can also connect to a variety of other SQL engine backends, including PostgreSQL and MySQL.
Get hands-on with 1400+ tech skills courses.