Fixed #20468 -- Added loaddata --exclude option.

Thanks Alex Morozov for the initial patch.
This commit is contained in:
Berker Peksag 2016-05-17 09:52:01 +03:00 committed by Tim Graham
parent 21130ce1a9
commit ae2a7da86b
6 changed files with 75 additions and 19 deletions

View file

@ -416,6 +416,14 @@ originally generated.
Specifies a single app to look for fixtures in rather than looking in all apps.
.. django-admin-option:: --exclude EXCLUDE, -e EXCLUDE
.. versionadded:: 1.11
Excludes loading the fixtures from the given applications and/or models (in the
form of ``app_label`` or ``app_label.ModelName``). Use the option multiple
times to exclude more than one app or model.
What's a "fixture"?
~~~~~~~~~~~~~~~~~~~

View file

@ -169,7 +169,8 @@ Internationalization
Management Commands
~~~~~~~~~~~~~~~~~~~
* ...
* The new :option:`loaddata --exclude` option allows excluding models and apps
while loading data from fixtures.
Migrations
~~~~~~~~~~