当我在本地运行我的应用程序时,它可以工作,但是当我尝试将它上传到pythonanywhere时,我会得到以下错误:
TemplateDoesNotExist at /accounts/登录/
我该怎么解决这个问题?如果它对我的文件有帮助,我的文件的位置如下:
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如果你需要更多的信息,我可以上传。
发布于 2020-04-11 14:17:41
您可能需要在TEMPLATES中配置settings.py变量。
当您运行manage.py runserver时,开发服务器具有生产服务器没有的自动发现功能。所以你得告诉他哪里能找到你的模板。
https://stackoverflow.com/questions/61156869
复制相似问题