zhangfisher / djangoueditor Goto Github PK
View Code? Open in Web Editor NEWDjangoUeditor
DjangoUeditor
Hi,
您在widgets#Media里使用的是ueditor
路径,而在static文件夹下却是UEditor
。
大小写不一致导致相关文件404。
是建议我们自己放一份ueditor
的资源文件在项目里管理么?
BR,
在UeditorField里设置的height:300属性好像没作用
我出现个问题,高度设置不能成功,只能是80
比如设置了400,打开网页的时候高度是400,然后立刻被重置成80了??
有个疑问 , jquery 怎么取得ueditor的内容?
$("#baidu_editor_0") 方式 或这个id的后代 也取不了
我是小白, 误怪.
错误代码是'UEditorWidget' object has no attribute 'ueditor_options',指向models.py的25行,不太明白啊,为什么会找不到呢?
我在网页中添加了一个文本框,调用了ueditor可是查看firebug的时候,看到内容中虽然有baidu javascript的引入代码,在head中却找不到对应的js和css,最后导致不能显示控件,求指教。
http://soft.colfun.com/soft/add/
def getImagePath(model_instance=None):
return 'a/'
我在model里面设置了imagePath=getImagePath,上传图片会失败,如果直接设置路径就ok的。这个是为什么?
upload_settings={"imageManagerUrlPrefix":"a","imageManagerListPath":"a","imageManagerListSize":1}
这里不管我如何更改设置都不起作用,例如:图片管理里面一直是显示30个。是我漏掉了某些配置吗?
谢谢!
楼主辛苦了。
上传目录有用户限制功能吗?有了这个功能就是每个用户有自己的目录,这样图片浏览时可以有所区别,当然这个不用目录用其它方式也可以实现。
uquescommand=[
FenggeCommand(uiName="btn_fengge", icon="images/fengge.png", title=u"符",index=-1),
QingchuCommand(uiName="btn_qingchu", icon="images/qingchu.png", title=u"",index=-1),
]
btn_fengge,和btn_qingchu都不能显示出来。但只有一ueditor的情况,是正常的。
我使用MAC系统中的Safari 浏览器 能够正常使用单图上传、多图上传,但在WINXP 中使用IE8 时,单图上传点不动,多图上传提示“后端配置项没有正常加载,上传插件不能正常使用”,请高手指点一下,
本地上传图片不能成功啊,求指教
上传是成功了,路径不对
django提供的后台管理中通过定义widget 使用ueditor时,只有当对应的models内的字段名为content时才能正常显示ueditor界面。如果使用字段使用其它名字则无法正常显示。不知道是否和ueditor.html下面的这段代码有关: var ue = UE.getEditor('id_content');还是我的使用方法有错误?
<script type="text/javascript"> var ue = UE.getEditor('id_content'); ue.ready(function() { ue.setContent('娃哈哈哈哈哈哈,快点输入内容阿~~~~'); }); </script>不好意思,是我自己搞错了。我使用了其它人提供的模板。
上传过程中到得文件名后缀的哪句Spilt会有问题。
point_pos = file.name.rfind(".")#解决文件名出现多次.的情况
original_ext =file.name[point_pos+1:].lower()#解决配置和实际文件名大小写不匹配也会报错的bug。
这个统一大小写的ext最好也做进存储文件名里面,否则有可能导致存进去的文件因为大小的问题被imagemanager读取目录的时候所过滤
作者别在意,报bug主要还是为了共同打造一个生产系统可用的东西。
中间是不是漏了一步:
把DjangoUeditor文件夹复制到站点根目录。
Hi,
I just started using your package. But I keep getting this error.
I am using python 3.4
and the version of the package I am using is 1.8.143
nothing
我看到项目的.pyc文件都出来了.
图片可以上传,但上传后看不到,404。可能是解析不了,
在xadmin中运用时,Ueditor界面已经出来,加载到window.parent.UE.instants['ueditorInstant' + this.uid + '']时,得到window.parent.UE.instants['ueditorInstant0']的结果为undefined,导致不能_setup,且随便点什么按钮,到会报 property 'xxx' of undefined的错误
我这里发现,在chrome浏览器下编辑框无法直接输入中文,可以输入英文,可以粘贴中文。
在IE下没问题。
博主看下是不是Bug
chrome 35.0.1916.114下无法输入,所有按钮点击都没反应
Django1.7c2 + Python3.3 环境下安装后引用出现错误:
ImportError: bad magic number in 'DjangoUeditor': b'\x03\xf3\r\n'
详细描述在这里
django.core.exceptions.ImproperlyConfigured: Requested setting CACHES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
错误信息如下:
Exception Type: TypeError
Exception Value: MadeUeditorOptions() takes at most 10 arguments (11 given)
Exception Location: c:\Python27\lib\site-packages\DjangoUeditor\widgets.py in init, line 16
为啥?
id=edui 那个框的高度被固定成1000(editor_all.js 里面 initialFrameWidth:1000 这里设死了1000这个宽度)
url配置过了,也collectstatic过了
toolbar 永远用的都是老配置
在views.py L77 def ImageManager 前加@csrf_exempt 则没报csrf错误。
uploadfile视图里面的上传文件变量命名为file和内建变量会冲突。
求助:
from DjangoUeditor.models import UEditorField
class Blog(models.Model):
Name=models.CharField(,max_length=100,blank=True)
Content=UEditorField(u'内容 ',width=600, height=300, toolbars="full", imagePath="", filePath="", upload_settings={"imageMaxSize":1204000},
settings={},command=None,event_handler=myEventHander(),blank=True)
第一个是Name=models.CharField(,max_length=100,blank=True)这里括号内的第一个逗号语法报错
删了以后就好了
第二个是command=None,event_handler=myEventHander()中的myEventHander()没有定义
看官网的最新版到1.6.1了,作者有没有同步更新的想法,我报名参乎:可以Contribute一点代码。
Django-Ckeditor的那个东西不知道作者做了什么不兼容的东西,它的那个版本只能支持EN一种语言,真是太坑爹了,准备拥抱适合**市场的的Ueditor了。
我最近将这个项目集成到了我的个人博客上,而该博客是部署在SAE上的,处理用户上传文件要使用Storage。于是我自己简单写了下,不知道作者有么有你打算集成上SAE的呢?
能否告知如何实现,谢谢
求支持py3
把这编辑器添加到后台后,编辑后也没没有显示出来
第七点中 在模板添加到底是怎么个添加法的。。。
比如光调用一个批量图片上传,或文件上传,不过貌似这样的不应该用text字段,还有就是linux下是区分大小写的,在静态目录中。
用south的要先禁用才把字段搞上去。
在widget.py/UEditorWidget/init代码中
#上传路径
self.upload_settings = upload_settings.copy()
self.upload_settings.update({
"imagePathFormat": imagePath,
"filePathFormat": filePath
})
#保存
self.upload_settings =self.upload_settings.copy() # _此时imagePathFormat还是function
self.recalc_path(None) # _此时imagePathFormat才是function返回的目录_
而在widget.py/UEditorWidget/render中serverUrl使用的是function而非自定义的目录
uSettings["settings"].update({
"serverUrl": "/ueditor/controller/?%s" % urlencode(self._upload_settings)
})
传图片会被CSRF 403 ,望能尽快解决
上传多张图片可以。
上传单张图片可以看到图片已经上传成功(在服务器可以看到),并且返回了成功的json数据,但是编辑器里是一个等待圆圈不断闪。提示的对话框是问返回的json数据是否保存。
上传图片或文件的类型检查还是用file.content_type来判断吧,得出的是Mimetype比如""image/png",在通过检查的情况下,再根据content_type来确定相对应的正确的文件后缀名称
后端校验的标准是由前端传过来的,那么校验还有什么意义?你这个设计是不是存在缺陷?
/ueditor/controller/?imagePathFormat=&filePathFormat=&imageMaxSize=1204000
文件上传报500的错误。"POST /ueditor/FileUp/product_doc/ HTTP/1.1" 500 69993
是admin页面中
找了一下,没找到原因,之前的版本在图片上传的时候会有这个错误,现在忘了当初怎么改的了。
不够清晰啊,不够清晰啊
好像不能访问了。
上传图片或文件的类型检查还是用file.content_type来判断吧,得出的是Mimetype比如""image/png",在通过检查的情况下,用再给一种类型统一指定一个后缀,因为像jpeg可能会出现两种合法后缀。
注意:如果imagePath值只设置文件夹,则未尾要有"/" imagePath可以按python字符串格式化:如"images/%(basename)s_%(datetime)s.%(extname)"。这样如果上传test.png,则文件会 被保存为"{{MEDIA_ROOT}}/images/test_20140625122399.png"。
我这里报错 提示 incomplete format
检查后发现后面少了一个 s
应该是 images/%(basename)s_%(datetime)s.%(extname)s
现在只能保存到本地, 如果需求要保存到七牛或者别的第三方存储, 就需要自定义上传功能。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.