Tutorial by Examples

Use a signal's connect method to connect a function to a signal. When a signal is sent, each connected function is called with the sender and any named arguments the signal provides. from flask import template_rendered def log_template(sender, template, context, **kwargs): sender.logger.in...
If you want to create and send signals in your own code (for example, if you are writing an extension), create a new Signal instance and call send when the subscribers should be notified. Signals are created using a Namespace. from flask import current_app from flask.signals import Namespace n...

Page 1 of 1