1.问题1django 异常问题总结

在继承的类中:

django 异常问题总结

 

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 %}

 

相关文章:

  • 2022-12-23
  • 2021-10-10
  • 2021-04-20
  • 2022-12-23
  • 2021-12-15
  • 2021-08-26
  • 2021-10-13
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-04-16
  • 2022-12-23
  • 2021-05-31
相关资源
相似解决方案