Override for a django bug with "View on site"
Merge pull request #886 from zefciu/RALPH-1694

Fixes #767.