我使用django注册来验证用户。我确实通过pip安装了django注册,并在设置.py文件。但是它还是给了我模板不存在的错误。错误如下:
TemplateDoesNotExist at /accounts/login/
registration/login.html
Request Method: GET
Request URL: http://127.0.0.1:8000/accounts/login/?next=/
Django Version: 1.11.3
Exception Type: TemplateDoesNotExist
Exception Value: registration/login.html
Exception Location: C:\Python34\lib\site- packages\django\template\loader.py in select_template, line 53
代码如下:
^{pr2}$在设置.py文件:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.humanize',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'chat',
'registration',
]
templates文件夹似乎位于根目录中,因此您需要将设置更改为
相关问题 更多 >
编程相关推荐