mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-01 18:28:12 +08:00
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:
co-authored by
Marc Sabatier
parent
4aa6325ae8
commit
e3f959c258
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user