2

I'm a first time django user. I had to manually add in the following deprecated function to the new django1.4 settings.py file for my admin css to be accessible. How can make my site look pretty without using this deprecated function?

ADMIN_MEDIA_PREFIX = '/static/admin/'

Here are my other settings for your perusal:

STATIC_ROOT = '/home/ubuntu/static/' 
STATIC_URL = '/static/'

And my apache http.conf file has:

Alias /static/ /home/ubuntu/static/
<Directory /home/ubuntu/static>
Order deny,allow
Allow from all
</Directory>
1
  • 3
    have you run collectstatic? Commented Mar 29, 2012 at 22:19

1 Answer 1

2

You must run

./manage.py collectstatic

to copy all static files from packages to static directory. Of course django.contrib.staticfiles must be in INSTALLED_APPS.

There will be folder "admin" in static folder after that. If it exists and still static files not loaded, then look to your webserver config.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.