Fix some issues with relative urls
Review Request #340 — Created April 4, 2008 and submitted — Latest diff uploaded
This patch fixes a few problems with relative URLs. 1. django.contrib.auth.User.get_absolute_url() hard-codes a leading '/'. When you have a SITE_ROOT='/', this leads to links like <a href="//users/foo/">, which doesn't get treated as a relative URL. I fixed this by slicing away the first letter from User.get_absolute_url(). I think this fixes most of the problems stated in the referenced bug numbers. 2. When IE loads *.htc files, paths are treated relative to the _document_, not the script. So, I moved some of the code in ie_hacks.css to base.html, where I can inject MEDIA_URL. In pngfix.htc, I also added a MEDIA_URL reference so it can find blank.gif.
Tried things manually -- the user links now work correctly everywhere I could find, and IE got its transparent PNGs back.