【问题标题】:Template does not exist, django paths模板不存在,django 路径
【发布时间】:2021-04-24 15:50:41
【问题描述】:

试图运行我的服务器,但它似乎不合作。

这是我尝试运行时显示的文本:

django.template.loaders.app_directories.Loader: 
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/django/contrib/admin/templates/rest_framework/api.html 
(Source does not exist)

我的设置中有'rest_framework''INSTALLED APPS',我不确定发生了什么

【问题讨论】:

    标签: python django rest server path


    【解决方案1】:

    尝试将您的 Html 文件放在项目的 Templates 目录中或将您的模板目录(从 settings.py)更改为您想要的目录

    【讨论】:

    • 我认为我还没有任何 html 文件,但我想我希望模板应该在设置中。我不太确定,我对这一切都很陌生。
    猜你喜欢
    • 2018-06-16
    • 1970-01-01
    • 1970-01-01
    • 2023-03-22
    • 2016-04-06
    • 2018-04-16
    • 2018-08-25
    • 2017-01-23
    • 2010-12-27
    相关资源
    最近更新 更多