inspectdb and managed option, incorrect explanation
|Reported by:||adrian.klaver@…||Owned by:||timo|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
"If you wanted to modify existing data on your CENSUS_PERSONS SQL table with Django you’d need to change the managed option highlighted above to True (or simply remove it to let it because True is its default value).
This serves as an explicit opt-in to give your nascent Django project write access to your precious data on a model by model basis.
Changed in Django 1.6:
The behavior by which introspected models are created as unmanaged ones is new in Django 1.6.
If you click on the managed link in the above you get:
"If False, no database table creation or deletion operations will be performed for this model. This is useful if the model represents an existing table or a database view that has been created by some other means. This is the only difference when managed=False. All other aspects of model handling are exactly the same as normal. This includes"
My use experience is that managed does not have anything to do with record creation/deletion just model creation/deletion as in the second text above. It would seem the texts should be brought into agreement.
Change History (6)
comment:1 Changed 16 months ago by timo
- Needs documentation unset
- Needs tests unset
- Owner changed from nobody to timo
- Patch needs improvement unset
- Status changed from new to assigned
- Triage Stage changed from Unreviewed to Accepted
comment:4 Changed 16 months ago by Tim Graham <timograham@…>
- Resolution set to fixed
- Status changed from assigned to closed