Django - HttpResponseRedirect上的ValueError

时间:2011-11-26 12:11:08

标签: django django-models django-forms django-views http-redirect

我有这个观点:http://dpaste.com/661912/我有一个错误:/ fattura / save /的ValueError ...视图没有返回HttpResponse对象。我不知道为什么,因为我在同一个项目上有另一个非常相似的视图:http://dpaste.com/661913/正常工作。

这是urlconf:

# urls.py
from django.conf.urls.defaults import patterns, include, url


# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',


   ...
    url(r'^soggetto/save/','gpf1.views.anagrafica_save'),
  ...
    url(r'^fattura/save/','gpf1.views.fattura_save'),


    # Uncomment the admin/doc line below to enable admin documentation:
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
)

这里也没有太大的区别。 有什么帮助吗?

感谢

1 个答案:

答案 0 :(得分:0)

查看该视图,如果请求不是POST,或者表单无效,请查看返回的内容。然后你将有足够的信息自己回答这个问题。