Template
Extract always-on public/portal/UTM plus optional email_sms, directmail, blog, payments, social, and social_ai so new client sites can be bootstrapped from this seed. Refs #1 Refs #2 Co-authored-by: Cursor <cursoragent@cursor.com>
34 lines
821 B
Python
34 lines
821 B
Python
from django.contrib import admin
|
|
|
|
from contacts.models import ConsentRecord, Contact, Suppression
|
|
|
|
|
|
class ConsentInline(admin.TabularInline):
|
|
model = ConsentRecord
|
|
extra = 0
|
|
|
|
|
|
class SuppressionInline(admin.TabularInline):
|
|
model = Suppression
|
|
extra = 0
|
|
|
|
|
|
@admin.register(Contact)
|
|
class ContactAdmin(admin.ModelAdmin):
|
|
list_display = ("email", "first_name", "last_name", "phone", "source", "created_at")
|
|
search_fields = ("email", "first_name", "last_name", "phone")
|
|
list_filter = ("source",)
|
|
fields = (
|
|
"email",
|
|
"first_name",
|
|
"last_name",
|
|
"phone",
|
|
"postal_address",
|
|
"source",
|
|
"notes",
|
|
"created_at",
|
|
"updated_at",
|
|
)
|
|
readonly_fields = ("created_at", "updated_at")
|
|
inlines = [ConsentInline, SuppressionInline]
|