def discover_plugins(self): if self.discovered: return self.discovered = True from cms.views import invalidate_cms_page_cache invalidate_cms_page_cache() load('cms_plugins')
def discover_plugins(self): if self.discovered: return from cms.views import invalidate_cms_page_cache invalidate_cms_page_cache() load('cms_plugins') self.discovered = True
def apphook_post_delete_title_checker(instance, **kwargs): """ Check if this was an apphook """ from cms.views import invalidate_cms_page_cache invalidate_cms_page_cache() if instance.page.application_urls: request_finished.connect(trigger_restart, dispatch_uid=DISPATCH_UID)
def apphook_post_page_checker(page): old_page = page.old_page if (old_page and ( old_page.application_urls != page.application_urls or old_page.application_namespace != page.application_namespace)) or ( not old_page and page.application_urls): from cms.views import invalidate_cms_page_cache invalidate_cms_page_cache() request_finished.connect(trigger_restart, dispatch_uid=DISPATCH_UID)
def apphook_post_page_checker(page): old_page = page.old_page if (old_page and (old_page.application_urls != page.application_urls or old_page.application_namespace != page.application_namespace)) or ( not old_page and page.application_urls): from cms.views import invalidate_cms_page_cache invalidate_cms_page_cache() request_finished.connect(trigger_restart, dispatch_uid=DISPATCH_UID)
def post_delete_page(instance, **kwargs): update_home(instance, **kwargs) apphook_post_delete_page_checker(instance) from cms.views import invalidate_cms_page_cache invalidate_cms_page_cache()