admin.py 782 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
from django.contrib import admin

from .models import (
    CourseCertification,
    CertificateTemplate,
    CertificationProcess,
    Evaluation,
)

10 11 12 13 14 15 16 17 18 19 20 21 22 23
@admin.register(CertificateTemplate)
class CertificateTemplateAdmin(admin.ModelAdmin):
    list_display = ('course', 'document_type', 'workspace')


@admin.register(CourseCertification)
class CourseCertificationAdmin(admin.ModelAdmin):
    list_display = ('course_student', 'type', 'link_hash', 'created_date', 'modified_date')
    autocomplete_fields = (
        'course_student',
    )
    search_fields = (
        'link_hash',
        'course_student__user__name',
24
        'course_student__user__email',
25 26 27
        'course_student__user__username',
    )

28 29
admin.site.register(CertificationProcess)
admin.site.register(Evaluation)