2012-07-31 85 views
0

當我嘗試直接在模板中寫入placeholder時,出現此錯誤。實在找不到頭緒,我已經做了在文檔django-cms,模板編輯不起作用

ValueError at /admin/cms/page/3/edit-plugin/4 
The view home.views.index didn't return an HttpResponse object. 

這裏究竟喜歡所示的步驟是我的urls.py:

http://pastebin.com/zZX1MkMh

我失去了什麼東西?

感謝

+2

粘貼views.py。 – iMom0 2012-07-31 13:13:56

+0

http://pastebin.com/E14bNX2A這裏是views.py – doniyor 2012-07-31 20:33:43

回答

0

如果request.path不匹配您提供的任何模式,你會得到錯誤didn't return an HttpResponse object.

這添加到末尾:

else: 
    return HttpResponse(status=404) 
+0

這有幫助嗎? – iMom0 2012-08-04 07:31:20