first commit

This commit is contained in:
2026-08-03 14:42:40 +08:00
commit 523ad43ef7
85 changed files with 3703 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
from django.contrib import admin
from .models import ContactMessage
@admin.register(ContactMessage)
class ContactMessageAdmin(admin.ModelAdmin):
list_display = ('name', 'company', 'phone', 'email', 'subject', 'is_read', 'created_at')
list_filter = ('is_read', 'created_at')
list_editable = ('is_read',)
search_fields = ('name', 'company', 'phone', 'email', 'subject', 'message')
date_hierarchy = 'created_at'
readonly_fields = ('name', 'company', 'phone', 'email', 'subject', 'message', 'ip_address', 'created_at')
fieldsets = (
('留言信息', {
'fields': ('name', 'company', 'phone', 'email', 'subject', 'message')
}),
('系统信息', {
'fields': ('ip_address', 'created_at', 'is_read')
}),
)
def has_add_permission(self, request):
return False