|
@@ -2,4 +2,11 @@ from django.contrib import admin
|
|
|
from .models import Staff
|
|
|
|
|
|
|
|
|
-admin.site.register(Staff)
|
|
|
+class StaffAdmin(admin.ModelAdmin):
|
|
|
+ list_display = ('name', 'department', 'location', 'total_units')
|
|
|
+ list_filter = ('location', 'department',)
|
|
|
+ ordering = ['-total_units']
|
|
|
+ search_fields = ['department', 'name', 'location']
|
|
|
+
|
|
|
+
|
|
|
+admin.site.register(Staff, StaffAdmin)
|