from django.contrib import admin from .models import (CmsRedRiverVeteransScholarship, CertificationDefinition, Certification, CertificationVersion, InstructorOrVendor, SpecialProgram, Waiver) class CertificationVersionInline(admin.TabularInline): model = CertificationVersion extra = 1 @admin.register(CertificationVersion) class CertificationVersionAdmin(admin.ModelAdmin): search_fields = ['definition__certification_name', 'version'] @admin.register(CertificationDefinition) class CertificationDefinitionAdmin(admin.ModelAdmin): search_fields = ['certification_name', 'department'] inlines = [CertificationVersionInline] @admin.register(Certification) class CertificationAdmin(admin.ModelAdmin): search_fields = ['name', 'certification__certification_name', 'certification__department'] autocomplete_fields = ['member'] @admin.register(InstructorOrVendor) class InstructorOrVendorAdmin(admin.ModelAdmin): search_fields = ['name'] @admin.register(SpecialProgram) class SpecialProgramAdmin(admin.ModelAdmin): search_fields = ['program_name'] @admin.register(Waiver) class WaiverAdmin(admin.ModelAdmin): search_fields = ['name'] admin.site.register(CmsRedRiverVeteransScholarship)