Dumpdata needs an option to use the base manager instead of the default manager
|Reported by:||Paul McMillan||Owned by:||Paul McMillan|
|Component:||Core (Management commands)||Version:||master|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Objects with custom managers sometimes filter results when
dumpdata is run. Often we want to dump all the objects in our database, not just the subset of objects which are returned by the default manager.
The attached patch adds a
--all option to the
dumpdata command which makes it use Django's base manager instead of the default manager. This means that even objects which would normally be filtered by the default manager are returned.
Change History (4)
comment:1 Changed 6 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Ready for checkin|