Merge pull request #497 from ekoka/master

fix for https://github.com/mitsuhiko/flask/issues/494
This commit is contained in:
Armin Ronacher 2012-06-17 06:24:35 -07:00
commit a9e753f706
2 changed files with 24 additions and 1 deletions

View file

@ -1490,7 +1490,7 @@ class Flask(_PackageBoundObject):
"""
funcs = self.url_default_functions.get(None, ())
if '.' in endpoint:
bp = endpoint.split('.', 1)[0]
bp = endpoint.rsplit('.', 1)[0]
funcs = chain(funcs, self.url_default_functions.get(bp, ()))
for func in funcs:
func(endpoint, values)