Skip to content

Commit 3129af8

Browse files
committed
Fix: djangocms-text-ckeditor compatibility
1 parent 515995e commit 3129af8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

djangocms_frontend/component_pool.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ def find_cms_component_templates() -> list[tuple[str, str]]:
3030

3131
class CMSAutoComponentDiscovery:
3232
default_field_context = {
33-
"djanghocms_text": "djangocms_text.fields.TextFormField",
34-
"djanghocms_text_ckeditor": "djangocms_text_ckeditor.fields.TextFormField",
33+
"djangocms_text": "djangocms_text.fields.HTMLFormField",
34+
"djangocms_text_ckeditor": "djangocms_text_ckeditor.fields.HTMLFormField",
3535
"djangocms_link": "djangocms_link.fields.LinkFormField",
3636
"djangocms_frontend": [
3737
"djangocms_frontend.contrib.image.fields.ImageFormField",
@@ -56,6 +56,7 @@ def get_field_context(self) -> dict:
5656
if "." in field:
5757
module, field_name = field.rsplit(".", 1)
5858
field_context[field_name] = importlib.import_module(module).__dict__[field_name]
59+
print(field_context)
5960
return field_context
6061

6162
@staticmethod
@@ -141,9 +142,10 @@ def setup():
141142
update_plugin_pool()
142143
components._discovered = True
143144

144-
if text_config := apps.get_app_config("djangocms_text"):
145+
if apps.is_installed("djangocms_text"):
145146
# Hack - update inline editable fields in case djangocms_text is installed
146147
# BEFORE djangocms_frontend in INSTALLED_APPS
148+
text_config = apps.get_app_config("djangocms_text")
147149
if text_config.inline_models:
148150
# Already initialized? Need to initialize again
149151
# to reflect inline fields in of just discovered components

0 commit comments

Comments
 (0)