mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-21 01:48:21 +02:00
default=timezone.default is better than auto_now_add=True
This commit is contained in:
@ -6,6 +6,7 @@ from django.contrib.auth.models import User
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.db import models
|
||||
from django.db.models import Q
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from note.models import NoteSpecial, SpecialTransaction, MembershipTransaction
|
||||
|
||||
@ -53,7 +54,7 @@ class Invoice(models.Model):
|
||||
)
|
||||
|
||||
date = models.DateField(
|
||||
auto_now_add=True,
|
||||
default=timezone.now,
|
||||
verbose_name=_("Place"),
|
||||
)
|
||||
|
||||
@ -130,7 +131,7 @@ class Remittance(models.Model):
|
||||
"""
|
||||
|
||||
date = models.DateTimeField(
|
||||
auto_now_add=True,
|
||||
default=timezone.now,
|
||||
verbose_name=_("Date"),
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user