from django.contrib import admin

from .models import WidgetUser, Department

class DepartmentAdmin(admin.ModelAdmin):
    model = Department
    search_fields = ['dept_name', 'home_unit']
    list_display = ('dept_name', 'home_unit')

class WidgetUserAdmin(admin.ModelAdmin):
    model = WidgetUser
    search_fields = ['first_name', 'middle_name', 'last_name', 'id_num', 'email', 'department', 'image']
    list_display = ('first_name', 'middle_name', 'last_name', 'id_num', 'email', 'department', 'image')

admin.site.register(Department, DepartmentAdmin)
admin.site.register(WidgetUser, WidgetUserAdmin)