Issue
views.py
from django import HttpResponse
def hello(request):
return HttpResponse("Hello world ! ")
Request Method: GET Request URL: http://127.0.0.1:8000/hello/ Django Version: 1.3.1 Exception Type: ImportError Exception Value: cannot import name HttpResponse
Solution
You can try this: from django.http import HttpResponse
Answered By – juankysmith
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0