mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #31552 -- Added support for LZMA and XZ fixtures to loaddata.
This commit is contained in:
parent
2e48cf6bd9
commit
0e3b0da2e3
6 changed files with 40 additions and 5 deletions
|
@ -599,13 +599,14 @@ The :djadmin:`dumpdata` command can be used to generate input for ``loaddata``.
|
|||
Compressed fixtures
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Fixtures may be compressed in ``zip``, ``gz``, or ``bz2`` format. For example::
|
||||
Fixtures may be compressed in ``zip``, ``gz``, ``bz2``, ``lzma``, or ``xz``
|
||||
format. For example::
|
||||
|
||||
django-admin loaddata mydata.json
|
||||
|
||||
would look for any of ``mydata.json``, ``mydata.json.zip``,
|
||||
``mydata.json.gz``, or ``mydata.json.bz2``. The first file contained within a
|
||||
zip-compressed archive is used.
|
||||
would look for any of ``mydata.json``, ``mydata.json.zip``, ``mydata.json.gz``,
|
||||
``mydata.json.bz2``, ``mydata.json.lzma``, or ``mydata.json.xz``. The first
|
||||
file contained within a compressed archive is used.
|
||||
|
||||
Note that if two fixtures with the same name but different
|
||||
fixture type are discovered (for example, if ``mydata.json`` and
|
||||
|
@ -619,6 +620,10 @@ installation will be aborted, and any data installed in the call to
|
|||
constraints, so if you use MyISAM, you won't get validation of fixture
|
||||
data, or a rollback if multiple transaction files are found.
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
|
||||
Support for XZ archives (``.xz``) and LZMA archives (``.lzma``) was added.
|
||||
|
||||
Database-specific fixtures
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue