Commit graph

64 commits

Author SHA1 Message Date
Anthony Plunkett
cc2580af09 Add Blueprint level cli command registration
Implements #1357.
Adds ability to register click cli commands onto blueprint.
2019-05-24 14:43:29 -07:00
pgjones
9e0bd76d2a Allow dictionary return values as JSON
This supports an increasingly common usecase whereby JSON is the
primary response (rather than a templated string). Given Flask has a
short syntax for HTML reponses, it seems fitting that it should also
do so for JSON responses. In practice it allows,

     @app.route("/")
     def index():
         return {
             "api_stuff": "values",
         }
2019-05-24 09:48:55 -07:00
David Lord
9452450b6c add SeparatedPathType to accept multiple paths
Multiple paths for the reloader's `--extra-files` are accepted as one
option, separated by ':'.
2019-05-24 07:19:56 -07:00
Bruno Rocha
683584e5c5 Fix #2897 - Add extra_files option to flask run CLI 2019-05-23 10:47:41 -07:00
David Baumgold
b1a5093445 FakeSignal should stub connect_via method 2019-05-23 07:44:57 -07:00
Adarsh Sharma
c884f6ec19 Fix #2937: Ensure the consistency in load_dotenv's return type 2019-05-19 11:58:39 -07:00
vorelq
c33ec49db6 Fix 0 port value being overriden by default
By explicitly comparing port value with None,
instead of using its bool() value.
2019-05-19 11:36:47 -07:00
shidenggui
e9efad7cf4 allow customizing url map class 2019-05-18 21:50:56 -07:00
Eruvanos
36362454c3 support dataclass in JSONEncoder 2019-05-18 21:37:54 -07:00
Frankie Liu
c7432f50cb Remove ending slash from static_url_path 2019-05-18 21:23:14 -07:00
EtiennePelletier
5fe3d43ab6 Simplify flask.cli.main
Werkzeug>=0.15's reloader now properly detects `python -m module`.
Fixes #3022
2019-05-18 21:15:09 -07:00
EtiennePelletier
1a9616d581 Use Werkzeug's JSONMixin class and update tests
Flask's JSONMixin class was moved to Werkzeug>=0.15

Co-authored-by: Jeffrey Eliasen <jeff@jke.net>
2019-05-18 20:57:26 -07:00
David Lord
797e24ebb2 use dict literal syntax for jinja_options
clarify docs about when jinja_options can be modified
2019-05-18 08:35:47 -07:00
LeeW
43fe5f7d0b Inherit "methods" in MethodView
* Current behavior: If a base class inherits MethodView and child class
  inherits without overwriting "methods". The "methods" defined in base
  class would be ignored
* Fix: Inherit all the "methods" defined in base classes if "methods"
  variable is not overwritten
2019-05-17 13:57:06 -07:00
David Lord
371d1ab40d clean up open_resource and tests 2019-05-17 13:23:27 -07:00
David Lord
d37b992a54 Merge branch '1.0.x' 2019-05-17 11:13:08 -07:00
David Lord
92785ead80 release version 1.0.3 2019-05-17 10:57:51 -07:00
David Lord
8a431d4342 don't push app context for test client json 2019-05-17 09:00:08 -07:00
Carson Ip
0e8a571fbe Fix typo in CHANGES.rst (#3077) 2019-01-18 09:13:13 +01:00
David Lord
39e9ebaaee Merge remote-tracking branch 'origin/1.0-maintenance' 2019-01-07 10:00:10 -08:00
David Lord
83fb602af7 add changelog for GH-2986 2019-01-07 09:52:54 -08:00
garenchan
0b182de99a Make sure the attachment filename is text type.
If attachment filename is bytes type and contains non-ascii coded bytes,
then the following ASCII encoding process will trigger
UnicodeDecodeError exception.

Fix issue #2933.
2019-01-07 07:17:33 -08:00
David Lord
fd3c2dd2f8 add changelog for GH-2957 2019-01-07 06:56:20 -08:00
David Lord
857460b75a Merge branch '1.0-maintenance' 2019-01-06 16:33:17 -08:00
David Lord
934c6ab22e clean up flask --version code 2019-01-06 16:24:05 -08:00
Matt Robenolt
0b88fbd5eb Add support for PathLike objects in static file helpers
See: https://www.python.org/dev/peps/pep-0519/

This is mostly encountered with pathlib in python 3, but this API
suggests any PathLike object can be treated like a filepath with
`__fspath__` function.
2019-01-05 15:23:47 -08:00
Jarek Piórkowski
862077e0aa Add changelog entry 2018-11-13 13:40:50 -05:00
Dave Chevell
be5998ce21 Fix #2935: Copy current session object in copy_current_request_context (#2936)
Add session to RequestContext.copy()
2018-11-03 20:32:24 -07:00
ThiefMaster
c93c5e750e Merge branch '1.0-maintenance' 2018-06-14 13:31:40 +02:00
ThiefMaster
fbaeb1fc99 Add option to not overwrite debug flag in cli
This is mainly intended for custom CLIs that may load a config file
which already sets the debug flag and does not make use of the `FLASK_*`
env vars at all.
2018-06-14 13:25:05 +02:00
David Lord
40a2cecdf7 encode filenames as ascii instead of latin-1
latin-1 is allowed by pep3333, but that breaks gunicorn
2018-05-28 06:36:47 -07:00
dayiguizhen
5b08555927 Add the link of pull so that it’s easy for readers to check the changes in code. 2018-05-22 18:39:35 +08:00
Grey Li
e87fed9a0b Fix typos in CHANGES.rst 2018-05-21 10:26:14 +08:00
David Lord
a95166d626 Merge branch '1.0-maintenance' 2018-05-02 07:28:38 -07:00
David Lord
81d79c545e Bump version number to 1.0.3.dev 2018-05-02 07:16:58 -07:00
David Lord
c03527fd98 release 1.0.2 2018-05-02 07:16:10 -07:00
David Lord
beedf6a7c7 Merge branch '1.0-maintenance' 2018-04-29 19:37:05 -07:00
David Lord
b3a2692507 Merge branch '0.12-maintenance' into 1.0-maintenance 2018-04-29 19:36:30 -07:00
David Lord
d0ad3b5eab Merge branch '1.0-maintenance' 2018-04-29 19:13:30 -07:00
David Lord
15cbf96f8a start 1.0.2 changelog 2018-04-29 19:10:48 -07:00
David Lord
32991d6ed8 release 1.0.1 2018-04-29 18:46:54 -07:00
David Lord
7e76635e61 Merge branch '0.12-maintenance' into 1.0-maintenance 2018-04-29 18:28:51 -07:00
David Lord
4067b273e0 format changelog 2018-04-27 07:34:20 -07:00
ThiefMaster
b5c0058849 Merge branch '1.0-maintenance' 2018-04-27 13:57:39 +02:00
ThiefMaster
3ff5440300 Fix registering partials as view functions 2018-04-27 13:44:07 +02:00
David Lord
ace41d913b start 1.0.1 changelog 2018-04-26 14:14:44 -07:00
David Lord
a8f5d9a7aa start 1.1 changelog 2018-04-26 14:14:11 -07:00
David Lord
10fcabc43b release 1.0 2018-04-26 12:28:26 -07:00
David Lord
83424688bc release 1.0 2018-04-26 12:22:45 -07:00
David Lord
1a459e949c Merge branch '0.12-maintenance' 2018-04-26 12:18:06 -07:00