【Django】TemplateDoesNotExist at /login/

在Django项目中配置一个简单的页面跳转

说明

OliverPro 为项目名称

ProApp 为应用程序

项目文件结构如下:

image


文件配置如下:

项目中的urls

image


应用程序urls

image


views.py文件

image

看似所有配置均已完毕,但是我们运行的时候报错了,错误如下:

image


最后分析了一下,是由于settings.py未配置,按照下图配置后解决问题。

image

猜你喜欢

转载自www.cnblogs.com/OliverQin/p/9559376.html