Skip to content

Commit

Permalink
Deploying to gh-pages from @ litestar-org/litestar@7982793 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
cofin committed Jan 10, 2025
1 parent 85811eb commit 25818b5
Show file tree
Hide file tree
Showing 225 changed files with 2,136 additions and 313 deletions.
2 changes: 1 addition & 1 deletion 3351/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: c4c876f80fdbc557678f6722246a88fc
config: 40249242fdd1c6895fda4ca83f4ca6eb
tags: 645f666f9bcd5a90fca523b33c5a78b7
16 changes: 8 additions & 8 deletions 3351/_sources/migration/flask.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ Request methods
+---------------------------------+-------------------------------------------------------------------------------------------------------+
| ``request.environ`` | ``request.scope`` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+
| ``request.files`` | Use ```UploadFile`` <usage/requests/file-uploads>`__ |
| ``request.files`` | Use ``UploadFile`` see in :doc:`/usage/requests` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+
| ``request.form`` | ``request.form()``, prefer ```Body`` <usage/requests/content-type>`__ |
| ``request.form`` | ``request.form()``, prefer ``Body`` see in :doc:`/usage/requests` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+
| ``request.get_json`` | ``request.json()``, prefer the ```data keyword argument`` <usage/requests/request-body>`__ |
| ``request.get_json`` | ``request.json()``, prefer the ``data`` keyword argument, see in :doc:`/usage/requests` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+
| ``request.headers`` | ``request.headers`` |
+---------------------------------+-------------------------------------------------------------------------------------------------------+
Expand Down Expand Up @@ -276,11 +276,11 @@ in Litestar.
.. code-block:: python
from litestar import Litestar
from litestar.static_files import StaticFilesConfig
from litestar.static_files import create_static_files_router
app = Litestar(
[], static_files_config=[StaticFilesConfig(path="/static", directories=["static"])]
)
app = Litestar route_handlers=[
create_static_files_router(path="/static", directories=["assets"]),
])
.. seealso::

Expand Down Expand Up @@ -447,7 +447,7 @@ For redirects, instead of ``redirect`` use ``Redirect``:
@get("/hello")
def hello() -> Redirect:
return Redirect(path="index")
return Redirect(path="/")
app = Litestar([index, hello])
Expand Down
Loading

0 comments on commit 25818b5

Please sign in to comment.