File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
src/django_mysql/models/fields Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 20
20
from django .db .models import TimeField
21
21
from django .db .models import Transform
22
22
from django .db .models .sql .compiler import SQLCompiler
23
- from django .forms import Field as FormField
24
23
from django .utils .translation import gettext_lazy as _
25
24
26
25
from django_mysql .models .lookups import DynColHasKey
@@ -290,7 +289,7 @@ def deconstruct(self) -> DeconstructResult:
290
289
kwargs ["blank" ] = False
291
290
return name , path , args , kwargs
292
291
293
- def formfield (self , * args : Any , ** kwargs : Any ) -> FormField | None :
292
+ def formfield (self , * args : Any , ** kwargs : Any ) -> Any :
294
293
"""
295
294
Disabled in forms - there is no sensible way of editing this
296
295
"""
Original file line number Diff line number Diff line change 11
11
from django .db .models import Model
12
12
from django .db .models import TextField
13
13
from django .db .models .expressions import BaseExpression
14
- from django .forms import Field as FormField
15
14
from django .utils .translation import gettext_lazy as _
16
15
17
16
from django_mysql .forms import SimpleSetField
@@ -136,7 +135,7 @@ def value_to_string(self, obj: Any) -> str:
136
135
vals = self .value_from_object (obj )
137
136
return self .get_prep_value (vals )
138
137
139
- def formfield (self , ** kwargs : Any ) -> FormField :
138
+ def formfield (self , ** kwargs : Any ) -> Any :
140
139
defaults = {
141
140
"form_class" : SimpleSetField ,
142
141
"base_field" : self .base_field .formfield (),
You can’t perform that action at this time.
0 commit comments