diff options
| author | Florian Apolloner <florian@apolloner.eu> | 2014-07-27 13:23:16 +0200 |
|---|---|---|
| committer | Florian Apolloner <florian@apolloner.eu> | 2014-07-27 13:29:36 +0200 |
| commit | f8ec200671649282b9e62fb1a4dfc138fa4eb4fb (patch) | |
| tree | f821565cc6308ba23cf55b132ac2ce3668e8de1e | |
| parent | df0d5ea7bc9821923c70e7bf06d3646598cf019d (diff) | |
[1.7.x] Only warn about initial data if fixtures have been found.
Backport of 2ab0ed7b2842fbb8bf36ee7df9949d10546d953d from master.
| -rw-r--r-- | django/core/management/commands/loaddata.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/management/commands/loaddata.py b/django/core/management/commands/loaddata.py index dca3069ef7..0000872eed 100644 --- a/django/core/management/commands/loaddata.py +++ b/django/core/management/commands/loaddata.py @@ -224,7 +224,7 @@ class Command(BaseCommand): if fixture_name != 'initial_data' and not fixture_files: # Warning kept for backwards-compatibility; why not an exception? warnings.warn("No fixture named '%s' found." % fixture_name) - elif fixture_name == 'initial_data': + elif fixture_name == 'initial_data' and fixture_files: warnings.warn( 'initial_data fixtures are deprecated. Use data migrations instead.', RemovedInDjango19Warning |
