Django TutorialLesson 11Free preview
Django Models
This lesson is part of Django · All levels
Summary
The model is a Python class that represents a database table. Each model attribute becomes a column, and Django automatically adds a field id as the primary key. The model makes it easy to manipulate data without manual SQL.
Key points
- The model is a derivative of models.Model
- Each attribute becomes a column of the table
- Django adds an automatic id as the primary key
- Tables are made by migrating
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.