forked from orbit-oss/flask
Fix registering partials as view functions
This commit is contained in:
parent
8ceff653c5
commit
6663bf1f7d
3 changed files with 5 additions and 1 deletions
|
|
@ -201,7 +201,7 @@ class Blueprint(_PackageBoundObject):
|
|||
"""
|
||||
if endpoint:
|
||||
assert '.' not in endpoint, "Blueprint endpoints should not contain dots"
|
||||
if view_func:
|
||||
if view_func and hasattr(view_func, '__name__'):
|
||||
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