djangosnippets.org: Latest snippets tagged with 'defer'https://djangosnippets.org/tags/defer/2013-06-17T03:32:22.592771-05:00Lightweight querysets
2013-06-17T03:32:22.592771-05:00sardarnlhttps://djangosnippets.org/snippets/2929/<p>Suppose you have two models A and B. The models have lots of large text/json fields and other heavy data. Your view is showing some list of <code>B.select_related(A)</code>, however, it is using just few lightweight fields. You want to defer all heavyweight fields in order to offload your DB …</p>
Freely redistributable