【发布时间】:2016-06-09 18:54:06
【问题描述】:
我使用 django-nocaptcha-recaptcha 并遵循文档中的确切步骤:https://github.com/ImaginaryLandscape/django-nocaptcha-recaptcha
这是我的看法:
def home(request):
if request.method == 'POST':
form = PostForm(request.POST or None)
if form.is_valid():
save_it = form.save(commit=False)
save_it.save()
return HttpResponseRedirect(reverse(view, args=(save_it.pk,)))
else:
form = PostForm(request.POST or None)
return render(request, "home.html", locals())
我在提交表单时收到此错误消息,但重新验证码仍未选中:
The view posts.views.home didn't return an HttpResponse object. It returned None instead.
我希望没有我忘记的必要信息。任何帮助将不胜感激
【问题讨论】:
标签: python django django-views recaptcha