为什么我的 Django 管理站点没有样式/CSS 加载? [英] Why does my Django admin site not have styles / CSS loading?

查看:22
本文介绍了为什么我的 Django 管理站点没有样式/CSS 加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 会将 Django 指向正确的位置.

由于您使用的是开发版本,因此您需要 开发特定的静态文件文件操作方法.Adam 的链接将引导您进入 1.2 版本.

I made a Django admin site using Django development version but it isn't being styled:

解决方案

Django does not serve static files on it's own. You have to tell it where the files are.

The ADMIN_MEDIA_PREFIX in the settings.py will point Django in the right location.

Since you're using the development version, you'll want the dev-specific document for static files how-to. Adam's link will lead you to the 1.2 version.

这篇关于为什么我的 Django 管理站点没有样式/CSS 加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆