Skip to content

Commit

Permalink
admin: Add the admin side of EventLog
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
  • Loading branch information
Damien Lespiau committed Feb 26, 2016
1 parent d01920e commit 9489794
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion patchwork/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from django.contrib import admin

from patchwork.models import (Project, Person, UserProfile, State, Patch,
Comment, Bundle, Tag, Test, TestResult,
Comment, Bundle, Tag, EventLog, Test, TestResult,
DelegationRule, Series, SeriesRevision)


Expand Down Expand Up @@ -104,6 +104,18 @@ class CommentAdmin(admin.ModelAdmin):
admin.site.register(Comment, CommentAdmin)


class EventAdmin(admin.ModelAdmin):
list_display = ('event_name', 'project_name', 'series')
list_filter = ('series__project', 'event__name')

def project_name(self, log):
return log.series.project.name

def event_name(self, log):
return log.event.name
admin.site.register(EventLog, EventAdmin)


class TestAdmin(admin.ModelAdmin):
list_display = ('name', 'project')
list_filter = ('project', )
Expand Down

0 comments on commit 9489794

Please sign in to comment.