django 异常问题总结

1.问题1

在继承的类中:

 

403错误:

views 添加:from django.core.context_processors import csrf

def TestUEditor(request):
    if request.method == 'POST':
        form = TestUEditorForm(request.POST)
    else:
        form = TestUEditorForm(
            initial={'Description': u'测试'}
        )

    return render_to_response('test2.html', {'form': form},context_instance=RequestContext(request))
添加红色的部分。

template 添加  

{% csrf_token %}

 

posted @ 2017-06-29 22:50  whmmm  阅读(361)  评论(0)    收藏  举报
//增加一段JS脚本,为目录生成使用