Commit Graph

169 Commits

Author SHA1 Message Date
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
Armin Ronacher 2433522d29
Add Support for FLASK_ENV (#2570)
This introduces environments to Flask
2018-01-06 17:07:56 +01:00
Vladimir Kroz d08d96acbc Fix code example for HTTP Methods
`return` is required to make 'http methods' example work
2017-12-05 17:59:04 +01:00
David Lord 465922e5f1
clean up secret key docs
consistent key across docs and examples
consistent key across tests, set in conftest
2017-06-28 07:58:06 -07:00
Levi Roth 954d9ca0b8 Added documentation for PowerShell environment variables 2017-05-23 14:30:39 -04:00
Tully Rankin 50b73f967b Removed the version number out of the documenation link to Werkzeug. 2017-05-22 12:19:52 -07:00
Tully Rankin 409dd15c10 Added link to using Werkzeug debugger in quickstart documentation. 2017-05-22 12:14:52 -07:00
David Lord 2592f927a0
wrap lines
tighten up wording
remove any converter from quickstart
use correct rst code syntax
2017-05-11 22:31:19 -07:00
Xephyr826 dfb03c5673 Improve Routing section
Edited the entire section for clarity and concision. I rewrote sentences
to make them shorter and to reduce ambiguity.

Added a code sample to show the path converter type

Removed the HTTP method overview. Although it was well written, the
overview wasn't necessary in the quickstart. Readers can easily find an
overview elsewhere.
2017-05-10 22:38:22 -07:00
Jan Ferko 1add1f8a02 Use print function in quickstart (#2204)
Example in URL Building section uses `print` statement
instead of `print` function, which causes syntax error
when example is run on Python 3.
2017-03-13 13:58:24 +01:00
Jeff Widman bb0e755c80 Migrate various docs links to https (#2180)
Also fixed a few outdated links
2017-02-11 10:43:11 +01:00
Swan Htet Aung f84fdadda9 Update 4.4.3 HTTP Methods Example
Otherwise it produces `ValueError: View function did not return a response`.
2017-02-09 18:01:12 +06:30
Dennis Chen 9900a72fe7 Fix Request Reference (#2151)
Points flask.Request to appropriate place in the documentation.
2017-01-14 21:58:45 +01:00
Michael Recachinas 49ecc88d99 Remove `-a/--app` from Quickstart documentation (#2046)
* Remove `-a/--app` from Quickstart documentation

As mentioned in #2009, simplifying the CLI saw the removal of the `-a/--app` flag. Therefore, the only way to specify the module to import is by setting `FLASK_APP`.

* Remove misleading `either` from CLI help

The CLI help details how to run the application, but still uses the phrasing "either through the `FLASK_APP`...". This likely is an artifact from when `-a/--app` was still present in the CLI.
2016-10-01 18:45:22 +02:00
dawran6 3d856e03fc sessions documentation (client side vs server side) #434 (#1888)
Mention the existence of Flask extentions that handle server-side
sessions.
Attempt to improve the reading flow.
2016-08-29 00:06:53 +02:00
David Lord 1928f28a68 clean up code formatting in some docs
fix warnings while building docs
2016-06-26 13:03:29 -07:00
David Lord cd1a9b7d54 remove unnecessary form action attributes 2016-06-22 15:01:41 -07:00
Markus Unterwaditzer f91aea2aa0 quickstart: Remove reference to `python hello.py`
Fix #1826
2016-05-29 15:46:48 +02:00
Armin Ronacher a7d829c618 Update docs to the new CLI patterns 2016-05-26 20:45:50 +02:00
bagratte 9a80fe691d minor revision of documentation. 2016-04-01 23:12:25 +02:00
lord63 e0a8fd3162 Add two missing converters for flask in the docs
All converters are from werkzeug's builtin converters.

Documentation: http://werkzeug.pocoo.org/docs/dev/routing/#builtin-converters
2016-04-01 14:05:11 -07:00
Markus Unterwaditzer 66b4ea91b4 Fix #1195 2015-06-06 06:25:41 +02:00