Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bc8e613

Browse files
committed
Python: Clarify comment about flask blueprint URL prefixes
1 parent 1e1cb87 commit bc8e613

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

python/ql/test/experimental/library-tests/frameworks/flask/routing_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def get(self, foo, not_routed=42): # $ requestHandler routedParameter=foo SPURI
103103
def bp1_example(foo): # $ requestHandler routedParameter=foo
104104
return "bp 1 example foo={}".format(foo) # $ HttpResponse
105105

106-
app.register_blueprint(bp1) # by default, URL of blueprints are not changed
106+
app.register_blueprint(bp1) # by default, URLs of blueprints are not prefixed
107107

108108

109109
bp2 = flask.Blueprint("bp2", __name__)
@@ -112,7 +112,7 @@ def bp1_example(foo): # $ requestHandler routedParameter=foo
112112
def bp2_example(): # $ requestHandler
113113
return "bp 2 example" # $ HttpResponse
114114

115-
app.register_blueprint(bp2, url_prefix="/bp2") # but it is possible to add a url_prefix
115+
app.register_blueprint(bp2, url_prefix="/bp2") # but it is possible to add a URL prefix
116116

117117

118118
from external_blueprint import bp3

0 commit comments

Comments
 (0)