Closed steelywing closed 10 years ago
This is documented behavior. Blueprints resolve template names globally. Their template folder should contain another level which for instance could be the name of the blueprint.
This is done so that one blueprint can provide templates for another blueprint.
@mitsuhiko Thanks for reply, this pull will not break the original behavior (blueprint can provide templates for another blueprint), it only prefer to use their template, would you consider again ? =)
No. We had something like this originally in Flask 0.7 (before blueprints) or so and it caused problems which is why it was changed.
Reproduce:
blueprint 0
(Correct)blueprint 0
(Incorrect)blueprint 1
(Correct)blueprint 1
(Incorrect)Is it the cache issue ? I tried if rename
blueprint_0/index.html
toblueprint_0/bp_0.html
, andblueprint_1/index.html
toblueprint_1/bp_1.html
, all work. I also add a test of this, please have a see of THIS