File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,8 @@ debugging. You can access the name of the signal with the
131
131
missing blinker installations, you can do so by using the
132
132
:class: `flask.signals.Namespace ` class.
133
133
134
+ .. _signals-sending :
135
+
134
136
Sending Signals
135
137
---------------
136
138
@@ -156,6 +158,17 @@ function, you can pass ``current_app._get_current_object()`` as sender.
156
158
that :data: `~flask.current_app ` is a proxy and not the real application
157
159
object.
158
160
161
+
162
+ Signals and Flask's Request Context
163
+ -----------------------------------
164
+
165
+ Signals fully support :ref: `reqcontext ` when receiving signals. Context-local
166
+ variables are consistently available between :data: `~flask.request_started ` and
167
+ :data: `~flask.request_finished `, so you can rely on :class: `flask.g ` and others
168
+ as needed. Note the limitations described in :ref: `signals-sending ` and the
169
+ :data: `~flask.request_tearing_down ` signal.
170
+
171
+
159
172
Decorator Based Signal Subscriptions
160
173
------------------------------------
161
174
You can’t perform that action at this time.
0 commit comments