diff options
| author | Nick Pope <nick.pope@flightdataservices.com> | 2019-02-05 22:00:56 +0000 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-07-31 10:02:13 +0200 |
| commit | f618e033acd37d59b536d6e6126e6c5be18037f6 (patch) | |
| tree | 576985d9593733132f9eb6c362e1d04c6c206689 | |
| parent | c95d063e776e849cf1a0bf616c654165cb89c706 (diff) | |
Fixed #30160 -- Added support for LZMA and XZ templates to startapp/startproject management commands.
| -rw-r--r-- | django/utils/archive.py | 2 | ||||
| -rw-r--r-- | docs/ref/django-admin.txt | 8 | ||||
| -rw-r--r-- | docs/releases/3.0.txt | 4 | ||||
| -rw-r--r-- | tests/utils_tests/archives/foobar.tar.lzma | bin | 0 -> 271 bytes | |||
| -rw-r--r-- | tests/utils_tests/archives/foobar.tar.xz | bin | 0 -> 316 bytes | |||
| -rw-r--r-- | tests/utils_tests/archives/leadpath_foobar.tar.lzma | bin | 0 -> 212 bytes | |||
| -rw-r--r-- | tests/utils_tests/archives/leadpath_foobar.tar.xz | bin | 0 -> 260 bytes |
7 files changed, 13 insertions, 1 deletions
diff --git a/django/utils/archive.py b/django/utils/archive.py index c94ca4950b..235809f2ad 100644 --- a/django/utils/archive.py +++ b/django/utils/archive.py @@ -220,5 +220,7 @@ extension_map = dict.fromkeys(( '.tar', '.tar.bz2', '.tbz2', '.tbz', '.tz2', '.tar.gz', '.tgz', '.taz', + '.tar.lzma', '.tlz', + '.tar.xz', '.txz', ), TarArchive) extension_map['.zip'] = ZipArchive diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index be007c8cdf..b5572cd5c7 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -1223,7 +1223,8 @@ For example:: Provides the path to a directory with a custom app template file, or a path to an uncompressed archive (``.tar``) or a compressed archive (``.tar.gz``, -``.tar.bz2``, ``.tgz``, ``.tbz2``, ``.zip``) containing the app template files. +``.tar.bz2``, ``.tar.xz``, ``.tar.lzma``, ``.tgz``, ``.tbz2``, ``.txz``, +``.tlz``, ``.zip``) containing the app template files. For example, this would look for an app template in the given directory when creating the ``myapp`` app:: @@ -1239,6 +1240,11 @@ zip files, you can use a URL like:: django-admin startapp --template=https://github.com/githubuser/django-app-template/archive/master.zip myapp +.. versionchanged:: 3.0 + + Support for XZ archives (``.tar.xz``, ``.txz``) and LZMA archives + (``.tar.lzma``, ``.tlz``) was added. + .. django-admin-option:: --extension EXTENSIONS, -e EXTENSIONS Specifies which file extensions in the app template should be rendered with the diff --git a/docs/releases/3.0.txt b/docs/releases/3.0.txt index 30f70e0bcf..4bfebba73b 100644 --- a/docs/releases/3.0.txt +++ b/docs/releases/3.0.txt @@ -250,6 +250,10 @@ Management Commands * The new :option:`--skip-checks` option skips running system checks prior to running the command. +* The :option:`startapp --template` and :option:`startproject --template` + options now support templates stored in XZ archives (``.tar.xz``, ``.txz``) + and LZMA archives (``.tar.lzma``, ``.tlz``). + Migrations ~~~~~~~~~~ diff --git a/tests/utils_tests/archives/foobar.tar.lzma b/tests/utils_tests/archives/foobar.tar.lzma Binary files differnew file mode 100644 index 0000000000..758518e1fd --- /dev/null +++ b/tests/utils_tests/archives/foobar.tar.lzma diff --git a/tests/utils_tests/archives/foobar.tar.xz b/tests/utils_tests/archives/foobar.tar.xz Binary files differnew file mode 100644 index 0000000000..f50d54371a --- /dev/null +++ b/tests/utils_tests/archives/foobar.tar.xz diff --git a/tests/utils_tests/archives/leadpath_foobar.tar.lzma b/tests/utils_tests/archives/leadpath_foobar.tar.lzma Binary files differnew file mode 100644 index 0000000000..bf1af30589 --- /dev/null +++ b/tests/utils_tests/archives/leadpath_foobar.tar.lzma diff --git a/tests/utils_tests/archives/leadpath_foobar.tar.xz b/tests/utils_tests/archives/leadpath_foobar.tar.xz Binary files differnew file mode 100644 index 0000000000..9fc7a1b82a --- /dev/null +++ b/tests/utils_tests/archives/leadpath_foobar.tar.xz |
