コード例 #1
0
    def test_helper_methods(self):
        with self.app.test_request_context():
            connect_event('test-event', self.callback)
            events = [event for event in iter_listeners('test-event')]
            emit_result = emit_event('test-event')

        self.assertEquals(len(events), 1)
        self.assertEquals(emit_result, ["Fred"])
コード例 #2
0
    def setup(self):
        self.register_blueprint(hello, url_prefix="/plugin/new")

        connect_event("after_navigation", hello_world)
        connect_event("after_navigation", hello_world2)

        connect_event("tmpl_before_content", inject_hello_world)
        connect_event("tmpl_before_content", inject_hello_world2)

        connect_event("tmpl_navigation_last", inject_navigation_link)
コード例 #3
0
ファイル: __init__.py プロジェクト: fangbei/flask-plugins
    def setup(self):
        self.register_blueprint(hello, url_prefix="/hello")

        connect_event("after_navigation", hello_world)
        connect_event("after_navigation", hello_world2)

        connect_event("tmpl_before_content", inject_hello_world)
        connect_event("tmpl_before_content", inject_hello_world2)

        connect_event("tmpl_navigation_last", inject_navigation_link)
コード例 #4
0
ファイル: __init__.py プロジェクト: obinnaeye/weko
    def setup(self):
        self.register_blueprint(hello, url_prefix='/hello')

        connect_event('after_navigation', hello_world)
        connect_event('after_navigation', hello_world2)

        connect_event('tmpl_before_content', inject_hello_world)
        connect_event('tmpl_before_content', inject_hello_world2)

        connect_event('tmpl_navigation_last', inject_navigation_link)
コード例 #5
0
    def setup(self):
        self.register_blueprint(hello, url_prefix="/hello")

        connect_event("footer_tab_header", inject_tab_header)
        connect_event("footer_tab_content", inject_tab_content)

        connect_event("tmpl_navigation_last", inject_navigation_link)
        connect_event("tmpl_navigation_dropdown",
                      inject_dropdown_navigation_link)
コード例 #6
0
ファイル: __init__.py プロジェクト: prodatalab/flaskbb
 def setup(self):
     self.register_blueprint(portal, url_prefix="/portal")
     connect_event("before-first-navigation-element", inject_portal_link)
コード例 #7
0
ファイル: __init__.py プロジェクト: djsilcock/flaskbb
 def setup(self):
     self.register_blueprint(plugin_bp, url_prefix="/plugin-name")
     connect_event("before-first-navigation-element", inject_navigation_link)
コード例 #8
0
ファイル: __init__.py プロジェクト: AnantharamanG2/flaskbb
 def setup(self):
     self.register_blueprint(portal, url_prefix="/portal")
     connect_event("before-first-navigation-element", inject_portal_link)