Merge branch 'master' of github.com:mitsuhiko/flask

This commit is contained in:
Armin Ronacher 2012-04-09 15:26:09 +01:00
commit 3249eeb438
32 changed files with 626 additions and 259 deletions

16
CHANGES
View file

@ -8,6 +8,8 @@ Version 0.9
Relase date to be decided, codename to be chosen.
- The :func:`flask.Request.on_json_loading_failed` now returns a JSON formatted
response by default.
- The :func:`flask.url_for` function now can generate anchors to the
generated links.
- The :func:`flask.url_for` function now can also explicitly generate
@ -48,7 +50,19 @@ Relase date to be decided, codename to be chosen.
- Added :meth:`flask.Flask.app_context` which works very similar to the
request context but only provides access to the current application. This
also adds support for URL generation without an active request context.
- View functions can now return a tuple with the first instance being an
instance of :class:`flask.Response`. This allows for returning
``jsonify(error="error msg"), 400`` from a view function.
- :class:`flask.Flask` now provides a `get_send_file_options` hook for
subclasses to override behavior of serving static files from Flask when using
:meth:`flask.Flask.send_static_file` based on keywords in
:func:`flask.helpers.send_file`. This hook is provided a filename, which for
example allows changing cache controls by file extension. The default
max-age for `send_static_file` can be configured through a new
``SEND_FILE_MAX_AGE_DEFAULT`` configuration variable, regardless of whether
the `get_send_file_options` hook is used.
- Fixed an assumption in sessions implementation which could break message
flashing on sessions implementations which use external storage.
Version 0.8.1
-------------