Example #1
0
 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')
Example #2
0
 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
Example #3
0
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)
Example #4
0
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)
Example #5
0
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)
Example #6
0
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)
Example #7
0
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()
Example #8
0
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()