Django笔记-常见错误整理

1、csrf错误

解决方法:在settings.py里注释掉相关内容即可

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    #'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

 

posted @ 2015-03-29 16:43  VNX  阅读(164)  评论(0编辑  收藏  举报