Hi, we had utf-8 characters in our sql queries and django debug toolbar was crashing when we clicked on SQL or EXPL for these queries.
The following commit fixes this bug by forcing the use of smart_str on all strings required to build the hash (this is roughly what is being done in tracking/db.py.
fixed sql and explain with unicode.
Surround template source code with <pre> for easier copy/paste.
I'm sorry, I didn't notice this pull request (I just started maintaining the DDT) and committed a very similar patch in d3be928 and 9b39206. I think this issue is fixed. Thanks for your contribution!