If you use a SCRIPT_NAME (e.g. http://example.com/myprefix/myapp/) the preview of SQL and Templates was broken. I tested the patch with a prefix (mod_wsgi, apache) and without (runserver).
- SQL+Templates preview fix if SCRIPT_NAME set
This is related to #84.
This patch relies on BASE_URL, but in the current source, there's a comment saying it's only for backwards compatibility.
This pull request doesn't apply cleanly any more. There's a more recent patch in #421. I'm going to close this. Let's continue the discussion on #84.
Thanks for your contribution, and sorry for not replying earlier.