Fixed late binding of url_prefix. This fixes #29.

This commit is contained in:
Armin Ronacher 2010-05-04 11:41:54 +02:00
parent 720bede150
commit a921aef6c4
2 changed files with 10 additions and 1 deletions

View file

@ -448,7 +448,7 @@ class Module(_PackageBoundObject):
"""
def register_rule(state):
the_rule = rule
if self.url_prefix:
if state.url_prefix:
the_rule = state.url_prefix + rule
state.app.add_url_rule(the_rule, '%s.%s' % (self.name, endpoint),
view_func, **options)