码农甲

导航

django comments

To get started using the comments app, follow these steps:

  1. Install the comments framework by adding 'django.contrib.comments' to INSTALLED_APPS.
  2. Run manage.py syncdb so that Django will create the comment tables.

  3. Add the comment app’s URLs to your project’s urls.py:
urlpatterns = patterns('',
    ...
    (r'^comments/', include('django.contrib.comments.urls')),
    ...
)

 

4.如果提交评论时发生如下错误:CSRF verification failed. Request aborted.

按如下方法解决即可

(1)在Settings.py里的MIDDLEWARE_CLASSES增加配置:(一般默认就有)
'django.middleware.csrf.CsrfViewMiddleware',

 

posted on 2013-06-09 17:30  码农甲  阅读(337)  评论(0编辑  收藏  举报