X-Git-Url: https://git.mdrn.pl/edumed.git/blobdiff_plain/1b8b86e4954ef2b11fcf65de79ebc33629319f19..8d160a1bb2a70247ac2429858ece023d039d9ed9:/wtem/admin.py?ds=sidebyside diff --git a/wtem/admin.py b/wtem/admin.py index d581de0..acab816 100644 --- a/wtem/admin.py +++ b/wtem/admin.py @@ -10,7 +10,7 @@ from django.http import HttpResponse from django.template.loader import render_to_string from django.utils.safestring import mark_safe -from wtem.models import Confirmation +from wtem.models import Confirmation, CompetitionState from .middleware import get_current_request from .models import Submission, Assignment, Attachment, exercises @@ -240,8 +240,11 @@ def report_view(request): class ConfirmationAdmin(admin.ModelAdmin): - list_display = ('email', 'first_name', 'last_name', 'readable_contact', 'readable_age', 'confirmed') - readonly_fields = ('contact', 'readable_contact', 'readable_age', 'key', 'confirmed') + list_display = ('email', 'first_name', 'last_name', 'readable_contact', 'school_phone', 'readable_age', 'confirmed') + readonly_fields = ('contact', 'readable_contact', 'readable_age', 'school_phone', 'key', 'confirmed') + list_filter = ('confirmed',) + list_select_related = ('contact',) + search_fields = ('last_name', 'email', 'contact__contact') def resend_mail(self, request, queryset): for confirmation in queryset: @@ -253,3 +256,4 @@ class ConfirmationAdmin(admin.ModelAdmin): admin.site.register(Submission, SubmissionAdmin) admin.site.register(Assignment) admin.site.register(Confirmation, ConfirmationAdmin) +admin.site.register(CompetitionState)