示例#1
0
def test_without_rc():
    request = get_request()
    (template, layout, gibberish, ctx) = get_test_template_bits(request)
    assert not add_resource(ctx, "yes", "hello.js")
    content1 = "<html>"
    content2 = inject_resources(ctx, content1)
    assert content1 == content2
示例#2
0
def test_without_rc():
    request = get_request()
    (template, layout, gibberish, ctx) = get_test_template_bits(request)
    assert not add_resource(ctx, "yes", "hello.js")
    content1 = "<html>"
    content2 = inject_resources(ctx, content1)
    assert content1 == content2
示例#3
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
示例#4
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
示例#5
0
文件: engine.py 项目: Jeewes/shoop
 def _postprocess(self, context, content):
     # TODO: Add a hook here for addons to inject resources without plugins
     add_edit_resources(context)
     content = inject_resources(context, content)
     return content
示例#6
0
文件: engine.py 项目: krisera/shoop
 def _postprocess(self, context, content):
     # TODO: Add a hook here for addons to inject resources without plugins
     add_edit_resources(context)
     content = inject_resources(context, content)
     return content