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 field types
- Configuring field validators
- Linking tables through field relationships
- Working with model meta classes and options
- Using model methods and method decorators
- Practicing extending models ...