Site Overlay

django整合ckeditor

安装ckeditor

pip install django-ckeditor 

配置setting.py

# 将ckeditor注册到django
INSTALLED_APPS = [
   ……
  'ckeditor',
  'ckeditor_uploader',
]

model模型中字段使用编辑器

model.py

class xxxxx(model.Model):
    ……
    field_name = RichTextField()

如此配置后台相应字段即可使用ckeditor富文本编辑器

Leave a Reply

Your email address will not be published. Required fields are marked *