2014-06-27 139 views
0

我試圖運行與appengine的Django項目。它在本地主機上正常運行。但是,當我試圖把它上傳到的appspot.com這是給我下面的錯誤導入錯誤在/無模塊命名響應與Django的發佈

ImportError at/
No module named response 

這裏是traceback

views.py

from django.http.response import HttpResponse 
def home(request): 
    return HttpResponse("Hello World") 

的app.yaml

application: demoapptotest 
version: 1 
runtime: python27 
api_version: 1 
threadsafe: true 

handlers: 

- url: /.* 
    script: main.application 

libraries: 

- name: django 
    version: latest 
- name: PIL 
    version: latest 

env_variables: 
    DJANGO_SETTINGS_MODULE: 'app1.settings' 

回答

1

你應該做from django.http import HttpResponse

+0

謝謝,你能告訴我什麼問題'從django.http.response導入HttpResponse'? – fledgling

相關問題