Commit graph

96 commits

Author SHA1 Message Date
Armin Ronacher
c3d38a21c6 Removed json_available hack 2012-08-11 03:11:40 +01:00
Priit Laes
e3b3e05052 Docs: Fix docstring formatting 2012-08-01 11:29:40 +03:00
Priit Laes
ed1619adad Docs: Mention SERVER_NAME in the url_for() docstring 2012-08-01 11:27:28 +03:00
Armin Ronacher
d5218997d9 Added flask.stream_with_context 2012-06-27 15:06:39 +01:00
Armin Ronacher
2e816f554a Merge branch 'master' of github.com:mitsuhiko/flask 2012-06-27 12:25:21 +01:00
Armin Ronacher
8071f11328 Fixed an issue with the new path finding logic 2012-06-26 17:18:59 +02: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
Massimo Santini
4b21e2d38c I think it should check that cache_timeout is not None to allow for a (I hope legale) value of 0 for such parameter. 2012-06-13 16:43:34 +03:00
Marc Abramowitz
447afc3525 Fix failing test: "AssertionError: 'application/javascript' != 'application/json'" in flask/testsuite/helpers.py", line 88 2012-05-27 18:24:27 -07:00
Armin Ronacher
2053d04db0 Improved interface for the URL build error handler 2012-05-08 11:56:11 +01: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
148c50abf9 Document url_for BuildError hook. 2012-04-23 21:20:47 -04:00
Ron DuPlain
bb31188ec3 Add a BuildError hook to url_for, #456. 2012-04-22 12:30:15 -04:00
Ron DuPlain
a3cb2a3382 Use American English for "behavior" in docs.
Prompted by plaes on #pocoo, mitsuhiko confirmed to use American English.
2012-04-19 11:51:38 -04:00
Armin Ronacher
34bbd3100b Fixed a failing testcase 2012-04-09 16:11:35 +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
0eb75b317b Add notes on mutable values & sessions.
Using notes in 8445f0d939
2012-04-01 11:33:42 -04:00
Ron DuPlain
71a9766266 Merge pull request #417 from tarruda/master
Fixed assumption made on session implementations
2012-04-01 08:23:26 -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
Ned Jackson Lovely
68f93634de Second thoughts on mime type
After further review, changing the mime type on jsonp
responses from text/javascript to application/javascript,
with a hat-tip to
http://stackoverflow.com/questions/111302/best-content-type-to-serve-jsonp
2012-03-12 17:18:27 -04:00
Ned Jackson Lovely
09370c3f1c Clean up docs and review pull request #384
Spelunking through the issues at the PyCon sprints.
2012-03-12 15:26:05 -04: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
Thiago de Arruda
8445f0d939 Fixed assumption made on session implementations.
In the snippet 'session.setdefault(...).append(...)', it was being
assumed that changes made to mutable structures in the session are
are always in sync with the session object, which is not true for
session implementations that use a external storage for keeping their
keys/values.
2012-03-02 07:46:39 -03:00
Ron DuPlain
c93ea5551c Keep flashed message examples in one place. 2012-01-16 23:16:43 -05:00
Ron DuPlain
81010bf7af Add get_flashed_messages to CHANGES, expand docs. 2012-01-16 23:10:21 -05:00
Steven Osborn
fa069f94de Allow category filtering in get_flashed_messages to allow rending categories in separate html blocks 2012-01-16 22:45:42 -05:00
Ron DuPlain
1f20a11284 Fall back to imports w/exotic pkg loaders, #380.
Needs a test, which likely requires introducing a mock library.
2012-01-16 09:23:40 -05:00
Ron DuPlain
a3b30b7e3b Handle zip & interactive cases in module helpers. 2012-01-07 17:54:37 -05:00
Ron DuPlain
d16491145d Update module helpers to avoid Python imports.
This avoids errors in creating Flask instances where there are import
errors in the module or package matching the import name.  Those runtime
errors will be apparent to the user soon enough, but tools which build
Flask instances meta-programmatically benefit from a Flask which does
not __import__.
2012-01-07 17:52:38 -05:00
Armin Ronacher
f52e7a9dc9 Added support for _method to url_for() 2011-11-04 02:46:22 +01:00
Armin Ronacher
ebd7468807 Added a newline 2011-10-07 15:09:02 -04:00
Armin Ronacher
1759d8e4d8 Added support for anchor link generation. 2011-10-06 10:57:03 -04:00
Armin Ronacher
ee8417dac8 Late but 2010 -> 2011 in some files 2011-09-01 16:57:00 +02:00
Armin Ronacher
bb1567dae4 Explained why os.getcwd is used for path finding 2011-08-27 00:42:06 +02:00
Armin Ronacher
8340d3c9f5 Updated docstring on make_response 2011-08-25 21:49:50 +01:00
Armin Ronacher
1d6f86bc87 Updated docstring 2011-08-10 23:25:33 +02:00
Armin Ronacher
c3844d1102 Rename _get_package_path to get_root_path to avoid confusion 2011-08-10 23:21:43 +02:00
Armin Ronacher
b3aaf6d5ca Refactored package finding 2011-08-10 23:19:33 +02:00
Armin Ronacher
175d43b2f9 Instance paths are now moved into virtualenv/share/appname-instance if installed 2011-08-10 17:46:20 +02:00
Armin Ronacher
187cb80dcc Documented instance root 2011-08-10 13:55:57 +02:00
Dan Callahan
290925e133 Minor documentation typo / grammar fixes 2011-07-19 16:42:11 -05:00
Armin Ronacher
2866ccda1f Switch to explicit Werkzeug imports 2011-07-15 18:03:48 +02:00
Ron DuPlain
57d9a2a118 Import with statement in helpers.py, #264. 2011-06-28 12:00:06 -04:00
Armin Ronacher
1e7577578f Expanded url_for docstring for blueprints 2011-06-27 09:30:27 +02:00
Armin Ronacher
2d946b96a1 Merge branch 'master' into blueprints 2011-06-25 12:26:13 +02:00