1👍
✅
You actually want to connect a signal to CMSPlugin
, not Page
.
Something like this (untested!) might work:
def signal_handler(instance, **kwargs):
if not isinstance(instance, CMSPlugin):
return
page = Page.objects.get(reverse_id='extra-placeholders', publisher_is_draft = True)
if page.placeholders.filter(pk=instance.placeholder_id).exists():
page.publish()
post_save.connect(signal_handler)
👤ojii
Source:stackexchange.com