I'm working my way through a Django book and I just noticed something strange the other day. The CSS code works just fine in Safari 3 (on Mac and Windows) but not in Firefox 3 (Windows). I'm running the django dev web server and I can see the css file being called in the console when in Safari but not when using Firefox. Any idea on what might be happening?
A:
Are you missing or do you have an extra slash in any of your paths?
E.g.
admin.site.root_path = 'admin'
Instead of
admin.site.root_path = '/admin/'
..in your urls.py
Or something similar in your settings.py?
bchang
2009-06-18 01:49:51
I've left both MEDIA_ROOT and MEDIA_URL at their defaults (which is blank). The info related to CSS in urls.py is posted in my last comment above. I can't seem to figure out how to format the code in these comments. Or can you even do that? Sorry, first time poster here.
kfordham281
2009-06-18 02:27:14
A:
I am an idiot....
This was the link to my css file in my head :
<link rel="sytlesheet" href="/site_media/style.css" type="text/css" />
Umm... that's not how you spell "stylesheet"! Interesting that Webkit (Chrome and Safari) displayed the css even with the misspelling. I figured it out when I went to the next chapter in the book and the jquery examples were working and the jquery.js file was in the same directory. Something just wasn't adding up.
Sorry for the horrible question!
kfordham281
2009-06-18 02:36:59