-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
Closed
Labels
Milestone
Description
Based on blueprint concept, I expected it to handle relative url_for nicely:
from flask import Blueprint, Flask, url_for
bp = Blueprint('foo', __name__)
@bp.route('/')
def func():
return url_for('.func')
app = Flask(__name__)
app.register_blueprint(bp, url_prefix='/foo')
app.register_blueprint(bp, url_prefix='/bar')
client = app.test_client()
print client.get('/foo/').data
print client.get('/bar/').data
Both prints write the URL to the first blueprint registered (/foo/). Is it possible to mount two times the same blueprint and make relative url_for work? Is this behaviour expected?
lig and IPetrik