1.安装: pip install django-ckeditor 安装CKEditor富文本编辑器
pip install pillow 安装图形处理模块
2.配置ckeditor ,在项目的settings.py文件的INSTALLED_APPS中加上ckeditor。
INSTALLED_APPS = [ "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", # 添加下面一行代码即可 'app01.apps.App01Config' , # 注册 app01 "ckeditor",