1👍
✅
when you try
print('c ' + sys.exc_info()[0])
it raise TypeError: cannot concatenate ‘str’ and ‘type’ objects
so you should use:
print('c %s' % sys.exc_info()[0])
also look at get_object_or_404
Source:stackexchange.com