get_all_templates should not return __init__.py.

This commit is contained in:
Umair Khan
2016-07-04 13:15:50 +05:00
committed by Tim Abbott
parent 1e2d38e790
commit 2d243c0703

View File

@@ -445,7 +445,8 @@ def get_all_templates():
isfile = os.path.isfile
path_exists = os.path.exists
is_valid_template = lambda p, n: not n.startswith('.') and isfile(p)
def is_valid_template(p, n):
not n.startswith('.') and not n.startswith('__init__') and isfile(p)
def process(template_dir, dirname, fnames):
# type: (str, str, Iterable[str]) -> None