Python
Book List
Author
Bases: Model
著者モデル
Attributes:
| Name | Type | Description |
|---|---|---|
id |
IntField
|
主キー |
name |
CharField
|
著者名 |
Source code in src/nicegui_book_list/models.py
6 7 8 9 10 11 12 13 14 | |
AuthorList
Bases: ListBase
著者リストのGUI
Attributes:
| Name | Type | Description |
|---|---|---|
name |
input
|
モデルのフィールド用 |
model |
Model
|
対象モデル |
Source code in src/nicegui_book_list/ui.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
build()
async
GUI作成
Source code in src/nicegui_book_list/ui.py
123 124 125 126 127 128 129 130 131 132 133 134 | |
check()
async
入力チェック
Source code in src/nicegui_book_list/ui.py
136 137 138 139 140 141 | |
Book
Bases: Model
書籍モデル
Attributes:
| Name | Type | Description |
|---|---|---|
id |
IntField
|
主キー |
author |
ForeignKeyField
|
著者 |
title |
CharField
|
書籍名 |
Source code in src/nicegui_book_list/models.py
17 18 19 20 21 22 23 24 25 26 27 | |
BookList
Bases: ListBase
書籍リストのGUI
Attributes:
| Name | Type | Description |
|---|---|---|
author_id |
select
|
モデルのフィールド用 |
title |
input
|
モデルのフィールド用 |
model |
Model
|
対象モデル |
Source code in src/nicegui_book_list/ui.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | |
build()
async
GUI作成
Source code in src/nicegui_book_list/ui.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | |
check()
async
入力チェック
Source code in src/nicegui_book_list/ui.py
102 103 104 105 106 107 108 109 110 | |
ListBase
Bases: ABC, element
著者リストと書籍リストのGUIの基底クラス
Attributes:
| Name | Type | Description |
|---|---|---|
label |
str
|
uiの見出し |
refs |
set[ListBase]
|
一緒にrefreshするもの |
fields |
set[str]
|
フィールドの集合 |
list_ui |
column
|
build時の一覧用のコンテナ |
add_ui |
row
|
build時の追加入力用のコンテナ |
model |
Model
|
対象モデル |
Source code in src/nicegui_book_list/ui.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |
__init__(*, label, refs=None)
初期化
Source code in src/nicegui_book_list/ui.py
30 31 32 33 34 | |
build()
GUI作成
Source code in src/nicegui_book_list/ui.py
36 37 38 39 40 41 42 43 44 | |
check()
abstractmethod
async
入力チェック
Source code in src/nicegui_book_list/ui.py
52 53 54 | |
create()
async
追加
Source code in src/nicegui_book_list/ui.py
56 57 58 59 60 | |
delete(record)
async
削除
Source code in src/nicegui_book_list/ui.py
67 68 69 70 | |
keydown_enter(event)
async
Enterキー押下
Source code in src/nicegui_book_list/ui.py
62 63 64 65 | |
refresh()
最新化
Source code in src/nicegui_book_list/ui.py
46 47 48 49 50 | |