Jon Parise
bb99158c87
Remove an unused iteration variable.
...
We can just iterate over the namespace dictionary's keys here. We
don't need its values.
2012-03-19 22:33:43 -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
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
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
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
FND
4aebc267bc
Hyphenate "class-based"
...
makes it more readable
2012-01-31 13:54:52 +01:00
Jeffrey Finkelstein
c5ebf9a97d
Added PATCH method to the list of HTTP method functions for use in the flask.views.MethodView class.
2012-01-24 16:48:04 -05:00
FND
2792dcf23e
simplified as_view documentation
...
in the process, rewrapped lines to 78 chars (the file's current maximum)
2012-01-23 20:27:47 +01:00
FND
76c1a1f722
fixed spelling of "instantiate"
...
while the interwebs suggest "instanciate" might be a valid spelling, it
seems quite uncommon and potentially irritating (to pedants like myself)
2012-01-23 20:12:57 +01:00
Ron DuPlain
b786eac557
Add test for limited imp loaders, #380 .
2012-01-18 18:57:05 -05:00
Ron DuPlain
56177bcbd1
Document app.testing=True for test client, #381 .
2012-01-17 19:43:11 -05:00
Ron DuPlain
2e5de98297
Use app.testing=True for asserts in messages test.
2012-01-17 19:33:48 -05:00
Ron DuPlain
49b77fbc7a
Add missing colons to versionadded.
2012-01-17 11:38:00 -05:00
Ron DuPlain
19d32cb172
Update Flask.run signature, note defaults.
2012-01-16 23:33:13 -05:00
Joe Esposito
46e7bc7083
In Flask.run, now when the host/port argument is None, it will use its default value.
2012-01-16 23:29:24 -05: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
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
ce4d589d5b
Add non-decorator template filter methods.
...
Suggested by @Poincare on GitHub, on @Reisen's pull request:
https://github.com/mitsuhiko/flask/pull/272
2012-01-16 20:16:48 -05:00
Reisen
2a4d3ef116
Added a template filter decorator to blueprints.
2012-01-16 18:58:43 -05:00
Kyle Wild
8532bd51a7
[docstring] Remove an extra if clause to clarify sentence
2012-01-16 13:42:43 -05:00
Kyle Wild
46651659c2
Fix a typo ("is"->"if") in the comments; clarify a bit
2012-01-16 13:42:43 -05:00
Priit Laes
a59cbd4f52
Minor grammar fix
2012-01-16 13:42: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
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
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
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
Armin Ronacher
f52e7a9dc9
Added support for _method to url_for()
2011-11-04 02:46:22 +01:00
Armin Ronacher
61a95196ac
Changed logic for debug level log settings
2011-10-11 19:09:37 -07:00
Armin Ronacher
ebd7468807
Added a newline
2011-10-07 15:09:02 -04:00