Ticket #13746: dumpdata-clarification.diff
File dumpdata-clarification.diff, 1.7 KB (added by , 14 years ago) |
---|
-
django/core/management/commands/dumpdata.py
20 20 make_option('-n', '--natural', action='store_true', dest='use_natural_keys', default=False, 21 21 help='Use natural keys if they are available.'), 22 22 ) 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.' 24 24 args = '[appname appname.ModelName ...]' 25 25 26 26 def handle(self, *app_labels, **options): … … 163 163 ) 164 164 model_dependencies = skipped 165 165 166 return model_list 167 No newline at end of file 166 return model_list -
docs/topics/db/managers.txt
170 170 If you use custom ``Manager`` objects, take note that the first ``Manager`` 171 171 Django encounters (in the order in which they're defined in the model) has a 172 172 special status. Django interprets the first ``Manager`` defined in a class as 173 the "default" ``Manager``, and several parts of Django will use that ``Manager`` 173 the "default" ``Manager``, and several parts of Django 174 (including :djadmin:`dumpdata`) will use that ``Manager`` 174 175 exclusively for that model. As a result, it's a good idea to be careful in 175 176 your choice of default manager in order to avoid a situation where overriding 176 177 ``get_query_set()`` results in an inability to retrieve objects you'd like to