Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parents e59e005, ab1be65 · Browse files · 9 files+26 added−11 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

9 files+26 added−11 removed

  • other:+26 added−11 removed

9 files+26 added−11 removed

modified:docs/advanced_foreword.rst+1 added-1 removed
62 unmodified lines
63compatible Python code64<http://lucumr.pocoo.org/2011/1/22/forwards-compatible-python/>`_.6566If you do want to dive into Python 3 already have a look at the67:ref:`python3_support` page.67:ref:`python3-support` page.6869Continue to :ref:`installation` or the :ref:`quickstart`.
modified:docs/api.rst+4 added-4 removed
363 unmodified lines
364365 from flask import json366367For usage examples, read the :mod:`json` documentation in the standard368lirbary. The following extensions are by default applied to the stdlib's368library. The following extensions are by default applied to the stdlib's369JSON module:3703711. ``datetime`` objects are serialized as :rfc:`822` strings.3722. Any object with an ``__html__`` method (like :class:`~flask.Markup`)373 will ahve that method called and then the return value is serialized373 will have that method called and then the return value is serialized374 as string.375376The :func:`~htmlsafe_dumps` function of this json module is also available377as filter called ``|tojson`` in Jinja2. Note that inside `script`
126 unmodified lines
504.. versionadded:: 0.6505506.. data:: signals_available507508 `True` if the signalling system is available. This is the case508 `True` if the signaling system is available. This is the case509 when `blinker`_ is installed.510511.. data:: template_rendered512
214 unmodified lines
727 basis.728729- `required_methods`: if this attribute is set, Flask will always add730 these methods when registering a URL rule even if the methods were731 explicitly overriden in the ``route()`` call.731 explicitly overridden in the ``route()`` call.732733Full example::734735 def index():
11 unmodified lines
modified:docs/quickstart.rst+3 added-3 removed
316 unmodified lines
317Now the interesting part is that in HTML4 and XHTML1, the only methods a318form can submit to the server are `GET` and `POST`. But with JavaScript319and future HTML standards you can use the other methods as well. Furthermore320HTTP has become quite popular lately and browsers are no longer the only321clients that are using HTTP. For instance, many revision control system321clients that are using HTTP. For instance, many revision control systems322use it.323324.. _HTTP RFC: http://www.ietf.org/rfc/rfc2068.txt325
339 unmodified lines
665---------------666667The return value from a view function is automatically converted into a668response object for you. If the return value is a string it's converted669into a response object with the string as response body, an ``200 OK``670error code and a ``text/html`` mimetype. The logic that Flask applies to669into a response object with the string as response body, a ``200 OK``670status code and a ``text/html`` mimetype. The logic that Flask applies to671converting return values into response objects is as follows:6726731. If a response object of the correct type is returned it's directly674 returned from the view.
178 unmodified lines
modified:flask/testsuite/signals.py+1 added-1 removed
100 unmodified lines
101 recorded = []102 def record_push(sender, **kwargs):103 recorded.append('push')104 def record_pop(sender, **kwargs):105 recorded.append('push')105 recorded.append('pop')106107 @app.route('/')108 def index():109 return 'Hello'
44 unmodified lines
modified:.travis-devel-requirements.txt+3 added
1git+git://github.com/mitsuhiko/werkzeug.git#egg=Werkzeug2git+git://github.com/mitsuhiko/jinja2.git#egg=Jinja23git+git://github.com/mitsuhiko/itsdangerous.git#egg=itsdangerous45# extra dependencies6git+git://github.com/jek/blinker.git#egg=blinker
modified:.travis-lowest-requirements.txt+3 added
1Werkzeug==0.72Jinja2==2.43itsdangerous==0.2145# extra dependencies6blinker==1.0
modified:.travis-release-requirements.txt+2 added
1# extra dependencies2blinker
modified:CHANGES+8 added-1 removed
1 unmodified line
2===============34Here you can see the full list of changes between each Flask release.56Version 0.10.27--------------89(bugfix release, release date to be announced)1011- Fixed broken `test_appcontext_signals()` test case.1213Version 0.10.114--------------1516(bugfix release, released on June 14th 2013)
4 unmodified lines
21 make using that filter with angular.js easier.22- Added support for byte strings back to the session system. This broke23 compatibility with the common case of people putting binary data for24 token verification into the session.18- Fixed an issue were registering the same method twice for the same endpoint25- Fixed an issue where registering the same method twice for the same endpoint26 would trigger an exception incorrectly.2728Version 0.1029------------
443 unmodified lines
modified:tox.ini+1 added-1 removed
1[tox]2envlist = py26, py27, pypy, py3334[testenv]5deps = -egit+git://github.com/mitsuhiko/werkzeug.git#egg=werkzeug5deps = blinker6commands = python run-tests.py []