replacing crud functions with get_object_or_404

get_object_or_404 is simple and reduces code complexity in the view.