开发者

Can django-comments handle multiple comment forms on the page?

I have multiple models on a Django-powered webpage that have a django.contrib.comments form rendered for each. On this page, a post from one of these forms to /comments/post/ always res开发者_如何学编程ults in:

Forbidden (403)
CSRF verification failed. Request aborted.

If I include the same comment form code on another page where there is just one such form, it posts just fine.

Also fyi, I have included 'django.middleware.csrf.CsrfViewMiddleware' in the MIDDLEWARE_CLASSES and the {% csrf_token %} inside the comment form.

Any thoughts on this error or getting multiple django-comments forms on a page submitting correctly?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜