Armin Ronacher
817b72d484
Removed deprecated module functionality
2014-08-27 01:12:33 +02:00
Armin Ronacher
84ad89ffa4
Always log now, even if debug is off.
2014-08-27 01:08:19 +02:00
Armin Ronacher
5693b9d730
Merge branch 'pr/839'
2014-05-07 21:53:59 +02:00
Armin Ronacher
98754b0e4f
Merge branch '0.10-maintenance'
2014-02-09 16:08:03 +00:00
Armin Ronacher
ddb5f9dc49
Fixed a broken test
2014-02-09 16:07:56 +00:00
Armin Ronacher
a9503580d2
Merge branch '0.10-maintenance'
2014-02-09 13:27:05 +00:00
Armin Ronacher
75f2af7a6a
Use a condition variable instead of sleeping
2014-02-09 13:25:36 +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
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
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
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
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
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
Serge S. Koval
44e39ab071
Fixed class-based views support
2013-06-14 10:28:37 +03:00
Armin Ronacher
58ad83f37c
Added support for bytes in sessions back
2013-06-14 00:24:17 +01:00
Armin Ronacher
c889fbc231
Changed interface for flask.g
...
This now makes it behave like it did before, it's just an object.
It did however gain ``__contains__`` and ``__iter__`` and I added
a ``get()`` method to fetch an attribute without raising an
error. This fixes #759 .
2013-06-09 12:06:33 +01:00
Armin Ronacher
93073489a0
Documented changes on the g object some more
2013-06-05 10:02:33 +01:00
Armin Ronacher
fd99abea57
Fixed too strict tests for cookie setting that broke on werkzeug changes
2013-06-05 09:47:31 +01:00
Armin Ronacher
56d3b74488
Added a test for non-ascii routing
2013-06-02 23:24:28 +01:00
Armin Ronacher
1b40b3b573
Fixed request context preservation and teardown handler interaction.
2013-06-02 21:47:32 +01:00
Armin Ronacher
90e3906d02
Fixed some test failures
2013-05-30 17:58:27 +01:00
Armin Ronacher
eb622fb34f
Fixed a whole bunch of resource warnings in the flask testsuite
2013-05-30 14:31:36 +01:00
Armin Ronacher
47572c5b40
Set the content length automatically before calling wrap_file
2013-05-30 14:24:29 +01:00
Thomas Waldmann
ac04bc7836
replace 1/0 by 1 // 0 to get rid of DeprecationWarning (and PEP8 issue)
2013-05-26 20:33:22 +02:00
Thomas Waldmann
f9e9e77464
fix data types in after_request test
...
TODO: why was that bug not causing / displaying an exception somehow?
should give a TypeError in py 3.3.
2013-05-25 20:58:12 +02:00
Daniel Neuhäuser
79ec3d81c1
Prevent UnboundLocalError in test_build_error_handler
2013-05-22 22:58:12 +02:00
Daniel Neuhäuser
a0801719f8
Remove six dependency
2013-05-22 21:40:30 +02:00
Daniel Neuhäuser
62e7275bdf
Use assert_false where appropriate
2013-05-22 20:17:29 +02:00
Daniel Neuhäuser
9f8a2075c7
Use assert_in where appropriate
2013-05-22 20:12:50 +02:00
Daniel Neuhäuser
239780be28
Use assert_true instead of assert_
...
assert_ is deprecated which causes annoying warnings
2013-05-22 17:23:38 +02:00
Daniel Neuhäuser
5b89355b1c
Response data is bytes
2013-05-22 17:14:07 +02:00
Markus Unterwaditzer
05f66ad735
Fix some literals
2013-05-22 17:09:37 +02: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
Daniel Neuhäuser
8494574fdf
Merge branch 'six' of github.com:ThomasWaldmann/flask into ThomasWaldmann-six
...
Conflicts:
flask/testsuite/__init__.py
2013-05-18 18:54:45 +02:00
Thomas Waldmann
522cd00093
python-modernize automated changes: fix_unicode (but without six.u())
2013-05-18 18:12:30 +02:00
Thomas Waldmann
6caaa8a527
automated change using python-modernize: use 'as' in except
2013-05-18 16:24:40 +02:00
Armin Ronacher
18673ba370
Added uuid support for new session serialization and documented it
2013-05-14 11:33:36 +01:00
Armin Ronacher
097353695e
Added flask.copy_current_request_context which simplies working with greenlets
2013-05-14 11:00:04 +01:00
Armin Ronacher
bfeee75696
Changed session cookie defaults to work better with google chrome
2013-01-29 19:31:45 +00:00
Armin Ronacher
1949c4a9ab
flask.g is now on the app context and not the request context
2012-12-21 11:45:42 +01:00
Armin Ronacher
661ee54bc2
Raise exceptions if a function is overridden by a new endpoint. This fixes #570
2012-10-07 17:12:16 +02:00
Armin Ronacher
4df3bf2058
Implemented experimental JSON based sessions
2012-08-11 02:36:14 +01:00
Armin Ronacher
a9e753f706
Merge pull request #497 from ekoka/master
...
fix for https://github.com/mitsuhiko/flask/issues/494
2012-06-17 06:24:35 -07:00
Armin Ronacher
086348e2f2
Added after_this_request decorator.
2012-05-08 13:14:32 +01:00
Armin Ronacher
2053d04db0
Improved interface for the URL build error handler
2012-05-08 11:56:11 +01:00
ekoka
12dcba8849
Update flask/testsuite/basic.py
2012-04-24 05:32:52 -03:00