Django, Python, Web Development.
User.objects.only('username', 'email') The .defer() method is the counterpart to .only(). Instead of specifying which fields to load, you specify which fields to defer. When you query a model using .defer(), Django will fetch all fields except those specified. from myapp.models import User #