Skip to content

Commit 4ddbe28

Browse files
authored
Adjust rendering for django CMS 5.1 and 5.0 compatibility
Updated rendering logic to accommodate changes in django CMS 5.1 and 5.0.
1 parent 009535b commit 4ddbe28

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

djangocms_alias/rendering.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ def render_alias_structure_js(context: dict, renderer: BaseRenderer, obj: models
8282
continue
8383
ph.is_static = True
8484
try:
85+
# django CMS 5.1+: page kw argument has been replaced by the obj kw argument
8586
js_parts.append(renderer.render_placeholder(ph, language=lang, obj=obj))
8687
except TypeError:
88+
# django CMS 5.0
8789
js_parts.append(renderer.render_placeholder(ph, language=lang, page=obj))
8890
return "\n".join(js_parts)
8991

0 commit comments

Comments
 (0)