File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 2
2
< html lang ="en ">
3
3
< head >
4
4
< meta charset ="utf-8 " />
5
- < meta name ="viewport " content ="width=device-width,initial-scale=1 " />
6
5
7
6
< title > Todo App</ title >
8
7
14
13
- paths:
15
14
- /utils.py
16
15
</ py-env >
17
- < py-register-widget src ="/pylist.py " name ="py-list " klass ="PyList "> </ py-widget >
16
+ < py-register-widget src ="/pylist.py " name ="py-list " klass ="PyList "> </ py-register- widget >
18
17
</ head >
19
18
20
19
< body >
21
20
< py-title > To Do List</ py-title >
22
- < py-box widths ="2/3 ;1/3 ">
21
+ < py-box widths ="4/5 ;1/5 ">
23
22
< py-inputbox id ="new-task-content ">
24
23
def on_keypress(e):
25
24
if (e.code == "Enter"):
26
25
add_task()
27
26
</ py-inputbox >
28
27
< py-button id ="new-task-btn " label ="Add Task! ">
29
28
def on_click(evt):
30
- task = { "content": new_task_content.value, "done": False, "created_at": dt.now() }
31
- myList.add(PyItem(task, labels=['content'], state_key="done"))
32
- new_task_content.clear()
29
+ add_task()
33
30
</ button >
34
31
</ py-box >
35
-
32
+
36
33
< py-list id ="myList "> </ py-list >
37
34
< py-repl id ="my-repl " auto-generate ="true "> </ py-repl >
38
35
</ body >
You can’t perform that action at this time.
0 commit comments