Commit graph

221 commits

Author SHA1 Message Date
Shalabh Aggarwal
1f5927eee2 Fixed a small typo with flask.g docstring 2014-05-14 09:15:34 +05:30
Armin Ronacher
7321a480ea Simplified click integration a bit 2014-05-12 02:16:38 +02:00
Armin Ronacher
5693b9d730 Merge branch 'pr/839' 2014-05-07 21:53:59 +02:00
Armin Ronacher
3bdb90f06b Added click support to Flask 2014-04-28 13:26:23 +02:00
mjfroehlich
15d8af52db Fix minor typo 2014-04-13 22:25:10 +02:00
Armin Ronacher
d4b3d16c14 Better support for namespace packages. 2014-04-11 19:59:54 +02:00
Kenneth Reitz
9427e16567 Merge pull request #707 from xsleonard/patch-1
Mention register_error_handler in errorhandler doc
2014-03-21 17:03:02 -04:00
Kenneth Reitz
7f5b6c692d Merge pull request #876 from defuz/templates-auto-reload
Add TEMPLATES_AUTO_RELOAD config key
2014-03-21 16:43:20 -04:00
Charles-Axel Dein
dfae2679a6 Clarify the after_request argument
Make it a bit clearer that it's an instance of response_class that is
expected, not the actual response_class class.
2014-03-05 15:22:59 -08:00
Daniel Neuhäuser
3f8e29b12c Add Flask.config_class to changelog 2014-02-20 19:15:42 +01:00
Daniel Neuhäuser
66e51d5be7 Merge branch 'master' of https://github.com/Xion/flask into Xion-master
Conflicts:
	flask/testsuite/config.py
2014-02-20 19:12:56 +01:00
Armin Ronacher
a9503580d2 Merge branch '0.10-maintenance' 2014-02-09 13:27:05 +00:00
Alexis Svinartchouk
280d865960 fix issue #879 and add a test for it
Signed-off-by: Armin Ronacher <armin.ronacher@active-4.com>
2014-02-09 13:22:05 +00:00
Armin Ronacher
a8f6f7413f Merge branch '0.10-maintenance' 2014-02-08 17:39:46 +00:00
Armin Ronacher
46c24da016 Make before_first_request a decorator 2014-02-08 17:39:26 +00:00
Armin Ronacher
ae45aed8d6 Removed an unnecessary newline 2014-02-08 17:36:12 +00:00
Armin Ronacher
c9bf907037 Merge pull request #938 from ahlen/response-with-headers-without-status
Enable tuple responses with headers without status
2014-02-08 17:32:01 +00:00
Daniel Neuhäuser
d517f35d60 Merge branch '0.10-maintenance' 2014-01-02 19:21:55 +01:00
Daniel Neuhäuser
52098e1e4f Happy New Year 2014 2014-01-02 19:21:07 +01:00
Mikael Åhlén
70f8b39c52 added a new behaviour for responses that enable the tuple to be in the form of (response, headers) and continiue to support the (response, status, headers) format. 2013-12-31 22:16:13 +01:00
Day Barr
c021e58775 Fix typo in docs for error_handler_spec 2013-10-25 16:51:29 +01:00
Adrian
46b5754d97 Don't refer to flaskext in docs 2013-10-15 21:47:42 +02:00
defuz
3e485009a8 add TEMPLATES_AUTO_RELOAD option to config 2013-09-30 21:06:49 +03:00
Daniel Richman
3d67736e09 Check error handlers for specific classes first
This allows adding error handlers like this:

    @app.errorhandler(werkzeug.exceptions.Forbidden)

And subclassing HTTPExceptions:

    class ForbiddenBecauseReason(Forbidden): pass

    @app.errorhandler(ForbiddenBecauseReason)
    def error1(): return "Forbidden because reason", 403
    @app.errorhandler(403)
    def error2(): return "Forbidden", 403

... the idea being, that a flask extension might want to raise an
exception, with the default behaviour of creating a HTTP error page,
but still allowing the user to add a view/handler specific to that
exception (e.g., "Forbidden because you are not in the right group").
2013-09-21 21:16:24 +00:00
Armin Ronacher
8f1dada542 Some cleanups 2013-09-02 04:57:01 +06:00
Maximilian Hils
17e5fb365d Fix typo in docstring 2013-08-19 10:56:08 +02:00
Kevin Burke
9e5ab21c8e app.py: Link to correct EnvironBuilder docs 2013-08-04 22:33:17 -07:00
Markus Unterwaditzer
af5a0853bf Fix #815 2013-07-31 00:38:03 +02:00
Armin Ronacher
559ae196e7 Merge branch 'master' of github.com:mitsuhiko/flask 2013-07-30 16:45:23 +02:00
Armin Ronacher
d1d835c023 Added SESSION_REFRESH_EACH_REQUEST config option.
This also changes how sessions are being refreshed.  With the new
behavior set-cookie is only emitted if the session is modified or if the
session is permanent.  Permanent sessions can be set to not refresh
automatically through the SESSION_REFRESH_EACH_REQUEST config key.

This fixes #798.
2013-07-30 16:43:54 +02:00
Robert Picard
b6116c1de3 Remove Werkzeug bug workaround from flask/app.py
According to the note in the comment, you had to check to make sure that the
defaults were not an empty dictionary because of a bug in Werkzeug pre-0.7.

Since Flask officially requires 0.7 or greater, we can remove this little
workaround.
2013-07-29 13:42:04 -04:00
Karol Kuczmarski
ec5b182f15 Add Flask.config_class feature 2013-06-22 22:09:30 +02:00
Serge S. Koval
44e39ab071 Fixed class-based views support 2013-06-14 10:28:37 +03:00
Mark Steve Samson
6565bd848e Fix typo 2013-06-12 22:04:49 +08:00
Armin Ronacher
efd6e468ae Removed view_func from route documentaiton.
This fixes #763.
2013-06-09 11:46:43 +01:00
Armin Ronacher
94c6ae51d7 Some small cleanup 2013-06-07 00:56:21 +01:00
Armin Ronacher
62dbe0e1ca The default run method is now accepting the port from the SERVER_NAME. 2013-06-07 00:46:30 +01:00
Armin Ronacher
05479eb954 Some reindentation cleanup 2013-06-05 10:35:41 +01:00
Armin Ronacher
ef72b78042 Imply the |safe on tojson in templates and change escaping logic 2013-06-03 12:25:08 +01:00
Armin Ronacher
1b40b3b573 Fixed request context preservation and teardown handler interaction. 2013-06-02 21:47:32 +01:00
Armin Ronacher
77d293cf49 Order JSON keys by default to avoid trashing HTTP caches 2013-06-01 19:24:03 +01:00
Armin Ronacher
3d9055b3b7 Added the JSONIFY_PRETTYPRINT_REGULAR config variable. This fixes #725 2013-06-01 00:20:00 +01:00
Armin Ronacher
da747738e8 Merge branch 'master' of github.com:mitsuhiko/flask 2013-05-30 21:39:22 +01:00
Armin Ronacher
f1918093ac Changed teardown error handling to be more reliable. 2013-05-30 18:15:17 +01:00
Thomas Waldmann
bbfef4c406 flask view function may return bytes/str/unicode 2013-05-30 16:02:28 +02:00
Thomas Waldmann
13cc69911c fix typos 2013-05-25 22:01:14 +02:00
Thomas Waldmann
96b8ffbb29 always import from ._compat 2013-05-25 20:24:14 +02:00
Thomas Waldmann
8bb972e5ae fix minitwit/flaskr test errors, improve docs about file open mode
app.open_resource needs to get called with the correct mode param (python3
will read bytes [not str] if the wrong mode is used), add mode param docs.

rv.data is bytes, fix the data type we compare it with to be also bytes
2013-05-25 19:13:48 +02:00
Tobias Bieniek
12c08c03fb Fixed typo in app.blueprints docstring 2013-05-25 09:10:41 +03:00
Thomas Waldmann
e1d356fb71 ported some more stuff to py 3.3
removed init_jinja_globals hack from app.py after consulting mitsuhiko
(didn't work on py 3.3 "as is")

removed with_statement future imports, not needed any more

needs more work on 2.7 as well as on 3.3
2013-05-22 01:33:04 +02:00