Fixing Django admin style

I was trying out django tutorial. It works fine when I use the webserver provided by django. But when I tried to deploy on an Apache server. The admin page has lost its style. I tried to google around, and show suggestion to set Apache Alias for media to redirect to the media folder for django. But I couldn’t find media folder for django. It turns out that from django 1.4 onwards we should refer to static folder instead. So this is the modification that I made:

On /etc/apache2/apache2.conf:


Alias /static/admin /home/ubuntu/websenv/lib/python2.7/site-packages/django/contrib/admin/static/admin/


to point to the location of the static files for admin page. And that solves my problem.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: