Junior — Senior
Ensuring correct response when the model record is absent
livecode
Task condition
It is necessary to implement a check: if the requested model object is not found (for example, a record with the specified slug is missing), the request should be properly terminated, for example by returning a 404 error page.
# views.py
# TODO: add handling for the case when the model object is not found (for example, using get_object_or_404)