Compare commits
7 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9682d6b371 | ||
|
|
1033a9757d | ||
|
|
c0a9ec43a1 | ||
|
|
2295bd072e | ||
|
|
988143b07b | ||
|
|
c84e1f7855 | ||
|
|
381477f0ab |
6 changed files with 33 additions and 4 deletions
8
CHANGES
8
CHANGES
|
|
@ -3,6 +3,14 @@ Flask Changelog
|
|||
|
||||
Here you can see the full list of changes between each Flask release.
|
||||
|
||||
Version 0.7.1
|
||||
-------------
|
||||
|
||||
Bugfix release, released on June 29th 2011
|
||||
|
||||
- Added missing future import that broke 2.5 compatibility.
|
||||
- Fixed an infinite redirect issue with blueprints.
|
||||
|
||||
Version 0.7
|
||||
-----------
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
__version__ = '0.8-dev'
|
||||
__version__ = '0.7.1'
|
||||
|
||||
# utilities we import from Werkzeug and Jinja2 that are unused
|
||||
# in the module but are exported as public interface.
|
||||
|
|
|
|||
|
|
@ -706,6 +706,12 @@ class Flask(_PackageBoundObject):
|
|||
if 'OPTIONS' not in methods:
|
||||
methods = tuple(methods) + ('OPTIONS',)
|
||||
provide_automatic_options = True
|
||||
|
||||
# due to a werkzeug bug we need to make sure that the defaults are
|
||||
# None if they are an empty dictionary. This should not be necessary
|
||||
# with Werkzeug 0.7
|
||||
options['defaults'] = options.get('defaults') or None
|
||||
|
||||
rule = self.url_rule_class(rule, methods=methods, **options)
|
||||
rule.provide_automatic_options = provide_automatic_options
|
||||
self.url_map.add(rule)
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ def parse_changelog():
|
|||
if change_info:
|
||||
break
|
||||
|
||||
match = re.match(r'^released on (\w+\s+\d+\w+\s+\d+)'
|
||||
r'(?:, codename (.*))?(?i)', change_info)
|
||||
match = re.search(r'released on (\w+\s+\d+\w+\s+\d+)'
|
||||
r'(?:, codename (.*))?(?i)', change_info)
|
||||
if match is None:
|
||||
continue
|
||||
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -86,7 +86,7 @@ def run_tests():
|
|||
|
||||
setup(
|
||||
name='Flask',
|
||||
version='0.8-dev',
|
||||
version='0.7.1',
|
||||
url='http://github.com/mitsuhiko/flask/',
|
||||
license='BSD',
|
||||
author='Armin Ronacher',
|
||||
|
|
|
|||
|
|
@ -1364,6 +1364,21 @@ class BlueprintTestCase(unittest.TestCase):
|
|||
self.assertEqual(c.get('/fe2').data.strip(), '/fe')
|
||||
self.assertEqual(c.get('/be').data.strip(), '/fe')
|
||||
|
||||
def test_empty_url_defaults(self):
|
||||
bp = flask.Blueprint('bp', __name__)
|
||||
|
||||
@bp.route('/', defaults={'page': 1})
|
||||
@bp.route('/page/<int:page>')
|
||||
def something(page):
|
||||
return str(page)
|
||||
|
||||
app = flask.Flask(__name__)
|
||||
app.register_blueprint(bp)
|
||||
|
||||
c = app.test_client()
|
||||
self.assertEqual(c.get('/').data, '1')
|
||||
self.assertEqual(c.get('/page/2').data, '2')
|
||||
|
||||
|
||||
class SendfileTestCase(unittest.TestCase):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue