# -*- coding: utf-8 -*-


import django.contrib.admin as admin

from models import *


class TaskAdmin(admin.ModelAdmin):
    list_display = ("id", "method", "label", "state", "owner", "dt_created", "dt_finished", "time", "arch", "channel")
    list_filter = ("method", "state", "owner")
    search_fields = ("id", "method", "label", "dt_created", "dt_finished")


admin.site.register(Arch)
admin.site.register(Channel)
admin.site.register(Worker)
admin.site.register(Task, TaskAdmin)

@@ -270,25 +270,16 @@
  %22state%22
-, %22owner%22
 )%0A    se
@@ -317,16 +317,25 @@
 %22label%22,
+ %22owner%22,
  %22dt_cre
@@ -356,16 +356,48 @@
 ished%22)%0A
+    raw_id_fields = ('parent',)%0A
 %0A%0Aadmin.

Set Task.parent as raw_id field to improve admin performance.