From 3aee42ab99114fd66c2dad9b3f2b2779b472d26d Mon Sep 17 00:00:00 2001 From: Hangyeol Shin Date: Fri, 17 Nov 2023 02:55:24 +0900 Subject: [PATCH 1/2] fix typo in whatsnew_v1.md --- docs/docs/whatsnew_v1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/whatsnew_v1.md b/docs/docs/whatsnew_v1.md index f25f81a7..4cbeeb91 100644 --- a/docs/docs/whatsnew_v1.md +++ b/docs/docs/whatsnew_v1.md @@ -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()]) From 88a5dab1336467865346f35057554fea1f8d7c36 Mon Sep 17 00:00:00 2001 From: Hangyeol Shin Date: Fri, 17 Nov 2023 03:06:56 +0900 Subject: [PATCH 2/2] Fix markdown break in whatsnew_v1.md --- docs/docs/whatsnew_v1.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/whatsnew_v1.md b/docs/docs/whatsnew_v1.md index 4cbeeb91..d110a9b7 100644 --- a/docs/docs/whatsnew_v1.md +++ b/docs/docs/whatsnew_v1.md @@ -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") @@ -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")