django · django/DoesNotExist
DoesNotExist
DoesNotExist
Raised by Model.objects.get() when no record matches the query filter. Each model class has its own DoesNotExist subclass (e.g. User.DoesNotExist). Use get_object_or_404() in views, or catch explicitly to return a fallback response.