© Daniel Rubio 2017

Daniel Rubio, Beginning Django, https://doi.org/10.1007/978-1-4842-2787-9_8

8. Django Model Queries and Managers

Daniel Rubio

(1)F. Bahia, Ensenada, Baja California, Mexico

As you learned in the previous chapter, Django models encapsulate data through classes, enforce data validation, are used to interact with a Django project’s relational database, and have a myriad of options to guarantee and customize how data operates in Django projects.

In this chapter we’ll build on the previous Django model concepts and learn about a Django model queries and managers . We’ll start with an in-depth look at Django model CRUD (Create-Read-Update-Delete) operations, including single, multiple, and relationship queries, covering their speed ...

Get Beginning Django: Web Application Development and Deployment with Python 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.