Commit graph

724 commits

Author SHA1 Message Date
Armin Ronacher
f07e4cb0c3 Merge branch '0.10-maintenance' 2014-02-08 17:32:59 +00:00
Armin Ronacher
6de9484c97 Fixed a typo 2014-02-08 17:32:54 +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
Armin Ronacher
53528ad2c3 Merge branch '0.10-maintenance' 2014-02-08 17:19:11 +00:00
Armin Ronacher
e7c587789a Fixe a bug in the test client causing url parameters to be removed. This fixes #968 2014-02-08 17:19:00 +00:00
Armin Ronacher
e5bba9deb5 Added support for custom JSON mimetypes 2014-02-08 17:01:13 +00:00
Kenneth Reitz
17a3056be4 Merge pull request #961 from GCorbel/patch-1
Remove the extra "1"
2014-01-27 09:39:04 -08:00
Armin Ronacher
e78961c812 Fixed a missing import 2014-01-26 18:08:02 +00:00
Armin Ronacher
52e1c383fa Make Python 3 happy 2014-01-26 17:47:16 +00:00
Armin Ronacher
6ec83e18dc Added a workaround for a pypy bug in context managers 2014-01-26 17:34:37 +00:00
Guriec Corbel
21aa620b6b Remove the extra "1" 2014-01-24 12:43:23 -05:00
Matt Wright
90a50f8b51 Add get_namespace method on Config object for convenient access of namespaced config options. 2014-01-23 15:05:37 -05: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
dbc4096191 added a new test case with a Response instance and cleaned up the code 2013-12-31 22:59:00 +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
Zachary Wright Heller
5addabfbdd Fix typo in helpers.py 2013-12-24 20:12:34 -08:00
Day Barr
c021e58775 Fix typo in docs for error_handler_spec 2013-10-25 16:51:29 +01:00
Daniel Neuhäuser
b63a9926dd Merge branch '0.10-maintenance' 2013-10-16 20:13:19 +02:00
Daniel Neuhäuser
a3a2f521f1 Clear exceptions when pushing a context
Fixes #882
2013-10-16 20:12:20 +02:00
Adrian
46b5754d97 Don't refer to flaskext in docs 2013-10-15 21:47:42 +02:00
John Hobbs
e31a2a80ec Update url_for documentation
Previous documentation referenced a non-existent property on the Flask
object called "build_error_handler".

This should actually reference Flask.url_build_error_handlers.
2013-10-11 17:03:54 -05:00
Hyunjun Kim
5ecca4c0da Fix a typo on blueprints module name. 2013-10-02 15:10:27 +09: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
Oliver Beattie
bb882454a0 Make the decorators attribute on View a tuple by default
To discourage accidental runtime modification applying to all views.
2013-09-09 15:13:42 +01:00
Michael Bikovitsky
b7337080e4 Fix test_send_file_object
static/index.html now opens in binary mode, and therefore newline conversion does not take place.
2013-09-07 18:29:49 +03:00
Michael Bikovitsky
cff35237ef Fix test_no_error_swallowing
Path in assertion is now cross-platform.
2013-09-07 18:21:15 +03:00
Wouter Van Hemel
079ae20f24 Add tests for user-defined exceptions in blueprints 2013-09-06 11:17:30 +03:00
Wouter Van Hemel
b03181363b Add a non-decorator version of the error handler register function
The main application object has a register_error_handler function
which mirrors the decorator's functionality. According to the principle
of least surprise, make sure blueprints also have this convenience function.
2013-09-04 12:42:35 +03:00
Daniel Neuhäuser
36d70d8789 Merge pull request #843 from wbowlin/master
corrected documentation for Request get_json()
2013-09-03 10:58:04 -07:00
Armin Ronacher
8f1dada542 Some cleanups 2013-09-02 04:57:01 +06:00
Will Bowlin
3e90de2e10 corrected documentation for Request get_json() 2013-08-23 00:22:57 -05:00
Maximilian Hils
17e5fb365d Fix typo in docstring 2013-08-19 10:56:08 +02:00
Daniel Neuhäuser
2d8a21c732 Merge branch '0.10-maintenance' 2013-08-13 15:58:46 +02:00
Daniel Neuhäuser
94f4360137 Explain is_package AttributeError in find_package
When a PEP 302 import hook is used that doesn't implement .is_package()
an AttributeError is raised. This looks like a bug in Flask. This change
fixes that problem in the sense that it explains, that the
AttributeError is intentional.
2013-08-13 15:53:58 +02:00
Matt Wright
b290bf4079 Add ability to config from a JSON file 2013-08-07 18:03:37 -04:00
Armin Ronacher
1b08d527c7 Merge branch 'master' of github.com:mitsuhiko/flask 2013-08-05 09:08:29 +01:00
Kevin Burke
9e5ab21c8e app.py: Link to correct EnvironBuilder docs 2013-08-04 22:33:17 -07:00
Chason Chaffin
5e8dd8b287 Changed sort_json test to test str sorting
Tests when simplejson was installed were failing because of a change in
how it sorted in v3.0.0. This change first tests it via normal int
sorting for stdlib json then if that fails, it tests against str sorting
for simplejson.
2013-08-04 01:42:23 -07:00
Markus Unterwaditzer
af5a0853bf Fix #815 2013-07-31 00:38:03 +02:00
Armin Ronacher
3e4dbf93d9 Fixed a test that broke on 3.x 2013-07-30 16:56:40 +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
Daniel Neuhäuser
c02c23ee30 Merge branch '0.10-maintenance'
Conflicts:
	tox.ini
2013-06-27 16:52:34 +02:00
Daniel Neuhäuser
f88cc2d2f9 Fix broken test_appcontext_signals test case
This fixes #781 and ensures that Flask is tested with blinker installed.
2013-06-27 16:49:27 +02:00
Karol Kuczmarski
ec5b182f15 Add Flask.config_class feature 2013-06-22 22:09:30 +02:00
Armin Ronacher
dfdcac2292 Fixed some embarrassing grammar 2013-06-14 10:54:16 +01:00
Armin Ronacher
977e7660ac Master is 0.11-dev 2013-06-14 09:55:08 +01:00