Skip to content

Commit

Permalink
feat: add admin filters
Browse files Browse the repository at this point in the history
  • Loading branch information
PiotrIw committed Jun 20, 2024
1 parent c64b4c1 commit 602eaff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion background_task/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class TaskAdmin(admin.ModelAdmin):
"locked_by_pid_running",
]
actions = [inc_priority, dec_priority]
list_filter = ["task_name", "run_at", "priority", "attempts", "has_error"]
list_filter = ["task_name", "has_error", "attempts", "priority"]


class CompletedTaskAdmin(admin.ModelAdmin):
Expand All @@ -58,6 +58,7 @@ class CompletedTaskAdmin(admin.ModelAdmin):
"locked_by",
"locked_by_pid_running",
]
list_filter = ["task_name", "has_error", "attempts", "priority"]


admin.site.register(Task, TaskAdmin)
Expand Down

0 comments on commit 602eaff

Please sign in to comment.