美文网首页
Django admin 增加富文本编辑

Django admin 增加富文本编辑

作者: 穆容空空 | 来源:发表于2022-07-09 14:04 被阅读0次

(1)

pip install django-ckeditor

pip install pillow

(2) setting.py

INSTALLED_APPS = [

     ...

    'ckeditor',

    'ckeditor_uploader'

]

(3) setting.py

CKEDITOR_CONFOGS={

'default':{

'toolbar':'full',

        'height':300,

        'width':800,

    }

}

CKEDITOR_UPLOAD_PATH=''

(4) ulrs.py

urlpatterns = [

path('', views.index, name='index'),

    path('ckeditor/', include('ckeditor_uploader.urls'))

]

相关文章

网友评论

      本文标题:Django admin 增加富文本编辑

      本文链接:https://www.haomeiwen.com/subject/ohzbbrtx.html