【问题标题】:How to correct Django server from loading basic html on web browser instead of standard html?如何纠正 Django 服务器在 Web 浏览器上加载基本 html 而不是标准 html?
【发布时间】:2017-07-03 01:14:49
【问题描述】:

如何更正我在加载 Django 管理页面时得到的基本 html 显示,如所附快照所示?

【问题讨论】:

标签: django static-files


【解决方案1】:

这是因为您的静态文件设置不正确。通常 Django 的开发 runserver 会为您处理这个问题,但在生产中,您需要在确保静态文件设置正确后运行 python manage.py collectstatichttps://docs.djangoproject.com/en/1.11/howto/static-files/#configuring-static-files

祝你好运!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-04-10
    • 2016-04-27
    • 2019-08-22
    • 2021-10-09
    • 1970-01-01
    • 2015-09-29
    • 2021-01-31
    • 2015-12-14
    相关资源
    最近更新 更多