Ticket #13746: dumpdata-clarification.diff

File dumpdata-clarification.diff, 1.7 KB (added by Paul McMillan, 14 years ago)
  • django/core/management/commands/dumpdata.py

     
    2020        make_option('-n', '--natural', action='store_true', dest='use_natural_keys', default=False,
    2121            help='Use natural keys if they are available.'),
    2222    )
    23     help = 'Output the contents of the database as a fixture of the given format.'
     23    help = 'Output the contents of the database as a fixture of the given format using the default manager for each model.'
    2424    args = '[appname appname.ModelName ...]'
    2525
    2626    def handle(self, *app_labels, **options):
     
    163163            )
    164164        model_dependencies = skipped
    165165
    166     return model_list
    167  No newline at end of file
     166    return model_list
  • docs/topics/db/managers.txt

     
    170170If you use custom ``Manager`` objects, take note that the first ``Manager``
    171171Django encounters (in the order in which they're defined in the model) has a
    172172special status. Django interprets the first ``Manager`` defined in a class as
    173 the "default" ``Manager``, and several parts of Django will use that ``Manager``
     173the "default" ``Manager``, and several parts of Django
     174(including :djadmin:`dumpdata`) will use that ``Manager``
    174175exclusively for that model. As a result, it's a good idea to be careful in
    175176your choice of default manager in order to avoid a situation where overriding
    176177``get_query_set()`` results in an inability to retrieve objects you'd like to
Back to Top