fedora-happiness-packets/pyproject.toml
Justin Wheeler 3a0e6a840a
⬆️ frontend: Migrate CKEditor 4 → CKEditor 5
CKEditor 4 reached end-of-life in June 2023. The `django-ckeditor`
package (6.x) bundles CKEditor 4 and is no longer maintained. Replaced
with `django-ckeditor-5` (0.2.20) which wraps CKEditor 5.

The migration is intentionally minimal — Happiness Packets messages need
basic formatting (bold, italic, links, lists, blockquote) and no  more.
Image upload and the smiley plugin are removed. The toolbar is
explicitly restricted to prevent scope creep in user-generated content.

Changes:
- `pyproject.toml`: `django-ckeditor` → `django-ckeditor-5`
- `settings/base.py`: `CKEDITOR_CONFIGS` → `CKEDITOR_5_CONFIGS` with
  minimal toolbar; replaced `ckeditor` with `django_ckeditor_5` in
  `INSTALLED_APPS`; added `CKEDITOR_5_FILE_STORAGE` setting
- `models.py`: `RichTextField()` →
  `CKEditor5Field(config_name='default')`
- `urls.py`: Added `ckeditor5/` URL pattern; guarded `debug_toolbar`
  import with `try`/`except` (same pattern as `dev.py`)
- `message_send_form.html`: Removed CKEditor 4 manual script tags and
  jQuery image-resize workaround; CKEditor 5 injects its own assets via
  `{{ form.media }}`
- New migration 0008: `AlterField from RichTextField` to
  `CKEditor5Field` (no data migration — column type stays text, existing
  HTML content renders unchanged)

Assisted-by: Claude Opus 4.6 (1M context)
Signed-off-by: Justin Wheeler <jwheel@fedoraproject.org>
2026-05-10 12:47:01 -04:00

63 lines
1.5 KiB
TOML

[tool.poetry]
name = "fedora-happiness-packets"
version = "1.0.0"
description = "Send anonymous appreciation messages to Fedora community members"
license = "Apache-2.0"
readme = "README.md"
repository = "https://forge.fedoraproject.org/commops/fedora-happiness-packets"
[tool.poetry.dependencies]
python = ">=3.12,<3.15"
Django = ">=5.1,<5.2"
django-extensions = ">=3.2"
django-crispy-forms = ">=2.0"
crispy-bootstrap5 = ">=2024.2"
django-model-utils = ">=4.3"
python-dateutil = ">=2.8"
factory-boy = ">=3.2"
mozilla-django-oidc = ">=4.0"
fedora-messaging = ">=1.4.0"
happinesspacket-schema = ">=1.0.0"
celery = {version = ">=5.3,<5.5", extras = ["redis"]}
django-celery-email = ">=3.0"
psycopg2-binary = ">=2.9"
nh3 = ">=0.2.15"
Whoosh = "==2.7.4"
django-haystack = ">=3.2,<3.4"
python-fedora = "==0.10.0"
django-ckeditor-5 = ">=0.2.15"
gunicorn = ">=22.0"
[tool.poetry.group.dev.dependencies]
coverage = "*"
django-debug-toolbar = "*"
pytest = "*"
pytest-cov = "*"
pytest-django = "*"
pytest-mock = "*"
pytest-sugar = "*"
ruff = "*"
selenium = "*"
[tool.poetry.group.docs.dependencies]
sphinx = "*"
sphinx-rtd-theme = "*"
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "happinesspackets.settings.tsting"
addopts = [
"--cov=happinesspackets",
"--cov-report=html",
"--cov-report=term",
"--no-cov-on-fail",
]
[tool.ruff]
exclude = ["happinesspackets/*/migrations/*"]
[tool.ruff.lint]
ignore = ["E501", "F405"]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"