{{{
- fixtures/
+ initial_data.json
+ tests/
- initial_data_inner.json
}}}
Loading the outer fixture works:
{{{
$ ./manage.py loaddata initial_data
Installed 3 object(s) from 1 fixture(s)
}}}
The inner does not:
{{{
$ ./manage.py loaddata initial_data_inner
…site-packages/django/core/management/commands/loaddata.py:218:
UserWarning: No fixture named 'initial_data_inner' found.
warnings.warn("No fixture named '%s' found." % fixture_name)
Installed 0 object(s) from 0 fixture(s)
$ ./manage.py loaddata tests/initial_data_inner
…site-packages/django/core/management/commands/loaddata.py:218:
UserWarning: No fixture named 'initial_data_inner' found.
warnings.warn("No fixture named '%s' found." % fixture_name)
Installed 0 object(s) from 0 fixture(s)
}}}
This used to work in Django 1.5.
The cause of this is that all fixture names that contain an `os.path.sep`
are considered absolute paths in the `loaddata` management command.
--
Ticket URL: <https://code.djangoproject.com/ticket/21551>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* severity: Normal => Release blocker
* needs_tests: => 0
* needs_docs: => 0
Comment:
Marking as a release blocker since it's a regression.
--
Ticket URL: <https://code.djangoproject.com/ticket/21551#comment:1>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/21551#comment:2>
* has_patch: 0 => 1
Comment:
https://github.com/django/django/pull/2036
This issue is partially related to #20933.
--
Ticket URL: <https://code.djangoproject.com/ticket/21551#comment:3>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"41ebc4838d2b09e7f3ece8889e21492902b55dc8"]:
{{{
#!CommitTicketReference repository=""
revision="41ebc4838d2b09e7f3ece8889e21492902b55dc8"
Fixed #21551 -- Reenabled loading fixtures from subdirectory
This was a regression in Django 1.6 that was only partially
restored in 839940f27f.
Thanks Jonas Haag for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21551#comment:4>
Comment (by Claude Paroz <claude@…>):
In [changeset:"45c0d2e1ce0fe024e4a80c9dde8263f5ff59d577"]:
{{{
#!CommitTicketReference repository=""
revision="45c0d2e1ce0fe024e4a80c9dde8263f5ff59d577"
[1.6.x] Fixed #21551 -- Reenabled loading fixtures from subdirectory
This was a regression in Django 1.6 that was only partially
restored in 839940f27f.
Thanks Jonas Haag for the report.
Backport of 41ebc4838d from master.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21551#comment:5>