【问题标题】:about Python Django Administration page's appearance关于 Python Django 管理页面的外观
【发布时间】:2018-03-01 07:10:22
【问题描述】:

我是 python Django 的初学者。我创建了一个 django 管理页面,但 css 出现了一些问题。this is the screen shot of the that page.我想成为这样。 this is the what i wanted page's screen shot。谁能帮帮我?

【问题讨论】:

  • 你能查看那个页面的源代码,看看是否加载了.css?
  • 你把屏幕放在复印机上了吗?
  • 我无法查看所有源代码。因为字符太多,我可以让您的邮件发送源代码,我无法清楚地识别源代码。

标签: python django


【解决方案1】:

先运行这个命令:

 python manage.py collectstatic

【讨论】:

    【解决方案2】:

    如果您只是想测试您的 django 项目,请检查您的 setting.py 文件,将 DEBUG 更改为 True,然后运行 ​​manage.py runserver,您将在 localhost:8000/admin 管理界面看到您想要的内容。

    如果您的 django 项目已准备好部署,请运行 python manage.py collectstatic,manage.py 会自动为您收集静态文件(css、js ...)。

    【讨论】:

      猜你喜欢
      • 2020-11-26
      • 2011-05-22
      • 1970-01-01
      • 1970-01-01
      • 2013-07-12
      • 1970-01-01
      • 2018-02-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多