Skip to content

Commit

Permalink
Merge pull request #926 from Neulhan/master
Browse files Browse the repository at this point in the history
fix typo in whatsnew_v1.md
  • Loading branch information
vitalik authored Nov 16, 2023
2 parents 6ee803a + 88a5dab commit da7b302
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/docs/whatsnew_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class Auth(HttpBearer):
## Changed CSRF Behavior


`async=True` requirement is no longer required if you use cookie based authentication. Instead CSRF protection is enabled automatically. This also allow you to mix csrf-protected authenticators and other methods that does not requrie cookies:
`csrf=True` requirement is no longer required if you use cookie based authentication. Instead CSRF protection is enabled automatically. This also allow you to mix csrf-protected authenticators and other methods that does not requrie cookies:

```Python
api = NinjaAPI(auth=[django_auth, Auth()])
Expand Down Expand Up @@ -181,7 +181,7 @@ api.add_router('/app5', 'myproject.app5.router')

When django ninja decorates a view with .get/.post etc - it wraps the result of the function (which in most cases are not HttpResponse - but some serializable object) so it's not really possible to use some built-in or 3rd-party decorators like:

```python hl="4"
```python hl_lines="4"
from django.views.decorators.cache import cache_page

@api.get("/test")
Expand All @@ -193,7 +193,7 @@ This example do not work.

Now django ninja introduces a decorator decorate_view that allows inject decorators that work with http response:

```python hl="1 4"
```python hl_lines="1 4"
from ninja.decorators import decorate_view

@api.get("/test")
Expand Down

0 comments on commit da7b302

Please sign in to comment.