Entries published on December 13, 2023
Database views in Django
This is part of a series of posts I’m doing as a sort of Python/Django Advent calendar, offering a small tip or piece of information each day from the first Sunday of Advent through Christmas Eve. See the first post for an introduction.
A view to a database
Most databases support creating and working with views, which, if you’ve never encountered them before, are like a virtual table — instead of being defined by the CREATE TABLE
statement, they’re created by the CREATE VIEW
statement, and instead of defining their own set of columns they’re defined as a query …