def _template_names(proj_only=False):
for engine in settings.TEMPLATES:
if (engine['BACKEND']
== 'django.template.backends.django.DjangoTemplates'):
for template_dir in chain(engine['DIRS'],
get_app_template_dirs('templates')):
if not proj_only or template_dir.startswith(settings.BASE_DIR):
for dirpath, dirnames, filenames in os.walk(template_dir):
for template_name in filenames:
yield os.path.join(dirpath[len(template_dir)+1:],
template_name)
else:
raise NotImplementedError(
"Currently only supports default DjangoTemplates backend."
)
templatecheck.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录