Update profile.py, allow process_exception middleware to fire

process_exception middleware will get skipped if the exception happens "in the middleware" rather than "in the view".