1. Django's select_related

    How does Django's select_related works and when should you use it?

    What problem does it solve?

    Django's select_related() solves the problem when you want to access related fields on a queryset. Assume the models:

    from django.db import models
    
    
    class Author(models.Model):
        name = models.CharField(max_length=250)
    
    
    class Book …
    Tagged as : django orm

Page 2 / 2