forked from orbit-oss/flask
Blueprint view function name should not contain dots
This commit is contained in:
parent
0a1090890f
commit
2f57a0b917
3 changed files with 13 additions and 0 deletions
|
|
@ -198,6 +198,8 @@ class Blueprint(_PackageBoundObject):
|
|||
"""
|
||||
if endpoint:
|
||||
assert '.' not in endpoint, "Blueprint endpoints should not contain dots"
|
||||
if view_func:
|
||||
assert '.' not in view_func.__name__, "Blueprint view function name should not contain dots"
|
||||
self.record(lambda s:
|
||||
s.add_url_rule(rule, endpoint, view_func, **options))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue