I was working on creating a Django project, and was having a problem with the media for the admin site not being displayed properly. (When I went to the admin page, it worked fine but the page was plain, missing all the css and js.) It was driving me crazy and I couldn't figure out what was wrong, so I just deleted the whole project and started again, following the Django tutorial webcast step-by-step. And I'm still having the same problem! I can't figure it out... Here's the media settings from settings.py: MEDIA_ROOT = '/home/username/webapps/static_media' MEDIA_URL = 'http://mysite.com/media/' ADMIN_MEDIA_PREFIX = 'http://mysite.com/media/admin/' Any ideas? ~Karen asked 08 Jan '11, 20:39 Karen McNeil |
Hi Karen, Try changing your ADMIN_MEDIA_PREFIX from
to
and make sure that in the control panel you have the admin symbolic link application mounted at /media/admin. Regards, Klynton J. WebFaction Support -- WebFaction - Smarter web hosting http://webfaction.com - http://twitter.com/webfaction answered 08 Jan '11, 20:42 klynton I made that change in the ADMIN_MEDIA_PREFIX and it didn't fix it... (I double checked and the symbolic link app is mounted at Any other suggestions?
(08 Jan '11, 22:16)
Karen McNeil
By the way, I was reading your response to a related question, and tried the things you suggested there. When I check Thanks, Karen
(08 Jan '11, 22:24)
Karen McNeil
Hi Karen, In that case you should remove that symlink application and create a new one with the full path to the admin media again so it isn't blinking red and it should work for you.
(08 Jan '11, 22:37)
klynton
I did that, and the app was still blinking red. So I tried different permutations of the origin path for the symlink, and the one that finally worked was: /home/username/webapps/django_app/lib/python2.6/django/contrib/admin/media The '/' at the beginning is what changed. The tutorial doesn't have that slash, and my projects use to work without it. Did something change?
(09 Jan '11, 07:49)
Karen McNeil
Our documentation is definitely wrong there. I'll make a note to have it updated ASAP. That slash is always required, otherwise it's treated as a relative symlink, which would result in
(09 Jan '11, 08:23)
David L ♦♦
Just FYI, the documentation has now been corrected :) Sorry about that!
(09 Jan '11, 09:30)
David L ♦♦
showing 5 of 6
show 1 more comments
|
Or add these two lines to your httpd.conf
You might need to check that your copy of django is in lib "python2.6", not "python2.5". answered 20 Jan '11, 16:53 johnm |