mirror of https://github.com/tiangolo/fastapi.git
✏️ Fix typos in docs, from forms (#176)
This commit is contained in:
parent
f4be79be51
commit
866af5bca6
|
|
@ -229,7 +229,7 @@ It will include all the routes from that router as part of it.
|
||||||
|
|
||||||
### Include an `APIRouter` with a `prefix`, `tags`, and `responses`
|
### Include an `APIRouter` with a `prefix`, `tags`, and `responses`
|
||||||
|
|
||||||
Now, let's include the router form the `items` submodule.
|
Now, let's include the router from the `items` submodule.
|
||||||
|
|
||||||
But, remember that we were lazy and didn't add `/items/` nor `tags` to all the *path operations*?
|
But, remember that we were lazy and didn't add `/items/` nor `tags` to all the *path operations*?
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ So, for everything to work correctly, it's better to specify explicitly the allo
|
||||||
|
|
||||||
You can configure it in your **FastAPI** application using Starlette's <a href="https://www.starlette.io/middleware/#corsmiddleware" target="_blank">`CORSMiddleware`</a>.
|
You can configure it in your **FastAPI** application using Starlette's <a href="https://www.starlette.io/middleware/#corsmiddleware" target="_blank">`CORSMiddleware`</a>.
|
||||||
|
|
||||||
* Import it form Starlette.
|
* Import it from Starlette.
|
||||||
* Create a list of allowed origins (as strings).
|
* Create a list of allowed origins (as strings).
|
||||||
* Add it as a "middleware" to your **FastAPI** application.
|
* Add it as a "middleware" to your **FastAPI** application.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ will not be executed.
|
||||||
|
|
||||||
## Run your code with your debugger
|
## Run your code with your debugger
|
||||||
|
|
||||||
Because you are running the Uvicorn server directly from your code, you can call your Python program (your FastAPI application) directly form the debugger.
|
Because you are running the Uvicorn server directly from your code, you can call your Python program (your FastAPI application) directly from the debugger.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ Each instance of the `SessionLocal` class will have a connection to the database
|
||||||
|
|
||||||
This object (class) is not a connection to the database yet, but once we create an instance of this class, that instance will have the actual connection to the database.
|
This object (class) is not a connection to the database yet, but once we create an instance of this class, that instance will have the actual connection to the database.
|
||||||
|
|
||||||
We name it `SessionLocal` to distinguish it form the `Session` we are importing from SQLAlchemy.
|
We name it `SessionLocal` to distinguish it from the `Session` we are importing from SQLAlchemy.
|
||||||
|
|
||||||
We will use `Session` to declare types later and to get better editor support and completion.
|
We will use `Session` to declare types later and to get better editor support and completion.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue