use function for default
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s

This commit is contained in:
pierre.geeraert
2026-09-14 16:15:03 +01:00
parent 6b631fb3e3
commit c880172aa5
2 changed files with 21 additions and 1 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
from django.db import models
from django.utils import timezone
class Schedule_Week_Data(models.Model):
name_schedule = models.CharField(max_length=100,unique=True)
@@ -52,7 +53,7 @@ class Deployment_Data(models.Model):
schedule_day = models.ForeignKey(Schedule_Day_Data,null=True, blank=True, on_delete=models.SET_NULL)
replicas = models.IntegerField()
actual_replica = models.IntegerField()
do_not_touch_until = models.DateTimeField('do_not_touch_until', blank=True, null=True, auto_now_add=True)
do_not_touch_until = models.DateTimeField('do_not_touch_until', default=timezone.now)
class Meta:
db_table = 'machine'