#37081: loaddata fails when a directory in the fixture path contains a dot
-------------------------------------+-------------------------------------
Reporter: Alisson Silveira | Type: Bug
Status: new | Component: Core
| (Management commands)
Version: 6.0 | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
How to reproduce:
Create a fixture in a directory containing a dot, for example:
{{{
fixtures/fix.v1/data.json
}}}
Run (without specifying the file extension):
{{{
python manage.py loaddata fixtures/fix.v1/data
}}}
This raises:
{{{
CommandError: Problem installing fixture 'fixtures/fix': v1/data is not a
known serialization format.
}}}
This occurs when a directory in the fixture path contains a dot, as the
full path is incorrectly split on "." instead of operating on the file
name.
Expected behavior: Django should correctly determine the fixture format
based on the file name and load the fixture successfully, ignoring dots in
directory names.
A fix has been identified and will be submitted in a pull request.
--
Ticket URL: <
https://code.djangoproject.com/ticket/37081>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.