contact us model view and admin functionality

This commit is contained in:
Parsa Nazer
2025-04-22 02:41:11 +03:30
parent a195017f80
commit c84e5150f8
12 changed files with 154 additions and 9 deletions
+9
View File
@@ -18,6 +18,15 @@ class MessageInline(TabularInline):
model = Message
extra = 1
@admin.register(ContactUsModel)
class ContactUsAdmin(ModelAdmin):
list_filter = ['type', 'is_reviewed']
list_display = ['full_name', 'phone', 'email', 'message', 'is_reviewed']
compressed_fields = True
warn_unsaved_form = True
readonly_fields = ['full_name', 'email', 'phone', 'type', 'message', ]
@admin.register(Ticket)
class TicketAdmin(ModelAdmin, ImportExportModelAdmin):
import_form_class = ImportForm