GithubHelp home page GithubHelp logo

Comments (2)

inflation avatar inflation commented on August 30, 2024

补充一下,是admin管理页面被403,不知道能不能在admin页面中加入csrf验证

from djangoueditor.

zhangfisher avatar zhangfisher commented on August 30, 2024

这个问题可以有几种办法解决:
1、去修改ueditor的源码,这样子如果升级uedit升级就比较麻烦,而且还得去分析其源码,要怎么改都是个问题,不推荐。
2、将settings里面的CSRF中间件去掉,当然也就没有csrf保护了,也没有这个问题了。一般小应用也无所谓的
3、修改DjangoUedit的views.py,加上@csrf_exempt,类似这样:

from django.views.decorators.csrf import csrf_exempt

@csrf_exempt
def UploadFile(request,uploadtype,uploadpath):

@csrf_exempt
def RemoteCatchImage(request,imagepath):

发件人: Leonardo Hu
发送时间: 2012-10-23 14:53
收件人: zhangfisher/DjangoUeditor
主题: Re: [DjangoUeditor] 上传图片出现问题! (#2)
补充一下,是admin管理页面被403,不知道能不能在admin页面中加入csrf验证

Reply to this email directly or view it on GitHub.

from djangoueditor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.