Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions network-api/networkapi/wagtailpages/wagtail_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
from wagtail.core import hooks
from networkapi.wagtailpages.pagemodels.products import BuyersGuidePage, ProductPage

# The real code runs "instance.sync_trees()" here, but we want this to do nothing instead,
# so that locale creation creates the locale entry but does not try to sync 1300+ pages as
# part of the same web request.
from django.db.models.signals import post_save
from wagtail_localize.models import LocaleSynchronization, sync_trees_on_locale_sync_save
post_save.disconnect(sync_trees_on_locale_sync_save, sender=LocaleSynchronization)


# Extended rich text features for our site
@hooks.register('register_rich_text_features')
Expand Down