Various fixes for docs

This is a fix for some doc issues introduced in the context branch. Adding `$Context` exposed a problem where dollar signs weren't significant in doc links. I've tried to fix this but I'm definitely not a Django expert, so it'd be good to know if this isn't right.

I plan to add more stuff to this soon to document some undocumented symbols that came in with the context branch, but it'd be good to know if what I've got so far is along the right lines.