-
Notifications
You must be signed in to change notification settings - Fork 1
/
admin.py
executable file
·40 lines (35 loc) · 1.09 KB
/
admin.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from django.contrib import admin
from .models import Person, Department, Organization, Role
# customize the individual model views:
@admin.register(Person)
class PersonAdmin(admin.ModelAdmin):
list_display = ('preferred_name',
'first_name',
'last_name',
'cwid',
'email_primary',
)
search_fields = ('preferred_name',
'first_name',
'last_name',
'cwid',
)
@admin.register(Department)
class DeptAdmin(admin.ModelAdmin):
list_display = ('name',
)
search_fields = ('name',
)
@admin.register(Organization)
class OrgAdmin(admin.ModelAdmin):
list_display = ('short_name',
'name'
)
search_fields = ('name',
)
@admin.register(Role)
class RoleAdmin(admin.ModelAdmin):
list_display = ('name',
)
search_fields = ('name',
)