home, lyric, song, video에 대한 app 추가, 각 app별 모델 추가, admin 추가, debug 모드 추가, lifespan에 debug시 동작하는 것으로 업데이트
This commit is contained in:
1 parent
6180c23151
commit
5f1b9da77e
74 files changed
+3437
-416
No files matched your search
@@ -0,0 +1,62 @@
|
||||
from sqladmin import ModelView
|
||||
|
||||
from app.video.models import Video
|
||||
|
||||
|
||||
class VideoAdmin(ModelView, model=Video):
|
||||
name = "영상"
|
||||
name_plural = "영상 목록"
|
||||
icon = "fa-solid fa-video"
|
||||
category = "영상 관리"
|
||||
page_size = 20
|
||||
|
||||
column_list = [
|
||||
"id",
|
||||
"project_id",
|
||||
"lyric_id",
|
||||
"song_id",
|
||||
"task_id",
|
||||
"status",
|
||||
"created_at",
|
||||
]
|
||||
|
||||
column_details_list = [
|
||||
"id",
|
||||
"project_id",
|
||||
"lyric_id",
|
||||
"song_id",
|
||||
"task_id",
|
||||
"status",
|
||||
"result_movie_url",
|
||||
"created_at",
|
||||
]
|
||||
|
||||
# 폼(생성/수정)에서 제외
|
||||
form_excluded_columns = ["created_at"]
|
||||
|
||||
column_searchable_list = [
|
||||
Video.task_id,
|
||||
Video.status,
|
||||
]
|
||||
|
||||
column_default_sort = (Video.created_at, True) # True: DESC (최신순)
|
||||
|
||||
column_sortable_list = [
|
||||
Video.id,
|
||||
Video.project_id,
|
||||
Video.lyric_id,
|
||||
Video.song_id,
|
||||
Video.status,
|
||||
Video.created_at,
|
||||
]
|
||||
|
||||
column_labels = {
|
||||
"id": "ID",
|
||||
"project_id": "프로젝트 ID",
|
||||
"lyric_id": "가사 ID",
|
||||
"song_id": "노래 ID",
|
||||
"task_id": "작업 ID",
|
||||
"status": "상태",
|
||||
"result_movie_url": "영상 URL",
|
||||
"created_at": "생성일시",
|
||||
}
|
||||
Reference in new issue
Block a user