David Lord
e666f7a69c
standardize license and copyright
2019-06-22 13:09:09 -07:00
DamianSkrzypczak
e2f4b53396
Fix dev-server warning message readability ( #3168 )
2019-05-16 19:03:08 -07:00
David Lord
a0ccc47780
clean up flask --version code
2019-01-06 16:24:05 -08:00
Dilan Coss
3fd51c65fb
add werkzeug to flask --version
2019-01-06 16:11:03 -08:00
Rohan Talip
02df042416
Corrected a typo in a docstring: "Help object" --> "Helper object"
2019-01-06 09:10:28 -08:00
Grey Li
d0ceb16be9
Use imperative tense for CLI help text
2019-01-06 06:31:57 -08:00
garenchan
c38499bbf2
ignore colon with slash when split app_import_path
...
Flask currently supports importing app through a combination of module
path and app variable name, such as '/usr/app.py:my_app'. When the
module path contains a colon, it will conflict with this import way and
a `flask.cli.NoAppException` will be raised.
A file path on a Windows system may contain a colon followed by a slash.
So we solved this problem on Windows by ignoring the colon followed by a
slash when we split app_import_path.
Fix issue #2961 .
2018-10-24 23:47:41 +08:00
ThiefMaster
50227f0954
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
Briehan Lombaard
a913b4dafd
SSLContext was added in Python 2.7.9
2018-05-17 06:18:42 -07:00
Grey Li
b4e092600d
Check whether exist registered routes
2018-05-02 06:06:15 -07:00
David Lord
5965cb7e1c
rename to FLASK_SKIP_DOTENV, add docs, test
2018-04-29 14:20:17 -07:00
Hsiaoming Yang
bac5d6b9f4
Use FLASK_DONT_LOAD_ENV flag to disable load .env
2018-04-28 07:19:06 -07:00
David Lord
e102e5cb33
Merge pull request #2707 from rochacbruno/lazy_loader_message
...
Add a message `Serving Flask app (module "app.py" will be lazily loaded)` to `flask run` related to #2706
2018-04-18 13:45:35 -07:00
David Lord
80a9e0edf6
app.run is not lazy
...
use click.echo for banner messages
2018-04-18 13:39:55 -07:00
David Lord
49a38ed999
use theme provided by pallets-sphinx-themes
2018-04-18 12:05:31 -07:00
Bruno Rocha
8f5168cb31
Add explicit (lazy loading) message to flask run related to #2706
2018-04-18 13:42:46 -03:00
Hsiaoming Yang
08e61ea200
Add tip for dotenv
2018-03-23 00:04:05 +09:00
David Lord
310fbfcf64
revert copyright year to project start
...
add copyright header to files
2018-02-08 12:43:30 -08:00
David Lord
03a2996bb8
Merge pull request #2530 from pallets/feature/factory-detection
...
Improved bad factory error handling
2018-01-28 11:27:07 -08:00
David Lord
2cba0d77ee
use traceback to detect call more reliably
2018-01-28 11:20:42 -08:00
David Lord
83b5625f0c
Merge pull request #2603 from greyli/patch-8
...
Update cli help for FLASK_ENV
2018-01-23 15:39:42 -08:00
Grey Li
0570393bc4
Update cli help for FLASK_ENV
2018-01-23 15:17:35 -08:00
David Lord
2beedabaaf
add HTTPS support for flask run command
2018-01-23 10:03:53 -08:00
David Lord
3738f7ff99
match run command behavior in app.run
...
output extra server information
handle env var changed by load_dotenv
enable threading by default
2018-01-10 12:02:13 -08:00
Armin Ronacher
2433522d29
Add Support for FLASK_ENV ( #2570 )
...
This introduces environments to Flask
2018-01-06 17:07:56 +01:00
Armin Ronacher
1a2dc6f205
Fixed tests for python 3
2017-11-25 00:18:10 +01:00
Armin Ronacher
2ef2000a39
Enable threads by default for the dev server ( #2529 )
...
Enable threads by default for dev server
2017-11-25 00:17:09 +01:00
Armin Ronacher
c23a63a185
Improved bad factory error handling
2017-11-25 00:05:57 +01:00
Roy Crihfield
e3c853e604
Fix typo in cli.py ( #2502 )
2017-10-24 08:10:12 +02:00
David Lord
9bc329c0c9
rewrite cli docs
...
reflects the current FLASK_APP detection
2017-10-10 11:10:20 -07:00
David Lord
5436dddf64
rewrite cli errors
...
consistent order for arguments to load functions
refactor find_app_by_string to flow better
more cli loader tests
2017-10-10 07:04:53 -07:00
David Lord
491d331e6e
load env vars using python-dotenv
2017-07-16 13:37:51 -07:00
David Lord
fb845b9032
allow local packages in FLASK_APP
...
don't require .py extension in FLASK_APP
add tests for nested package loading
parametrize cli loading tests
2017-07-14 19:49:05 -07:00
Miguel Grinberg
4f30cb7c57
fix variable substitution in error message
2017-06-27 07:27:10 -07:00
David Lord
448368e226
style cleanup
...
[ci skip]
2017-06-16 06:59:37 -07:00
Miguel Grinberg
7c40aa9e50
Import app from wsgi.py or app.py if FLASK_APP is not defined
...
Fixes #2376
2017-06-15 11:27:50 -07:00
David Lord
4fc48200a5
reconfigure the app from run command and method
...
extract templates_auto_reload to property
continues #1910
closes #1907
2017-06-14 12:08:25 -07:00
David Lord
12c45f06a5
remove unused import
2017-06-04 12:38:10 -07:00
David Lord
fa7e8d6073
be smarter about adding ".cli" to reloader command
...
python -m flask.cli raises an import warning on > 2.6
it's only needed on 2.6, "flask" works otherwise
closes #2357
2017-06-04 12:26:21 -07:00
Junior Báez
4f689c41d9
#2341 : Accept default argument value when args lenght equal 1
2017-05-27 18:02:18 -04:00
Kenneth Reitz
7c0b36f146
cleanup #2326
2017-05-26 09:16:45 -04:00
Hendrik Makait
48c2925664
Factor in code review comments and refactor functions to be more naturally split.
2017-05-25 11:28:20 -07:00
Hendrik Makait
7a1a594b26
Factor out call_factory_from_regex function
2017-05-25 10:11:42 -07:00
Hendrik Makait
7106fb6357
Handle app factory with arguments in FLASK_APP
2017-05-25 10:11:42 -07:00
David Lord
38df3df735
shorten cli factory name
...
[ci skip]
2017-05-23 16:19:41 -07:00
Hendrik Makait
ae41df9a77
Check if app factory takes script_info argument and call it with(out) script_info as an argument depending on that
2017-05-23 13:48:42 -07:00
David Lord
01ddf54b87
adjust for loop style
2017-05-22 16:12:23 -07:00
David Lord
7ecdbcfa2b
show error if multiple Flask instances are detected
...
add changelog
2017-05-22 15:48:08 -07:00
Hendrik Makait
b4eb6534d5
Remove unnecessary checks and reformat NoAppException messages
2017-05-22 14:26:00 -07:00
Hendrik Makait
ced719ea18
Auto-detect create_app and make_app factory functions
2017-05-22 12:30:18 -07:00