From d867cac3b21c8f80ef347a864099141224a97311 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Sun, 8 Jun 2025 16:02:32 +0200 Subject: [PATCH] Removed ckeditor. see #3316 --- .../core/commands/templates/settings.py.tpl | 35 ------------------ pyproject.toml | 2 - test_project/test_project/settings.py | 37 ------------------- 3 files changed, 74 deletions(-) diff --git a/modoboa/core/commands/templates/settings.py.tpl b/modoboa/core/commands/templates/settings.py.tpl index 2ac1ab179..7e5f66d29 100644 --- a/modoboa/core/commands/templates/settings.py.tpl +++ b/modoboa/core/commands/templates/settings.py.tpl @@ -61,8 +61,6 @@ INSTALLED_APPS = ( 'django.contrib.sites', 'django.contrib.staticfiles', 'reversion', - 'ckeditor', - 'ckeditor_uploader', 'oauth2_provider', 'corsheaders', 'rest_framework', @@ -333,38 +331,6 @@ AUTH_PASSWORD_VALIDATORS = [ OTP_TOTP_ISSUER = "{{ allowed_host }}" -# CKeditor - -CKEDITOR_UPLOAD_PATH = "uploads/" - -CKEDITOR_IMAGE_BACKEND = "pillow" - -CKEDITOR_RESTRICT_BY_USER = True - -CKEDITOR_BROWSE_SHOW_DIRS = True - -CKEDITOR_ALLOW_NONIMAGE_FILES = False - -CKEDITOR_CONFIGS = { - 'default': { - 'allowedContent': True, - 'toolbar': 'Modoboa', - 'width': None, - 'toolbar_Modoboa': [ - ['Bold', 'Italic', 'Underline'], - ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], - ['BidiLtr', 'BidiRtl', 'Language'], - ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent'], - ['Undo', 'Redo'], - ['Link', 'Unlink', 'Anchor', '-', 'Smiley'], - ['TextColor', 'BGColor', '-', 'Source'], - ['Font', 'FontSize'], - ['Image', ], - ['SpellChecker'] - ], - }, -} - # Logging configuration LOGGING = { @@ -421,7 +387,6 @@ LOGGING = { SILENCED_SYSTEM_CHECKS = [ "security.W019", # modoboa uses iframes to display e-mails - "ckeditor.W001", # CKEditor 4.22.1 warning ] PHONENUMBER_DB_FORMAT = 'INTERNATIONAL' diff --git a/pyproject.toml b/pyproject.toml index d6a50a920..6cfa37a5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,6 @@ keywords = ["email"] license = {file = "LICENSE"} dependencies = [ "django>4.0,<5.0", - "django-ckeditor==6.7.3", "django-phonenumber-field[phonenumbers]==8.1.0", "django-reversion==5.1.0", "django-xforwardedfor-middleware==2.0", @@ -51,7 +50,6 @@ dependencies = [ "feedparser==6.0.11", "fido2==1.2.0", "gevent==25.5.1", - "Pillow", # Optional dependency for django-ckeditor "progressbar33==2.4", "python-dateutil", "cryptography", diff --git a/test_project/test_project/settings.py b/test_project/test_project/settings.py index 762308a78..86426a62a 100644 --- a/test_project/test_project/settings.py +++ b/test_project/test_project/settings.py @@ -66,8 +66,6 @@ INSTALLED_APPS = ( "django.contrib.sites", "django.contrib.staticfiles", "reversion", - "ckeditor", - "ckeditor_uploader", "oauth2_provider", "corsheaders", "rest_framework", @@ -327,40 +325,6 @@ AUTH_PASSWORD_VALIDATORS = [ }, ] -# CKeditor - -CKEDITOR_UPLOAD_PATH = "uploads/" - -CKEDITOR_IMAGE_BACKEND = "pillow" - -CKEDITOR_RESTRICT_BY_USER = True - -CKEDITOR_BROWSE_SHOW_DIRS = True - -CKEDITOR_ALLOW_NONIMAGE_FILES = False - -CKEDITOR_CONFIGS = { - "default": { - "allowedContent": True, - "toolbar": "Modoboa", - "width": None, - "toolbar_Modoboa": [ - ["Bold", "Italic", "Underline"], - ["JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock"], - ["BidiLtr", "BidiRtl", "Language"], - ["NumberedList", "BulletedList", "-", "Outdent", "Indent"], - ["Undo", "Redo"], - ["Link", "Unlink", "Anchor", "-", "Smiley"], - ["TextColor", "BGColor", "-", "Source"], - ["Font", "FontSize"], - [ - "Image", - ], - ["SpellChecker"], - ], - }, -} - # Logging configuration LOGGING = { @@ -415,7 +379,6 @@ LOGGING = { SILENCED_SYSTEM_CHECKS = [ "security.W019", # modoboa uses iframes to display e-mails - "ckeditor.W001", # CKEditor 4.22.1 warning ] DISABLE_DASHBOARD_EXTERNAL_QUERIES = False