Test that dotted names work. This fixes #258

This commit is contained in:
Armin Ronacher 2011-06-27 09:20:50 +02:00
parent 85efa3f895
commit ea7a172077
2 changed files with 26 additions and 1 deletions

View file

@ -80,7 +80,7 @@ class Request(RequestBase):
def blueprint(self):
"""The name of the current blueprint"""
if self.url_rule and '.' in self.url_rule.endpoint:
return self.url_rule.endpoint.split('.', 1)[0]
return self.url_rule.endpoint.rsplit('.', 1)[0]
@cached_property
def json(self):