ckeditor/widget.html 못 찾으면 어떡해

694 단어 ckeditordjango
Overriding widget template
In Django 1.11 and 2.x for overriding ckeditor/widget.html you have two ways:
  • 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.
  • Place ckeditor/widget.html in your_app/templates and place 'your_app' before 'ckeditor' and 'ckeditor_uploader' in INSTALLED_APPS.
  • 좋은 웹페이지 즐겨찾기