Commit Graph

190 Commits

Author SHA1 Message Date
David Lord 5d8e35653f
refactor lazy loading
Remove the `--eager-loading/--lazy-loading` options and the
`DispatchingApp` middleware. The `run` command handles loading
exceptions directly. The reloader always prints out tracebacks
immediately and always defers raising the error.
2022-08-01 10:34:13 -07:00
David Lord f8cb0b0dd5
update docs about json 2022-07-02 21:41:37 -07:00
David Lord 96d39c87a8
Merge remote-tracking branch 'origin/2.1.x' 2022-07-01 13:32:50 -07:00
hankhank10 64ab59817d
show separate HTTP method route decorators in quickstart 2022-06-28 06:24:46 -07:00
David Lord ab1fbef29a
prefer --app over FLASK_APP in docs 2022-06-17 09:26:26 -07:00
otherJL0 afe77feef3
Adding Fish commands to docs 2022-01-14 08:26:50 -08:00
David Lord 2e10fc24a1
document address already in use error 2021-11-16 09:04:18 -08:00
Chenwei Xiao a2e79eefc9 Correct the actual unescaped character
`»` should be unescaped to `»` after `striptags`.

Ref: https://flask.palletsprojects.com/en/2.0.x/api/#flask.Markup.striptags
2021-11-07 10:40:52 +08:00
Kevin Kirsche 58a08a1d73
use secrets instead of os.urandom 2021-10-13 08:12:51 -07:00
kaushik kothiya 858cc9cace
Wrong variable name use
File upload section upload_file function in  file request parameter variable name is "file". but file save method in secure_filename function in use "f.filename".
2021-08-05 08:52:42 -07:00
Frank Yu f353d126d1
Update docs of rendering templates (#4153)
* Update docs of rendering templates

* Improve the grammar

Co-authored-by: Grey Li <withlihui@gmail.com>
2021-06-18 10:10:29 +08:00
Rafael Aviles 9c186ccfe8 Use escape function in return statement for username and subpath. 2021-05-14 13:23:34 -07:00
Grey Li 531671c9c5
Improve the wording of using FLASK_APP 2021-05-10 22:58:19 -07:00
David Lord 6f09b4b5ed
Merge remote-tracking branch 'origin/1.1.x' into release-2.0.0rc1 2021-04-16 08:37:56 -07:00
kangetsu121 6eeaa2e50d fix a broken link 2021-03-16 16:30:54 +00:00
David Lord 15a49e7297
Merge branch '1.1.x' 2020-11-04 18:25:37 -08:00
Grey Li 1035efc7d6
Add command switch tabs for Bash, CMD and Powershell with sphinx-tabs (#3714)
* Enable Sphinx extension sphinx-tabs

* Add command tabs for all export commands

* Add command tabs for all venv commands

Fix trim spaces
2020-10-15 14:08:37 -07:00
Ebram Shehata 12a4d15546
Update quickstart.rst (#3767) 2020-09-25 16:52:00 -07:00
David Lord 89d1487b2e
rewrite debugging docs, move to separate page 2020-07-28 11:20:34 -07:00
Grey Li 718afcc107
Improve wording of tip for Unique URLs chapter 2020-07-05 08:25:48 +08:00
Deep R. Ode 8074cbdc47
Added very small clarification to quickstart.rst 2020-07-03 15:55:56 +05:30
David Lord 171aabc87d
remove unused ref directives
replace page refs with doc directives
2020-04-04 12:57:14 -07:00
David Lord 2ae740dd49
f-strings everywhere 2020-04-04 12:10:00 -07:00
David Lord 7673835b3d
remove Python 2 from docs 2020-04-04 12:05:44 -07:00
David Lord 57f9623b08
move html escaping to dedicated section 2020-04-02 12:49:00 -07:00
Peter G Kritikos 56e75eace5 Move HTML escaping example back to Variable Rules.
Demonstration of markupsafe's escape function was in the Minimal
Application example, but the minimal example does not accept user
input.
2020-03-04 18:50:36 -05:00
David Lord 07556da918
Merge remote-tracking branch 'origin/1.1.x' 2020-02-10 18:29:43 -08:00
Grey Li 571e92b317
add import for escape in quickstart
import escape from markupsafe instead of flask
2020-02-10 17:53:11 -08:00
Grey Li a3415fc6dc
Use https for pallets URL 2019-11-19 09:32:35 -08:00
Grey Li ef434ea998
Replace old pocoo links everywhere
pocco.org -> palletsprojects.com
2019-11-19 09:32:35 -08:00
David Lord a671e47921
rewrite the development server docs 2019-11-18 18:02:12 -08:00
David Lord 4bceeccfff
Merge pull request #3391 from pallets/explain-escape
explain escape at top of quickstart
2019-10-12 19:03:34 -07:00
David Lord 413778afc1
explain escape at top of quickstart
* introduce escape, and explain why it's omitted in examples
* clean up imports in examples
2019-10-12 18:53:47 -07:00
David Lord 746d9181d7
Merge branch '1.0.x' into 1.1.x 2019-09-23 08:38:11 -07:00
David Lord e01b68e7ee
update patterns, snippets, extensions docs 2019-09-23 08:19:40 -07:00
David Lord 1351d0a565
Merge branch '1.0.x' 2019-06-23 16:57:52 -07:00
David Lord cb6272ccc8
fix docks linkcheck 2019-06-23 15:37:51 -07:00
David Lord 1ecc341fe5
add quickstart about JSON responses 2019-05-24 10:28:12 -07:00
pgjones 7bf8366970
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 2236ba980c
Merge branch '1.0.x' 2019-05-16 12:18:36 -07:00
Adam Johnson e5b0fe6841
Fix some HTML injection paths in examples
These are unlikely to be copy-pasted by users but it's best practice to avoid it and other examples do.
2019-05-16 09:50:58 -07:00
David Baumgold 6606a4a238 fix RST line too long 2019-05-06 11:11:32 -04:00
Grey Li d838f1c918 doc: Improve description for valid view func return value
* improve wording.
* remove unnecessary spaces.
2019-03-06 10:34:21 +08:00
Martin Michlmayr 5830388ee2
Fix formatting issue in quickstart guide
Due to a formatting issue in the reStructuredText input, the HTML
output produced a description list (<dl>) within the ordered list.
2019-02-23 00:02:01 +00:00
David Lord 0b7a74dda3
split code and output 2018-09-21 06:05:52 -07:00
Tom Busby eae6440605
Make script output into comments to not break syntax highlighting
http://flask.pocoo.org/docs/1.0/quickstart/#url-building

In the URL Building section of the quickstart, the script output is shown right after the code.

This breaks syntax highlighting for the whole code-block. To fix this, I have made the output into comments.
2018-09-19 23:42:35 +02:00
Grey Li 21b0aa6dd8 Add prefix for all commands in documentation (#2877)
* Add prefix for commands in docs

* Add prefix for commands in example's README
2018-09-09 17:41:56 +09:00
Daiana Marasquin 104808b480
fix syntax error and typo in quickstart.rst 2018-04-29 14:51:13 -07:00
David Lord 303a3d24a6
rewrite quickstart Unique URLs section 2018-02-24 08:03:30 -08:00
David Lord 87c2e121e0
clean up FLASK_ENV docs [ci skip] 2018-01-10 15:46:11 -08:00