Django admin 增加富文本编辑

2022-07-09  本文已影响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'))

]

上一篇 下一篇

猜你喜欢

热点阅读