Skip to content

Commit

Permalink
import fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalik committed Nov 22, 2023
1 parent 2f5a576 commit d644841
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/docs/guides/input/body.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To declare a **request body**, you need to use **Django Ninja `Schema`**.

First, you need to import `Schema` from `ninja`:

```python hl_lines="1"
```python hl_lines="2"
{!./src/tutorial/body/code01.py!}
```

Expand All @@ -23,7 +23,7 @@ Then you declare your data model as a class that inherits from `Schema`.

Use standard Python types for all the attributes:

```python hl_lines="4 5 6 7 8"
```python hl_lines="5 6 7 8 9"
{!./src/tutorial/body/code01.py!}
```

Expand Down Expand Up @@ -53,7 +53,7 @@ For example, this model above declares a JSON "`object`" (or Python `dict`) like

To add it to your *path operation*, declare it the same way you declared the path and query parameters:

```python hl_lines="12"
```python hl_lines="13"
{!./src/tutorial/body/code01.py!}
```

Expand Down
1 change: 1 addition & 0 deletions docs/src/tutorial/body/code01.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from typing import Optional
from ninja import Schema


Expand Down

0 comments on commit d644841

Please sign in to comment.