@@ -55,7 +55,7 @@ to the template::
55
55
@contextmanager
56
56
def captured_templates(app):
57
57
recorded = []
58
- def record(template, context):
58
+ def record(sender, template, context):
59
59
recorded.append((template, context))
60
60
template_rendered.connect(record, app)
61
61
try:
@@ -87,7 +87,7 @@ its own which simplifies the example above::
87
87
88
88
def captured_templates(app):
89
89
recorded = []
90
- def record(template, context):
90
+ def record(sender, template, context):
91
91
recorded.append((template, context))
92
92
return template_rendered.connected_to(record, app)
93
93
@@ -155,7 +155,7 @@ With Blinker 1.1 you can also easily subscribe to signals by using the new
155
155
from flask import template_rendered
156
156
157
157
@template_rendered.connect_via(app)
158
- def when_template_rendered(template, context):
158
+ def when_template_rendered(sender, template, context):
159
159
print 'Template %s is rendered with %s' % (template.name, context)
160
160
161
161
Core Signals
0 commit comments