Improve taskresults app

- show created/modified fields in admin
- add verbose output to management command
- add date hierarchy and action filters in admin
This commit is contained in:
Jan Dittberner 2023-04-29 11:10:23 +02:00
parent 397e479925
commit 2d05580ed3
4 changed files with 33 additions and 6 deletions

View file

@ -3,6 +3,7 @@ This model defines the database models to handle Celery AsyncResults.
"""
from django.db import models
from django.utils import timezone
from django.utils.translation import gettext as _
from model_utils.models import TimeStampedModel
@ -33,7 +34,7 @@ class TaskResult(TimeStampedModel):
class Meta:
verbose_name = _("Task result")
verbose_name_plural = _("Task results")
ordering = ["created"]
ordering = ["-modified"]
def __str__(self):
return "{creator} ({task_id}): {finished}".format(