我是第一次 django 用户。我必须手动将以下不推荐使用的函数添加到新的 django1.4 settings.py 文件中,以便我的管理员 css 可以访问。如果不使用这个已弃用的功能,如何让我的网站看起来很漂亮?
ADMIN_MEDIA_PREFIX = '/static/admin/'
以下是我的其他设置供您阅读:
STATIC_ROOT = '/home/ubuntu/static/'
STATIC_URL = '/static/'
我的 apache http.conf 文件有:
Alias /static/ /home/ubuntu/static/
<Directory /home/ubuntu/static>
Order deny,allow
Allow from all
</Directory>