@@ -23,7 +23,7 @@ _ClassLevelWidgetT = Any
23
23
24
24
class Field :
25
25
initial : Any
26
- label : Optional [str ]
26
+ label : Optional [_StrOrPromise ]
27
27
required : bool
28
28
widget : _ClassLevelWidgetT = ...
29
29
hidden_widget : Type [Widget ] = ...
@@ -43,7 +43,7 @@ class Field:
43
43
* ,
44
44
required : bool = ...,
45
45
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
46
- label : Optional [str ] = ...,
46
+ label : Optional [_StrOrPromise ] = ...,
47
47
initial : Optional [Any ] = ...,
48
48
help_text : _StrOrPromise = ...,
49
49
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -78,7 +78,7 @@ class CharField(Field):
78
78
empty_value : Optional [str ] = ...,
79
79
required : bool = ...,
80
80
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
81
- label : Optional [str ] = ...,
81
+ label : Optional [_StrOrPromise ] = ...,
82
82
initial : Optional [Any ] = ...,
83
83
help_text : _StrOrPromise = ...,
84
84
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -102,7 +102,7 @@ class IntegerField(Field):
102
102
min_value : Optional [int ] = ...,
103
103
required : bool = ...,
104
104
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
105
- label : Optional [str ] = ...,
105
+ label : Optional [_StrOrPromise ] = ...,
106
106
initial : Optional [Any ] = ...,
107
107
help_text : _StrOrPromise = ...,
108
108
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -123,7 +123,7 @@ class FloatField(IntegerField):
123
123
min_value : Union [int , float , None ] = ...,
124
124
required : bool = ...,
125
125
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
126
- label : Optional [str ] = ...,
126
+ label : Optional [_StrOrPromise ] = ...,
127
127
initial : Optional [Any ] = ...,
128
128
help_text : _StrOrPromise = ...,
129
129
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -149,7 +149,7 @@ class DecimalField(IntegerField):
149
149
decimal_places : Optional [int ] = ...,
150
150
required : bool = ...,
151
151
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
152
- label : Optional [str ] = ...,
152
+ label : Optional [_StrOrPromise ] = ...,
153
153
initial : Optional [Any ] = ...,
154
154
help_text : _StrOrPromise = ...,
155
155
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -171,7 +171,7 @@ class BaseTemporalField(Field):
171
171
input_formats : Optional [Any ] = ...,
172
172
required : bool = ...,
173
173
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
174
- label : Optional [str ] = ...,
174
+ label : Optional [_StrOrPromise ] = ...,
175
175
initial : Optional [Any ] = ...,
176
176
help_text : _StrOrPromise = ...,
177
177
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -215,7 +215,7 @@ class RegexField(CharField):
215
215
empty_value : Optional [str ] = ...,
216
216
required : bool = ...,
217
217
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
218
- label : Optional [str ] = ...,
218
+ label : Optional [_StrOrPromise ] = ...,
219
219
initial : Optional [Any ] = ...,
220
220
help_text : _StrOrPromise = ...,
221
221
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -236,7 +236,7 @@ class EmailField(CharField):
236
236
empty_value : Optional [str ] = ...,
237
237
required : bool = ...,
238
238
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
239
- label : Optional [str ] = ...,
239
+ label : Optional [_StrOrPromise ] = ...,
240
240
initial : Optional [Any ] = ...,
241
241
help_text : _StrOrPromise = ...,
242
242
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -256,7 +256,7 @@ class FileField(Field):
256
256
allow_empty_file : bool = ...,
257
257
required : bool = ...,
258
258
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
259
- label : Optional [str ] = ...,
259
+ label : Optional [_StrOrPromise ] = ...,
260
260
initial : Optional [Any ] = ...,
261
261
help_text : _StrOrPromise = ...,
262
262
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -285,7 +285,7 @@ class URLField(CharField):
285
285
empty_value : Optional [str ] = ...,
286
286
required : bool = ...,
287
287
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
288
- label : Optional [str ] = ...,
288
+ label : Optional [_StrOrPromise ] = ...,
289
289
initial : Optional [Any ] = ...,
290
290
help_text : _StrOrPromise = ...,
291
291
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -323,7 +323,7 @@ class ChoiceField(Field):
323
323
choices : Union [_FieldChoices , _ChoicesCallable ] = ...,
324
324
required : bool = ...,
325
325
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
326
- label : Optional [str ] = ...,
326
+ label : Optional [_StrOrPromise ] = ...,
327
327
initial : Optional [Any ] = ...,
328
328
help_text : _StrOrPromise = ...,
329
329
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -353,7 +353,7 @@ class TypedChoiceField(ChoiceField):
353
353
choices : Union [_FieldChoices , _ChoicesCallable ] = ...,
354
354
required : bool = ...,
355
355
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
356
- label : Optional [str ] = ...,
356
+ label : Optional [_StrOrPromise ] = ...,
357
357
initial : Optional [Any ] = ...,
358
358
help_text : _StrOrPromise = ...,
359
359
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -381,7 +381,7 @@ class TypedMultipleChoiceField(MultipleChoiceField):
381
381
choices : Union [_FieldChoices , _ChoicesCallable ] = ...,
382
382
required : bool = ...,
383
383
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
384
- label : Optional [str ] = ...,
384
+ label : Optional [_StrOrPromise ] = ...,
385
385
initial : Optional [Any ] = ...,
386
386
help_text : _StrOrPromise = ...,
387
387
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -402,7 +402,7 @@ class ComboField(Field):
402
402
* ,
403
403
required : bool = ...,
404
404
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
405
- label : Optional [str ] = ...,
405
+ label : Optional [_StrOrPromise ] = ...,
406
406
initial : Optional [Any ] = ...,
407
407
help_text : _StrOrPromise = ...,
408
408
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -424,7 +424,7 @@ class MultiValueField(Field):
424
424
require_all_fields : bool = ...,
425
425
required : bool = ...,
426
426
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
427
- label : Optional [str ] = ...,
427
+ label : Optional [_StrOrPromise ] = ...,
428
428
initial : Optional [Any ] = ...,
429
429
help_text : _StrOrPromise = ...,
430
430
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -457,7 +457,7 @@ class FilePathField(ChoiceField):
457
457
choices : Union [_FieldChoices , _ChoicesCallable ] = ...,
458
458
required : bool = ...,
459
459
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
460
- label : Optional [str ] = ...,
460
+ label : Optional [_StrOrPromise ] = ...,
461
461
initial : Optional [Any ] = ...,
462
462
help_text : _StrOrPromise = ...,
463
463
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -478,7 +478,7 @@ class SplitDateTimeField(MultiValueField):
478
478
require_all_fields : bool = ...,
479
479
required : bool = ...,
480
480
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
481
- label : Optional [str ] = ...,
481
+ label : Optional [_StrOrPromise ] = ...,
482
482
initial : Optional [Any ] = ...,
483
483
help_text : _StrOrPromise = ...,
484
484
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -499,7 +499,7 @@ class GenericIPAddressField(CharField):
499
499
unpack_ipv4 : bool = ...,
500
500
required : bool = ...,
501
501
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
502
- label : Optional [str ] = ...,
502
+ label : Optional [_StrOrPromise ] = ...,
503
503
initial : Optional [Any ] = ...,
504
504
help_text : _StrOrPromise = ...,
505
505
error_messages : Optional [_ErrorMessagesT ] = ...,
@@ -523,7 +523,7 @@ class SlugField(CharField):
523
523
empty_value : Optional [str ] = ...,
524
524
required : bool = ...,
525
525
widget : Optional [Union [Widget , Type [Widget ]]] = ...,
526
- label : Optional [str ] = ...,
526
+ label : Optional [_StrOrPromise ] = ...,
527
527
initial : Optional [Any ] = ...,
528
528
help_text : _StrOrPromise = ...,
529
529
error_messages : Optional [_ErrorMessagesT ] = ...,
0 commit comments