コード例 #1
0
ファイル: engine.py プロジェクト: borland667/shuup
 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
コード例 #2
0
ファイル: engine.py プロジェクト: NamiStudio/shuup
 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
コード例 #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