1. from django.http import HttpResponse

示例

  1. return HttpResponse("Text only, please.", content_type="text/plain")

可以向其中加内容

  1. >>> response = HttpResponse()
  2. >>> response.write("<p>Here's the text of the Web page.</p>")
  3. >>> response.write("<p>Here's another paragraph.</p>")