Skip to content

Commit efebe22

Browse files
Add auto_now attrs to date and time model fields (#1210)
Co-Authored-By: Ben Nace <[email protected]> Co-authored-by: Ben Nace <[email protected]>
1 parent f9fbeb0 commit efebe22

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

django-stubs/db/models/fields/__init__.pyi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,8 @@ class DateField(DateTimeCheckMixin, Field[_ST, _GT]):
456456
_pyi_private_set_type: Union[str, date, Combinable]
457457
_pyi_private_get_type: date
458458
_pyi_lookup_exact_type: Union[str, date]
459+
auto_now: bool
460+
auto_now_add: bool
459461
def __init__(
460462
self,
461463
verbose_name: Optional[_StrOrPromise] = ...,
@@ -484,6 +486,8 @@ class DateField(DateTimeCheckMixin, Field[_ST, _GT]):
484486
class TimeField(DateTimeCheckMixin, Field[_ST, _GT]):
485487
_pyi_private_set_type: Union[str, time, real_datetime, Combinable]
486488
_pyi_private_get_type: time
489+
auto_now: bool
490+
auto_now_add: bool
487491
def __init__(
488492
self,
489493
verbose_name: Optional[_StrOrPromise] = ...,

0 commit comments

Comments
 (0)