fix customer view and edit
This commit is contained in:
1 parent
81335b1439
commit
d5c22a39dc
13 files changed
+329
-81
No files matched your search
+17
-1
@@ -1,5 +1,5 @@
|
||||
from django.contrib import admin
|
||||
from .models import ContactGroup, CustomerProfile
|
||||
from .models import ContactEditLog, ContactGroup, CustomerProfile
|
||||
|
||||
|
||||
@admin.register(ContactGroup)
|
||||
@@ -15,3 +15,19 @@ class CustomerProfileAdmin(admin.ModelAdmin):
|
||||
list_filter = ("stakeholder_type", "groups")
|
||||
search_fields = ("user__mobile", "organization_name", "first_name", "last_name")
|
||||
filter_horizontal = ("groups",)
|
||||
|
||||
|
||||
@admin.register(ContactEditLog)
|
||||
class ContactEditLogAdmin(admin.ModelAdmin):
|
||||
list_display = ("contact_public_id", "actor_name", "created_at")
|
||||
search_fields = ("actor_name", "contact_public_id")
|
||||
readonly_fields = ("contact", "contact_public_id", "actor", "actor_name", "changes", "created_at")
|
||||
|
||||
def has_add_permission(self, request):
|
||||
return False
|
||||
|
||||
def has_change_permission(self, request, obj=None):
|
||||
return False
|
||||
|
||||
def has_delete_permission(self, request, obj=None):
|
||||
return False
|
||||
Reference in new issue
Block a user