FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
fastapi-admin/examples/routes.py at dev · sleepergithub/fastapi-admin · GitHub
sleepergithub
fastapi-admin
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
fastapi-admin
/
examples
/
routes.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (20 loc) · 568 Bytes
Breadcrumbs
fastapi-admin
/
examples
/
routes.py
Copy path
File metadata and controls
23 lines (20 loc) · 568 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from
fastapi
import
Depends
from
starlette
.
requests
import
Request
from
fastapi_admin
.
app
import
app
from
fastapi_admin
.
depends
import
get_resources
from
fastapi_admin
.
template
import
templates
@
app
.
get
(
"/"
)
async
def
home
(
request
:
Request
,
resources
=
Depends
(
get_resources
),
):
return
templates
.
TemplateResponse
(
"home.html"
,
context
=
{
"request"
:
request
,
"resources"
:
resources
,
"resource_label"
:
"Home"
,
"page_pre_title"
:
"home"
,
"page_title"
:
"Home page"
,
},
)
Back
|
FazBrowse Home
|
New Git URL