summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/core/management/commands/dumpdata.py2
-rw-r--r--docs/django-admin.txt7
2 files changed, 8 insertions, 1 deletions
diff --git a/django/core/management/commands/dumpdata.py b/django/core/management/commands/dumpdata.py
index fdc8fe9293..090053aaf9 100644
--- a/django/core/management/commands/dumpdata.py
+++ b/django/core/management/commands/dumpdata.py
@@ -38,7 +38,7 @@ class Command(BaseCommand):
objects = []
for app in app_list:
for model in get_models(app):
- objects.extend(model.objects.all())
+ objects.extend(model._default_manager.all())
try:
return serializers.serialize(format, objects, indent=indent)
except Exception, e:
diff --git a/docs/django-admin.txt b/docs/django-admin.txt
index 2977f9908f..4697e54dd7 100644
--- a/docs/django-admin.txt
+++ b/docs/django-admin.txt
@@ -132,6 +132,13 @@ If no application name is provided, all installed applications will be dumped.
The output of ``dumpdata`` can be used as input for ``loaddata``.
+Note that ``dumpdata`` uses the default manager on the mdoel for selecting the
+records to dump. If you're using a `custom manager`_ as the default manager
+and it filters some of the available records, not all of the objects will be
+dumped.
+
+.. _custom manager: ../model-api/#custom-managers
+
--format
~~~~~~~~