Skip to content

Commit

Permalink
Merge pull request #1119 from jefer94/development
Browse files Browse the repository at this point in the history
add the admin
  • Loading branch information
jefer94 authored Oct 12, 2023
2 parents 53fcebc + 1f13cb0 commit 7208299
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion breathecode/commons/admin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.contrib import admin
from .models import TaskManager
from .models import TaskManager, TaskWatcher
from breathecode.commons import tasks


Expand Down Expand Up @@ -37,3 +37,10 @@ class TaskManagerAdmin(admin.ModelAdmin):
search_fields = ['task_module', 'task_name', 'reverse_module', 'reverse_name']
list_filter = ['status', 'killed', 'task_module']
actions = [pause, resume, cancel, reverse, force_reverse]


@admin.register(TaskWatcher)
class TaskWatcherAdmin(admin.ModelAdmin):
list_display = ['user', 'email', 'on_error', 'on_success', 'watch_progress']
search_fields = ['email', 'user__email', 'user__username', 'user__first_name', 'user__last_name']
list_filter = ['on_error', 'on_success', 'watch_progress']

0 comments on commit 7208299

Please sign in to comment.