ckeditor/widget.html找不到怎么办

Overriding widget template

In Django 1.11 and 2.x for overriding ckeditor/widget.html you have two ways:

  1. Place ckeditor/widget.html in BASE_DIR/templates

     (1)Change FORM_RENDERER to TemplateSettings.

    FORM_RENDERER = 'django.forms.renderers.TemplatesSetting'
    

    (2)Include templates folder in DIRS 

    TEMPLATES = [{
        ...
        'DIRS': [os.path.join(BASE_DIR, 'templates'), ],
        ...
    }]
    
    (3)Add 'django.forms' to INSTALLED_APPS.
  2. Place ckeditor/widget.html in your_app/templates and place 'your_app' before 'ckeditor' and 'ckeditor_uploader' in INSTALLED_APPS.

你可能感兴趣的:(ckeditor,django)