Armin Ronacher
c4f2075f4c
tojson no longer escapes script blocks in HTML5 parsers. Fixed #605
2012-10-07 15:33:25 +02:00
Armin Ronacher
39329bfc07
Merge pull request #591 from finbarrocallaghan/master
...
fixed some typos
2012-10-07 03:54:58 -07:00
Armin Ronacher
f034d8d345
Add @template_test() decorator for creating custom jinja2 tests, like existing @template_filter() for filters. Fixes #332
2012-10-07 12:51:46 +02:00
Armin Ronacher
4f1cb42123
make_test_environ_builder when used with subdomains was not working correctly, now it uses urlparse module for detecting full URL and changing path and base_url correctly
2012-10-07 12:48:19 +02:00
Finbarr O'Callaghan
48f7cdd016
various typo fixes
2012-09-06 18:04:51 +01:00
Armin Ronacher
4df3bf2058
Implemented experimental JSON based sessions
2012-08-11 02:36:14 +01:00
Armin Ronacher
d5218997d9
Added flask.stream_with_context
2012-06-27 15:06:39 +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
b04827283e
Removed padded JSON (JSONP) again.
...
The implementation was not clean and generally the needs for padded json
are disappearing now that all browsers support cross site communication
with the regular xmlhttprequest.
2012-06-17 14:17:22 +01: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
Ron DuPlain
33bae1a8dc
Add Flask.request_globals_class to customize g.
...
Requested by toothr on #pocoo.
2012-04-24 02:00:47 -04:00
Ron DuPlain
26da6a5365
Use default send_file max-age consistently.
...
Prior to this commit, the send_file max-age hook and config were only
used for the static file handler. Now they are used when calling
helpers.send_file directly.
2012-04-24 01:48:05 -04:00
Ron DuPlain
2262ce4915
Skip template leak test when not CPython2.7, #452 .
2012-04-23 21:36:28 -04:00
Ron DuPlain
8c8c524ddb
Re-raise BuildError with traceback.
2012-04-22 12:51:31 -04:00
Ron DuPlain
bb31188ec3
Add a BuildError hook to url_for, #456 .
2012-04-22 12:30:15 -04:00
Ron DuPlain
d90f0afe39
Add test for jsonify padded=False, #495 .
2012-04-21 18:40:02 -04:00
Armin Ronacher
9bed20c07c
Added documentation for appcontext and teardown handlers
2012-04-09 17:29:00 +01:00
Armin Ronacher
cf1641e5be
Changed the implementation of returning tuples from functions
2012-04-09 15:56:33 +01:00
Armin Ronacher
3249eeb438
Merge branch 'master' of github.com:mitsuhiko/flask
2012-04-09 15:26:09 +01:00
Armin Ronacher
f8f2e2dff4
Added more tests for the new stack behavior.
2012-04-09 15:16:09 +01:00
Armin Ronacher
307d1bc4e5
Added support for basic URL generation without request contexts.
2012-04-09 15:04:35 +01:00
Ron DuPlain
f43003967e
Merge pull request #439 from aisipos/jsonexceptions
...
Add new exceptions module, to implement JSONHttpException and JSONBadRequest.
2012-04-01 08:42:39 -07:00
Ron DuPlain
eac350d1e6
Merge remote branch 'njl/master'
...
Conflicts:
docs/quickstart.rst
2012-03-13 19:27:24 -07:00
Ron DuPlain
d94efc6db6
Expose send_file max-age as config value, #433 .
...
Need to add the same hook in a Blueprint, but this is the first such
case where we need app.config in the Blueprint.
2012-03-13 16:34:16 -07:00
Ron DuPlain
146088d580
Expand docs on send_file option hook, #433 .
2012-03-13 14:37:48 -07:00
Ron DuPlain
f4a31db9f6
Merge pull request #433 from dave-shawley/master
...
Introduced a method to adjust static file cache-control headers based on filename
2012-03-13 13:59:31 -07:00
Christoph Heer
cb24646948
Add jsonp support inside of jsonify
2012-03-12 14:27:35 -04:00
Dave Shawley
06b224676d
Added _PackageBoundObject.get_static_file_options.
...
This method receives the name of a static file that is going to be served
up and generates a dict of options to use when serving the file. The
default set is empty so code will fall back to the existing behavior if
the method is not overridden.
I needed this method to adjust the cache control headers for .js files that
one of my applications was statically serving. The default expiration is
buried in an argument to send_file and is set to 12 hours. There was no
good way to adjust this value previously.
2012-03-12 11:19:17 -04:00
James Saryerwinnie
075b6b11c8
Fix issue 140
...
This allows for a view function to return something like:
jsonify(error="error msg"), 400
2012-03-11 20:45:58 -07:00
Jeffrey Finkelstein
9711fd4020
On JSON requests, the JSON response should have Content-Type: application/json and the body of the response should be a JSON object.
2012-03-08 16:41:39 -05:00
Dave Shawley
8d7ca29a35
Cleaned up test case for issue #414 .
2012-03-01 08:53:58 -05:00
Dave Shawley
76773e1d0a
Fixed silent keyword arg to config.from_envvar.
...
The ``silent`` keyword argument to Config.from_envvar was not being honored
if the environment variable existed but the file that it mentioned did not.
The fix was simple - pass the keyword argument on to the underlying call to
``from_pyfile``. I also noticed that the return value from ``from_pyfile``
was not being passed back so I fixed that as well.
2012-03-01 08:34:08 -05:00
Dmitry Shevchenko
0b3369355d
Allow loading template from iterable
2012-02-24 00:46:20 -06:00
Ron DuPlain
b786eac557
Add test for limited imp loaders, #380 .
2012-01-18 18:57:05 -05:00
Ron DuPlain
2e5de98297
Use app.testing=True for asserts in messages test.
2012-01-17 19:33:48 -05:00
Ron DuPlain
676b3a4c13
Check status code in test client or fail silently.
2012-01-16 22:44:06 -05:00
Ron DuPlain
b9907b4969
Expand get_flashed_messages tests.
...
Ready to pull request #336 .
http://github.com/mitsuhiko/flask/pull/336
2012-01-16 22:22:08 -05:00
Ron DuPlain
820d099e82
Add tests for template filter methods/decorators.
2012-01-16 20:21:26 -05:00
Ron DuPlain
83189f20bf
Add .egg for zipimporter instance path test.
...
.gitignore contains '*.egg'
2012-01-16 09:05:42 -05:00
Ron DuPlain
970de5e8b6
Add discussion to NoImportsTestCase.
2012-01-09 10:25:06 -05:00
Ron DuPlain
fde6e364a4
Update tests for new module helpers.
2012-01-07 17:55:02 -05:00
Ron DuPlain
26a9c2079d
Add test to catch imports at Flask instantiation.
2012-01-07 17:52:38 -05:00
Armin Ronacher
c90858a95d
Added a branch to test functionality enabled by new test client
2011-11-28 22:48:14 +01:00
Armin Ronacher
9c8f138a42
Improved test coverage for the test client
2011-11-25 21:08:19 +01:00
Armin Ronacher
b8866aeb22
Merge remote-tracking branch 'plaes/testing-redirects-session'
2011-11-20 17:06:37 +01:00
Armin Ronacher
d628df6ab6
Store session after callbacks. This fixes #351
2011-11-20 16:54:40 +01:00
Priit Laes
9dd61eea6b
Added testcase for redirect and session keeparound bug
2011-11-10 10:59:32 +02:00
Armin Ronacher
7f4c12b335
Break up a circular dependency on shutdown
2011-11-05 17:43:40 +01:00