Skip to content
Myr

Merge branch '1.0-maintenance'

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by ThiefMaster · committed by ThiefMaster · parents 08ef4d0, 6663bf1 · Browse files · 3 files+11 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+11 added−1 removed

  • tests:+3 added−0 removed
  • other:+8 added−1 removed

3 files+11 added−1 removed

modified:flask/blueprints.py+1 added-1 removed
199 unmodified lines
200 the :func:`url_for` function is prefixed with the name of the blueprint.201 """202 if endpoint:203 assert '.' not in endpoint, "Blueprint endpoints should not contain dots"204 if view_func:204 if view_func and hasattr(view_func, '__name__'):205 assert '.' not in view_func.__name__, "Blueprint view function name should not contain dots"206 self.record(lambda s:207 s.add_url_rule(rule, endpoint, view_func, **options))208
239 unmodified lines
modified:tests/test_blueprints.py+3 added
7 unmodified lines
8 :copyright: © 2010 by the Pallets team.9 :license: BSD, see LICENSE for more details.10"""1112import functools13import pytest1415import flask16
365 unmodified lines
382 '/bar/123', view_func=foo_foo_foo383 )384 )385386 bp.add_url_rule('/bar/456', endpoint='foofoofoo', view_func=functools.partial(foo_foo_foo))387388 app.register_blueprint(bp, url_prefix='/py')389390 assert client.get('/py/foo').data == b'bp.foo'391 # The rule's didn't actually made it through
454 unmodified lines
modified:CHANGES.rst+7 added
8 unmodified lines
910unreleased111213Version 1.0.114-------------1516unreleased1718- Fix registering partials (with no ``__name__``) as view functions1920Version 1.021-----------2223Released on April 26th 2018
844 unmodified lines