Use smart_str in views.py to prevent ascii conversion error

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.

Thanks