简体   繁体   English

Django CMS如何将CSS文件添加到管理员

[英]Django CMS how do I add a CSS file to the admin

When using Django CMS, how do you add your own custom CSS file to be loaded in the admin? 使用Django CMS时,如何添加自己的自定义CSS文件以在管理员中加载? I'd like to customize the layout of the page admin. 我想自定义页面管理员的布局。

You'll need to copy at least base.html from /contrib/admin/templates/admin/ to 您需要至少从/contrib/admin/templates/admin/复制base.html到

project
--templates
----admin
------base.html

There you can tell admin to load whatever .css files you want. 您可以在此处告诉管理员加载所需的任何.css文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM