File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3- from typing import TYPE_CHECKING , Callable
3+ from typing import TYPE_CHECKING
44
55from reactpy .core .events import EventHandler , to_event_handler_function
66
@@ -70,7 +70,7 @@ def ensure_input_elements_are_controlled(vdom_tree: VdomDict) -> VdomDict:
7070 return vdom_tree
7171
7272 vdom_tree .setdefault ("eventHandlers" , {})
73- if vdom_tree ["tagName" ] in { "input" } and "onChange" not in vdom_tree ["eventHandlers" ]:
73+ if vdom_tree ["tagName" ] == "input" and "onChange" not in vdom_tree ["eventHandlers" ]:
7474 vdom_tree ["eventHandlers" ]["onChange" ] = EventHandler (to_event_handler_function (_do_nothing_event ))
7575
7676 if "children" in vdom_tree :
Original file line number Diff line number Diff line change 11from django import forms
2+ from django .forms import ModelForm
3+
4+ from .. import models
25
36
47class BasicForm (forms .Form ):
@@ -43,3 +46,14 @@ class BasicForm(forms.Form):
4346 label = "model multiple choice field" , initial = "1" , queryset = models .TodoItem .objects .all ()
4447 )
4548
49+ # Currently unsupported fields
50+ # multi_value_field = MultiValueField(label="multi value", initial="example@gmail.com")
51+ # split_datetime_field = forms.SplitDateTimeField(label="split datetime")
52+ # file_field = forms.FileField(label="file")
53+ # image_field = forms.ImageField(label="image")
54+
55+
56+ class DatabaseBackedForm (ModelForm ):
57+ class Meta :
58+ model = models .TodoItem
59+ fields = "__all__"
You can’t perform that action at this time.
0 commit comments