视图.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
Tags:
你可以试试这个:
from django.http import HttpResponse
您从错误的位置导入
django.http这是正确的位置
from django.http import HttpResponse
相关问题 更多 >
编程相关推荐