默认的Django 1.5管理CSS不工作 [英] Default Django 1.5 admin css not working
问题描述
我刚刚安装在EC2上我的Django 1.5应用程序,目前该网站的/管理部分没有CSS。有没有一种方法,我可以配置此?
I just installed my django 1.5 app on ec2 and right now the /admin portion of the site doesn't have css. Is there a way that I can configure this?
只需添加到这个位于下面的文件夹中的css文件:
/usr/local/lib/python2.6/dist-packages/django/contrib/admin/static/admin/css $
Just to add to this the css files are located in the following folder:
/usr/local/lib/python2.6/dist-packages/django/contrib/admin/static/admin/css$
推荐答案
你是怎么配置的?对于管理应用程序加载静态文件,你需要创建在你的应用程序的静态
目录的符号链接。你这样做?
How did you configure it? For admin app to load static files, you need to create a symbolic link inside your app's static
directory. Have you done this?
的ls -l </ code>应该给这样的:
ls -l
should give something like:
admin -> /usr/local/lib/python2.6/dist-packages/django/contrib/admin/media
这篇关于默认的Django 1.5管理CSS不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!