18 lines
652 B
Python
18 lines
652 B
Python
from django.contrib import admin
|
|
from .models import ContactGroup, CustomerProfile
|
|
|
|
|
|
@admin.register(ContactGroup)
|
|
class ContactGroupAdmin(admin.ModelAdmin):
|
|
list_display = ("name", "unit", "is_active", "updated_at")
|
|
list_filter = ("unit", "is_active")
|
|
search_fields = ("name", "description")
|
|
|
|
|
|
@admin.register(CustomerProfile)
|
|
class CustomerProfileAdmin(admin.ModelAdmin):
|
|
list_display = ("user", "stakeholder_type", "organization_name", "first_name", "last_name")
|
|
list_filter = ("stakeholder_type", "groups")
|
|
search_fields = ("user__mobile", "organization_name", "first_name", "last_name")
|
|
filter_horizontal = ("groups",)
|