A

Admin • 828.03K Points
Coach

Q. What does the get_object_or_404 function do?

  • (A) Returns object or shows 500 error
  • (B) Redirects on error
  • (C) Returns object or raises 404 error
  • (D) Logs missing object
  • Correct Answer - Option(C)
  • Views: 14
  • Filed under category Django
  • Hashtags:

Explanation by: Admin
get_object_or_404 returns an object or raises Http404 if not found.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.