File tree Expand file tree Collapse file tree 3 files changed +25
-3
lines changed
content/pages/examples/flask Expand file tree Collapse file tree 3 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,11 @@ sidebartitle: flask.signals got_request_exception
77meta: Python example code that shows how to use the got_request_exception callable from the flask.signals module of the Flask project.
88
99
10- got_request_exception is a callable within the flask.signals module of the Flask project.
10+ [ got_request_exception] ( https://github.com/pallets/flask/blob/master/src/flask/signals.py )
11+ is a signal defined in the [ Flask] ( /flask.html ) project's
12+ ` flask.signals ` module that interrupts the WSGI flow when there is an
13+ issue with the HTTP request. It can also be thrown by your own
14+ view functions if there is an error and you want to raise it via a signal.
1115
1216
1317## Example 1 from flask-restx
Original file line number Diff line number Diff line change @@ -7,7 +7,16 @@ sidebartitle: flask.signals Namespace
77meta: Example code for understanding how to use the Namespace class from the flask.signals module of the Flask project.
88
99
10- Namespace is a class within the flask.signals module of the Flask project.
10+ [ Namespace] ( https://github.com/pallets/flask/blob/master/src/flask/signals.py )
11+ is a class used within the ` flask.signals ` module, but it is
12+ actually imported from the
13+ [ Blinker project] ( https://github.com/jek/blinker ) . Blinker
14+ is a fast dispatching system for event subscriptions, also known as
15+ "signals". [ Flask] ( /flask.html ) uses this library instead of
16+ implementing its own event subscription signaling model.
17+ [ Namespace is defined within Blinker] ( https://github.com/jek/blinker/blob/master/blinker/base.py )
18+ as a mapping of signal names to signals, and it serves the
19+ same purpose in the Flask project.
1120
1221
1322## Example 1 from flask-login
Original file line number Diff line number Diff line change @@ -7,7 +7,16 @@ sidebartitle: flask.templating render_template
77meta: Python example code that shows how to use the render_template callable from the flask.templating module of the Flask project.
88
99
10- render_template is a callable within the flask.templating module of the Flask project.
10+ [ render_template] ( https://github.com/pallets/flask/blob/master/src/flask/templating.py )
11+ is a [ Flask] ( /flask.html ) function from the ` flask.templating ` package.
12+ ` render_template ` is used to generate output from a
13+ [ template file based on the Jinja2 engine] ( /template-engines.html )
14+ that is found in the application's templates folder.
15+
16+ Note that ` render_template ` is typically imported directly from the ` flask `
17+ package instead of from ` flask.templating ` . It is the same function that is
18+ imported, but there are less characters to type when you leave off
19+ the ` .templating ` part.
1120
1221
1322## Example 1 from Braintree Flask app
You can’t perform that action at this time.
0 commit comments