condense debugging to two nav-buttons: clear id from redis, print template context. remove legacy code.  replace middleware with view preprocessor which sets debug kwarg when DJANG_DEBUG is True.