Example #1
0
 def _postprocess(self, context, content):
     for inject_func in get_provide_objects("xtheme_resource_injection"):
         if callable(inject_func):
             inject_func(context, content)
     add_edit_resources(context)
     content = inject_resources(context, content)
     return content
Example #2
0
 def _postprocess(self, context, content):
     for inject_func in get_provide_objects("xtheme_resource_injection"):
         if callable(inject_func):
             inject_func(context, content)
     add_edit_resources(context)
     content = inject_resources(context, content)
     return content
Example #3
0
    def _postprocess(self, context, content):
        # if the context contains the `allow_resource_injection` key and
        # it's value is False, we don't inject resources in the content
        if context and context.get("allow_resource_injection", True) is False:
            return content

        for inject_func in get_provide_objects("xtheme_resource_injection"):
            if callable(inject_func):
                inject_func(context, content)
        add_edit_resources(context)
        content = inject_resources(context, content)
        return content