Chapter 3: Models, Relations, and Inheritance

Models represent tables, also known as objects, within a database. Django provides a simple way to map objects to a project's underlying database(s). We will use this mapping system to work with other components of Django in later chapters of this book, such as a template, view, or form, to name a few. Anything that relies on accessing data from within a database will rely on the models that we create. If a project connects to an external database system or the project uses an API to interact with data, then there is no need to create any models in that situation.

In this chapter, we will cover the following:

  • Writing model classes to create database tables
  • Using standard field types and third-party ...

Get Becoming an Enterprise Django Developer now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.