下载
https://github.com/twz915/DjangoUeditor3/
安装
1)cd DjangoUeditor3-2.0
2)python setup.py install
设置
# 上传图片
MEDIA_ROOT = os.path.join(BASE_DIR, 'media').replace("\\", "/")
MEDIA_URL = '/media/'
注册应用-- 'DjangoUeditor'
模型:
content = UEditorField(width=600, height=300, toolbars="full",
imagePath="news/%(basename)s_%(datetime)s.%(extname)s", filePath="files/")
路由:
path('ueditor/', include('DjangoUeditor.urls')),
网友评论