关于Django中提示TemplateDoesNotExist:

注意: 要在Django settings.py里面的TMPLATE_DIRS添加TEMPLATE_DIRS元组如下所示:

TEMPLATE_DIRS = (
os.path.join(BASE_DIR,'templates'),
)

如果添加TMPLATE_DIRS后仍报TemplateDoseNotExist,那么需要在view.py中查找路径是否正确,如下图所示:

posted on 2015-08-10 22:28  安_静_了  阅读(189)  评论(0)    收藏  举报