☰
Debian Codegraph
@
1.6.3-1
/
/
docs
/
src
/
tutorial
/
authentication
/
code001.py
☽
☼
docs/src/tutorial/authentication/code001.py
code
plain
raw
symbols
SCIP
Expat
2020 - 2026 Vitaliy Kucheryaviy <
[email protected]
>
debian/copyright
1
from
ninja
import
NinjaAPI
2
from
ninja.security
import
django_auth
3
4
api =
NinjaAPI
()
5
6
7
@
api
.
get
(
"/pets"
,
auth
=
django_auth
)
8
def
pets
(request):
9
return
f"Authenticated user
{
request
.
auth
}
"