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
class ConfirmationAdmin(admin.ModelAdmin):
- list_display = ('email', 'first_name', 'last_name', 'confirmed')
- readonly_fields = ('contact', 'readable_contact', '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:
admin.site.register(Submission, SubmissionAdmin)
admin.site.register(Assignment)
admin.site.register(Confirmation, ConfirmationAdmin)
+admin.site.register(CompetitionState)