mirror of
https://github.com/fastapi-admin/fastapi-admin.git
synced 2026-03-13 10:32:25 +08:00
add annotation and update README.rst
This commit is contained in:
@@ -81,7 +81,7 @@ Only you should do is runing a fastapi app and mount admin app from fastapi-admi
|
||||
|
||||
|
||||
@admin_app.post(
|
||||
'/{resource}/bulk/test_bulk'
|
||||
'/{resource}/bulk/test_bulk' # must be format with /{resource}/bulk/<action>
|
||||
)
|
||||
async def test_bulk(
|
||||
bulk_in: BulkIn,
|
||||
@@ -132,8 +132,8 @@ Only you should do is runing a fastapi app and mount admin app from fastapi-admi
|
||||
'text': 'delete_all',
|
||||
}
|
||||
, {
|
||||
'value': 'test_bulk',
|
||||
'text': 'TestBulk'
|
||||
'value': 'test_bulk', # this is the action need in fastapi route.
|
||||
'text': 'TestBulk' # will show in front.
|
||||
}
|
||||
]
|
||||
),
|
||||
|
||||
@@ -5,10 +5,12 @@ from pydantic import BaseModel, HttpUrl
|
||||
|
||||
class Menu(BaseModel):
|
||||
name: str
|
||||
# whether is it a title or a model resource.
|
||||
title: Optional[bool]
|
||||
# must be format with /rest/<Model> if it's a model resource.
|
||||
url: Optional[str]
|
||||
icon: Optional[str]
|
||||
# children meun
|
||||
# children menu
|
||||
children: Optional[List['Menu']] = []
|
||||
# include fields
|
||||
include: Optional[Tuple[str]]
|
||||
|
||||
Reference in New Issue
Block a user