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 22
22
from django .db .models import TimeField
23
23
from django .db .models import Transform
24
24
from django .db .models .sql .compiler import SQLCompiler
25
- from django .forms import Field as FormField
26
25
from django .utils .translation import gettext_lazy as _
27
26
28
27
from django_mysql .models .lookups import DynColHasKey
@@ -292,7 +291,7 @@ def deconstruct(self) -> DeconstructResult:
292
291
kwargs ["blank" ] = False
293
292
return name , path , args , kwargs
294
293
295
- def formfield (self , * args : Any , ** kwargs : Any ) -> FormField | None :
294
+ def formfield (self , * args : Any , ** kwargs : Any ) -> Any :
296
295
"""
297
296
Disabled in forms - there is no sensible way of editing this
298
297
"""
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