From 69a30f620eb46246c0b39cd40a0f7df57f2af8d0 Mon Sep 17 00:00:00 2001
From: Nick Pope <nick.pope@flightdataservices.com>
Date: Wed, 6 Feb 2019 21:37:25 +0000
Subject: [PATCH] Refs #30160 -- Simplified archive extension map and added
 other aliases.

---
 django/utils/archive.py   | 14 ++++++--------
 docs/ref/django-admin.txt |  2 +-
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/django/utils/archive.py b/django/utils/archive.py
index 15326eb18c..c94ca4950b 100644
--- a/django/utils/archive.py
+++ b/django/utils/archive.py
@@ -216,11 +216,9 @@ class ZipArchive(BaseArchive):
         self._archive.close()
 
 
-extension_map = {
-    '.tar': TarArchive,
-    '.tar.bz2': TarArchive,
-    '.tar.gz': TarArchive,
-    '.tgz': TarArchive,
-    '.tz2': TarArchive,
-    '.zip': ZipArchive,
-}
+extension_map = dict.fromkeys((
+    '.tar',
+    '.tar.bz2', '.tbz2', '.tbz', '.tz2',
+    '.tar.gz', '.tgz', '.taz',
+), TarArchive)
+extension_map['.zip'] = ZipArchive
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index dfb6162410..d195b58496 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -1222,7 +1222,7 @@ For example::
 .. django-admin-option:: --template TEMPLATE
 
 Provides the path to a directory with a custom app template file or a path to a
-compressed file (``.tar.gz``, ``.tar.bz2``, ``.tgz``, ``.tbz``, ``.zip``)
+compressed file (``.tar.gz``, ``.tar.bz2``, ``.tgz``, ``.tbz2``, ``.zip``)
 containing the app template files.
 
 For example, this would look for an app template in the given directory when