From dba2522c8b521861de4049cc737a2e8e83da02b8 Mon Sep 17 00:00:00 2001 From: Lele Gaifax Date: Thu, 7 Sep 2023 17:19:12 +0200 Subject: [PATCH] Try to fix issue with staticfiles in production See also https://github.com/isotoma/wagtailtinymce/pull/22. --- wagtailtinymce/wagtail_hooks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wagtailtinymce/wagtail_hooks.py b/wagtailtinymce/wagtail_hooks.py index 659e4ebb..9c31bc3d 100644 --- a/wagtailtinymce/wagtail_hooks.py +++ b/wagtailtinymce/wagtail_hooks.py @@ -27,6 +27,7 @@ import json from django import __version__ as DJANGO_VERSION +from django.conf import settings from django.templatetags.static import static from django.utils import translation from django.utils.html import escape @@ -85,7 +86,7 @@ def insert_editor_js(): ' window.tinymce.suffix = "";' '}}());' '', - to_js_primitive(static('wagtailtinymce/js/vendor/tinymce')), + to_js_primitive(settings.STATIC_URL + 'wagtailtinymce/js/vendor/tinymce'), ) js_includes = _format_js_includes([ 'wagtailtinymce/js/vendor/tinymce/jquery.tinymce.min.js',