cmsmanage/paperwork/admin.py

33 lines
1.0 KiB
Python
Raw Normal View History

from django.contrib import admin
from .models import (CmsRedRiverVeteransScholarship, CertificationDefinition,
Certification, InstructorOrVendor, SpecialProgram, Waiver)
class CertificationDefinitionAdmin(admin.ModelAdmin):
search_fields = ['certification_name', 'department']
class CertificationAdmin(admin.ModelAdmin):
search_fields = ['name', 'certification__certification_name', 'certification__department']
class InstructorOrVendorAdmin(admin.ModelAdmin):
search_fields = ['name']
class SpecialProgramAdmin(admin.ModelAdmin):
search_fields = ['program_name']
class WaiverAdmin(admin.ModelAdmin):
search_fields = ['name']
admin.site.register(CmsRedRiverVeteransScholarship)
admin.site.register(CertificationDefinition, CertificationDefinitionAdmin)
admin.site.register(Certification, CertificationAdmin)
admin.site.register(InstructorOrVendor, InstructorOrVendorAdmin)
admin.site.register(SpecialProgram, SpecialProgramAdmin)
admin.site.register(Waiver, WaiverAdmin)