django.template.exceptions.TemplateDoesNotExist: index.html

django.template.exceptions.TemplateDoesNotExist: index.html

在网上查了下,setting中 TEMPLATES 的 'DIRS' 需要添加os.path.join(BASE_DIR, 'templates')

TEMPLATES = [
    {
        ...
        'DIRS': [os.path.join(BASE_DIR, 'templates')],
        ...
    },
]

  

posted @ 2019-12-13 23:09  hanzhang  阅读(2385)  评论(0编辑  收藏  举报