In the basic case, a model is Python class that maps to a single database table. The attributes of the class map to columns in the table and an instance of the class represents a row in database table. The models inherit from
django.db.models.Model which provides a rich API for adding and filtering results from the database.
Create Your First Model
Queryset is fundamentally a list of objects derived from a
Model, by a compilation of database queries.
Middleware in Django is a framework that allows code to hook into the response / request processing and alter the input or output of Django.
Management commands are powerful and flexible scripts that can perform actions on your Django project or the underlying database. In addition to various default commands, it's possible to write your own!
Compared to regular Python scripts, using the management command framework means that some tedious setup work is automatically done for you behind the scenes.
An F() expression is a way for Django to use a Python object to refer to the value of model field or annotated column in the database without having to pull the value into Python memory. This allows developers to avoid certain race conditions and also filtering results based on model field values.