Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1121 from johngian/attendance-admin
Browse files Browse the repository at this point in the history
Expose events attendance in /admin
  • Loading branch information
johngian committed Apr 4, 2016
2 parents f3f282a + 9e23267 commit be7bb6f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions remo/events/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ def owner_display_name(self, obj):
return obj.owner.userprofile.display_name


class AttendanceAdmin(ExportMixin, admin.ModelAdmin):
"""Attendance Admin"""
model = Attendance
list_display = ('event', 'user', 'date_subscribed',)
search_fields = ('event__name', 'user__first_name', 'user__last_name',)


class EventMetricAdmin(ExportMixin, admin.ModelAdmin):
"""EventMetric Admin."""
model = EventMetric
Expand All @@ -69,5 +76,6 @@ class EventMetricOutcomeAdmin(ExportMixin, admin.ModelAdmin):
search_fields = ('event__name', 'metric__name')

admin.site.register(Event, EventAdmin)
admin.site.register(Attendance, AttendanceAdmin)
admin.site.register(EventMetric, EventMetricAdmin)
admin.site.register(EventMetricOutcome, EventMetricOutcomeAdmin)

0 comments on commit be7bb6f

Please sign in to comment.