diff --git a/django/template/loaders/app_directories.py b/django/template/loaders/app_directories.py
index 887f8a0..e889a27 100644
|
a
|
b
|
for app in settings.INSTALLED_APPS:
|
| 23 | 23 | mod = import_module(app) |
| 24 | 24 | except ImportError as e: |
| 25 | 25 | raise ImproperlyConfigured('ImportError %s: %s' % (app, e.args[0])) |
| 26 | | template_dir = os.path.join(os.path.dirname(mod.__file__), 'templates') |
| 27 | | if os.path.isdir(template_dir): |
| 28 | | if not six.PY3: |
| 29 | | template_dir = template_dir.decode(fs_encoding) |
| 30 | | app_template_dirs.append(template_dir) |
| | 26 | |
| | 27 | # Search ALL the directories in the app module path |
| | 28 | for path in mod.__path__: |
| | 29 | template_dir = os.path.join(path, 'templates') |
| | 30 | if os.path.isdir(template_dir): |
| | 31 | if not six.PY3: |
| | 32 | template_dir = template_dir.decode(fs_encoding) |
| | 33 | app_template_dirs.append(template_dir) |
| 31 | 34 | |
| 32 | 35 | # It won't change, so convert it to a tuple to save memory. |
| 33 | 36 | app_template_dirs = tuple(app_template_dirs) |