Skip to content

Commit

Permalink
Fixed template_rendered example in signal documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrluanma authored and mitsuhiko committed Aug 15, 2010
1 parent a3f78af commit 36a421b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/signals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ to the template::
@contextmanager
def captured_templates(app):
recorded = []
def record(template, context):
def record(sender, template, context):
recorded.append((template, context))
template_rendered.connect(record, app)
try:
Expand Down Expand Up @@ -87,7 +87,7 @@ its own which simplifies the example above::

def captured_templates(app):
recorded = []
def record(template, context):
def record(sender, template, context):
recorded.append((template, context))
return template_rendered.connected_to(record, app)

Expand Down Expand Up @@ -155,7 +155,7 @@ With Blinker 1.1 you can also easily subscribe to signals by using the new
from flask import template_rendered

@template_rendered.connect_via(app)
def when_template_rendered(template, context):
def when_template_rendered(sender, template, context):
print 'Template %s is rendered with %s' % (template.name, context)

Core Signals
Expand Down

0 comments on commit 36a421b

Please sign in to comment.