used the get_object_or_404 function from the django.shortcuts library on views.details