Snippets

eSolution Wagtail oldal aloldalainak kötegelt publikálása

Created by Istvan Farkas
1
2
3
4
5
6
7
# Manage.py shell után kell soronként bemásolni
from wagtail.core.models import Page
parent = Page.objects.get(pk=<id>)
qs = parent.get_children()
for o in qs:
    o.get_latest_revision().publish(user=o.owner, log_action='wagtail.publish.scheduled')
    print(o.id, o.title)

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.