﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24613	Documentation Note for defer might need an example.	no	nobody	"The paragraph in the note section of the `defer` documentation is not immediately obvious to what it's implying. My understanding is that it's suggesting that one can use two django models to load data from a single database table, is that the only implication, or is there another?

I think adding an example would help to clarify what exactly is meant by the paragraph.

This is what I think it means:

{{{#!python

class MyCommonlyUsedModel(models.Model):
    class Meta:
        managed = False
        db_table = 'app_largetable'
    f1 = models.Field(...)
    f2 = models.Field(...)

class MyUsuallyDeferredFieldsModel(models.Model):
    class Meta:
        managed = False
        db_table = 'app_largetable'
    deferred_f3 = models.Field(...)
    deferred_f4 = models.Field(...)

# A model that allows the migrations framework to also manage the table
# Not sure if this actually works, but would allow for a more DRY approach
class MyManagedModel(MyCommonlyUsedModel, MyUsuallyDeferredFieldsModel):
    class Meta:
        managed = True
        tb_table = 'app_largetable'

}}}


If the above example is acceptable as an example - and is actually what the note is about - I don't mind creating a PR."	Cleanup/optimization	closed	Documentation	1.8	Normal	fixed		andrei.avk@…	Accepted	1	0	0	0	0	0
