What's the difference between returning a `HttpResponseNotFound` and raising a `Http404` in Django?

后端 未结 0 450
无人及你
无人及你 2021-02-12 05:41

There are apparently two different ways to return a 404 error in Django: by returning a HttpResponseNotFound object or by raising an Http404 exception.

相关标签:
回答
  • 消灭零回复
提交回复
热议问题