Browse Source

Migrações e admin ajustados

pull/178/head
lucasmndc 4 months ago
parent
commit
8e3df0ec46
  1. 2
      sigi/apps/utils/admin.py
  2. 24
      sigi/apps/utils/migrations/0006_remove_jobschedule_enviado_cronjob_last_digest.py
  3. 1
      sigi/apps/utils/models.py

2
sigi/apps/utils/admin.py

@ -79,7 +79,7 @@ class CronjobAdmin(admin.ModelAdmin):
"digest", "digest",
"last_digest", "last_digest",
] ]
readonly_fields = ("job_name", "app_name", "get_help") readonly_fields = ("job_name", "app_name", "get_help", "last_digest")
inlines = [JobScheduleInline] inlines = [JobScheduleInline]
def get_urls(self): def get_urls(self):

24
sigi/apps/utils/migrations/0006_remove_jobschedule_enviado_cronjob_last_digest.py

@ -0,0 +1,24 @@
# Generated by Django 5.0.6 on 2024-08-13 13:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("utils", "0005_cronjob_destinatario_email_cronjob_digest_and_more"),
]
operations = [
migrations.RemoveField(
model_name="jobschedule",
name="enviado",
),
migrations.AddField(
model_name="cronjob",
name="last_digest",
field=models.DateTimeField(
blank=True, null=True, verbose_name="último envio de digest"
),
),
]

1
sigi/apps/utils/models.py

@ -1,6 +1,7 @@
import io import io
from contextlib import redirect_stderr, redirect_stdout from contextlib import redirect_stderr, redirect_stdout
from cron_converter import Cron from cron_converter import Cron
from pyexpat import model
from django.db import models from django.db import models
from django.contrib.auth.models import Group from django.contrib.auth.models import Group
from django.utils import timezone from django.utils import timezone

Loading…
Cancel
Save