2011-10-21 17 views
6

views.pyadı HttpResponse alamıyor

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 

cevap

18

Bu deneyebilirsiniz: from django.http import HttpResponse

+0

tamam! Teşekkürler ! – fuhao715

2

Yanlış yerden ithal ediyoruz

django.http bu hakkın konumu from django.http import HttpResponse

olduğunu