Admin improvements (#11)

* Add the group column to OrmQ admin page

* Add group field to tasks list and search_field

* Add search by name to Schedule admin page

* Limit succesful task history per schedule with SAVE_LIMIT_GROUP config

* Improve ScheduleAdmin list view performance

Co-authored-by: Marc Sabatier <marc@sabatier.online>
This commit is contained in:
Stan Triepels
2022-10-14 17:13:48 +02:00
committed by GitHub
co-authored by Marc Sabatier
parent 4aa6325ae8
commit e3f959c258
4 changed files with 61 additions and 17 deletions
+6
View File
@@ -220,7 +220,10 @@ class Schedule(models.Model):
return self.func
success.boolean = True
success.short_description = _("success")
last_run.allow_tags = True
last_run.short_description = _("last_run")
class Meta:
app_label = "django_q"
@@ -246,6 +249,9 @@ class OrmQ(models.Model):
def name(self):
return self.task()["name"]
def group(self):
return self.task().get("group")
class Meta:
app_label = "django_q"
verbose_name = _("Queued task")