By default, Django 1.5 admin css does not work

I just installed my django 1.5 application on ec2 and right now the / admin part of the site does not have css. Is there any way to configure this?

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$

+3
source share
3 answers

How did you configure it? In order for the administrator application to download static files, you need to create a symbolic link in the static application directory. Did you do it?

ls -l should give something like:

 admin -> /usr/local/lib/python2.6/dist-packages/django/contrib/admin/media 
+2
source

I had exactly the same problem, and I think I understood how to solve it. This is actually not so difficult. All you need to change is your settings.py (STATIC_ROOT and STATIC_URL) and the server configuration file (URL alias). I wrote a short blog post with three steps. http://www.ycshao.com/?p=898

+2
source

Dragon and ycshao have excellent answers. I just want to add that if you are using Apache server 2.4+. Instead

 Allow from all 

You have to use

 Require all granted 

He solved the problem of static file allocation.

0
source

All Articles