Bugfix in views.py

There can be exceptions that dont have a reason attribute. I check
this now and use (if not presented) the standard message attribute of
the exception.