/accounts/login/ 处的 Pythonanywhere 模板不存在
Pythonanywhere TemplateDoesNotExist at /accounts/login/
当我 运行 我的应用程序在本地工作时,它可以工作,但是当我尝试将它上传到 pythonanywhere 时,我收到以下错误:
TemplateDoesNotExist at /accounts/login/
我该如何解决这个问题?如果这样有助于我的文件定位:
Music (the Django project folder)
|_manage.py
|_Music (the folder that contains settings file)
|_App (the App itself with models, views etc. and my templates is here too)
|_templates
|_App
|_registration
|_login.html
如果您需要更多信息,我可以上传。
您可能需要在 settings.py
中配置 TEMPLATES
变量。
当您 运行 manage.py runserver
时,开发服务器具有生产服务器所没有的自动发现功能。所以你需要告诉他在哪里可以找到你的模板。
当我 运行 我的应用程序在本地工作时,它可以工作,但是当我尝试将它上传到 pythonanywhere 时,我收到以下错误:
TemplateDoesNotExist at /accounts/login/
我该如何解决这个问题?如果这样有助于我的文件定位:
Music (the Django project folder)
|_manage.py
|_Music (the folder that contains settings file)
|_App (the App itself with models, views etc. and my templates is here too)
|_templates
|_App
|_registration
|_login.html
如果您需要更多信息,我可以上传。
您可能需要在 settings.py
中配置 TEMPLATES
变量。
当您 运行 manage.py runserver
时,开发服务器具有生产服务器所没有的自动发现功能。所以你需要告诉他在哪里可以找到你的模板。