Commit graph

1514 commits

Author SHA1 Message Date
David Lord
2e10fc24a1
document address already in use error 2021-11-16 09:04:18 -08:00
David Lord
9fe21310bb
replace nbsp characters 2021-11-16 08:34:55 -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
Ryan Nevius
225ff3ea6c Fix example SECRET_KEY generation code
Removes the extra `)` in: `print(secrets.token_hex())`
2021-10-18 10:41:39 +02:00
karintou8710
21def4e05c Fixes old print statement in some documentation pages 2021-10-16 02:04:07 +09:00
Kevin Kirsche
58a08a1d73
use secrets instead of os.urandom 2021-10-13 08:12:51 -07:00
Seth Rutner
1a40d9b976
fix grammar in links to app and request context 2021-10-01 10:16:20 -07:00
Kasper Primdal Lauritzen
3a78f501e9
Fix broken link to Flask-WTF 2021-10-01 09:57:25 -07:00
Kevin Kirsche
9d9108fe25
fix: typo docs/debugging.rst:72
docs/debugging.rst:72: controled ==> controlled
2021-09-14 12:29:42 -04:00
Mindiell
e1dce5c39a
Fix typo in docs (#4261) 2021-09-08 10:00:36 +02:00
nabbisen
fafc132dcb
Update cherokee links in docs/deploying (#4249) 2021-08-29 09:21:36 -04:00
Grey Li
84aa8706c0
Remove the mention of Flask-Uploads in uploading docs 2021-08-14 05:10:45 -07:00
Angeline
5119657547
safer check for existing user in tutorial
Co-authored-by: David Lord <davidism@gmail.com>
2021-08-05 18:01:55 -07:00
David Lord
a0afb6f375
Merge pull request #4190 from yuxiaoy1/docs
Improve code example of api & jQuery docs
2021-08-05 16:55: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
Elahi-cs
3127c304ec Small SQL formatting fix 2021-07-07 19:41:11 +02:00
Frank Yu
85c35bd615
Fix link in ASGI docs (#4191)
* Fix link in ASGI docs

* Improve the wording of ASGI docs

Co-authored-by: Grey Li <withlihui@gmail.com>
2021-07-07 19:26:24 +08:00
Frank Yu
29c09a92c4
Omit the type attribute of script tag 2021-07-07 15:18:04 +08:00
Frank Yu
922e91b278
Omit the type attribute of script tag 2021-07-07 15:16:29 +08:00
Grey Li
c224832acc Fix typo in docs/views.rst 2021-06-26 22:15:43 +08:00
Frank Yu
35eb582bf3
Change flask.xxx to plain version in testing docs 2021-06-20 23:20:14 +08:00
David Lord
d426b58e57
Merge pull request #4155 from yuxiaoy1/patch-1
Fix bad link in templating docs
2021-06-20 06:45:54 -07:00
Frank Yu
7b696e076a
Update testing.rst 2021-06-18 22:18:15 +08:00
Frank Yu
5fa7d2efe7
Update templating.rst 2021-06-18 20:15:02 +08: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
Hugo Montenegro
92bed66194
Update celery.rst
small typo
2021-06-08 19:01:07 +02:00
Miguel Grinberg
270eb2df2a Support View and MethodView instances with async handlers 2021-06-01 18:08:19 +00:00
laggardkernel
0ce270d1f3 Update doc about minimal Python version for async support 2021-05-30 11:03:49 +00:00
Grey Li
aa6fbf2f5a Fix typo in docs/tutorial/index.rst 2021-05-24 16:33:02 +08:00
Grey Li
a541c2ac8b Fix view decorators docs 2021-05-21 12:11:03 +00:00
David Lord
cfda270899
update pallets-sphinx-themes 2021-05-20 21:03:02 -07:00
Rafael Aviles
9c186ccfe8 Use escape function in return statement for username and subpath. 2021-05-14 13:23:34 -07:00
Andrew J Roth
2889ea4dd9
Added Google Cloud Run as a Hosted option 2021-05-12 09:14:34 -04:00
Grey Li
57b19fda54 Fix typo in the example of nesting bp docs 2021-05-12 07:49:34 +00:00
David Lord
52adf2ec21
rename default branch in files 2021-05-11 15:18:41 -07:00
Grey Li
531671c9c5
Improve the wording of using FLASK_APP 2021-05-10 22:58:19 -07:00
David Lord
79ac96f123
show type hints in description 2021-05-10 22:45:42 -07:00
pgjones
7f87f3dd93
Simplify the async handling code
Firstly `run_sync` was a misleading name as it didn't run anything,
instead I think `async_to_sync` is much clearer as it converts a
coroutine function to a function. (Name stolen from asgiref).

Secondly trying to run the ensure_sync during registration made the
code more complex and brittle, e.g. the _flask_async_wrapper
usage. This was done to pay any setup costs during registration rather
than runtime, however this only saved a iscoroutne check. It allows
the weirdness of the Blueprint and Scaffold ensure_sync methods to be
removed.

Switching to runtime ensure_sync usage provides a method for
extensions to also support async, as now documented.
2021-05-03 06:15:39 -07:00
Joshua Bronson
8bfce88e39
Minor docs fixes. (#3988) 2021-05-02 16:05:08 -04:00
Grey Li
ec044a24e1 Add tips for using async on Windows on Python 3.8 2021-04-29 10:59:26 +08:00
David Lord
03db9194d8
Merge pull request #3967 from pgjones/docs 2021-04-17 07:34:56 -07:00
pgjones
f74cce164e Update documentation on asyncio background tasks
This has been an early question from users, so best to explain.
2021-04-17 15:13:33 +01:00
pgjones
1c3b53c5db Update the docs on serving with ASGI
Whilst it has been possible to serve via an ASGI server for a while
(using WSGI to ASGI middleware/adapters) it hasn't added much. Now
though it makes sense to recommend the asgiref adapter as it
integrates with the same event loop used for async route handlers
etc...
2021-04-17 11:30:22 +01: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
pgjones
f92e820b4b
Nested blueprints
This allows blueprints to be nested within blueprints via a new
Blueprint.register_blueprint method. This should provide a use case
that has been desired for the past ~10 years.

This works by setting the endpoint name to be the blueprint names,
from parent to child delimeted by "." and then iterating over the
blueprint names in reverse order in the app (from most specific to
most general). This means that the expectation of nesting a blueprint
within a nested blueprint is met.
2021-04-14 09:25:42 -07:00
David Lord
dc3e9c0cc3
update async docs 2021-04-06 15:33:06 -07:00
pgjones
6979265fa6
Add async support
This allows for async functions to be passed to the Flask class
instance, for example as a view function,

    @app.route("/")
    async def index():
        return "Async hello"

this comes with a cost though of poorer performance than using the
sync equivalent.

asgiref is the standard way to run async code within a sync context,
and is used in Django making it a safe and sane choice for this.
2021-04-06 09:35:10 -07:00
kangetsu121
6eeaa2e50d fix a broken link 2021-03-16 16:30:54 +00:00
David Lord
dcd3b5c8f8
Merge pull request #3922 from pallets/consistency
various cleanup for consistency between projects
2021-02-24 10:35:16 -08:00
David Lord
9e7d3a6b69
docs rename changelog to changes 2021-02-24 10:09:38 -08:00