解决:django 中使用 editor-md上传图片失败问题

问题

在这里插入图片描述

解决方法

  • editor 上传图片是 POST请求,csrf 验证失败就会报403错误
  • 可以自己手动在视图函数中让其取消 csrf验证
from django.views.decorators.csrf import csrf_exempt
@csrf_exempt
def xxx():
	pass

猜你喜欢

转载自blog.csdn.net/qq_29339467/article/details/107407298