From 9f9fbf949bc5e6173452036e9174cb99e2d09d95 Mon Sep 17 00:00:00 2001 From: Mallory Hancock Date: Sat, 19 Jan 2019 11:17:19 -0800 Subject: [PATCH] add in readonly field to admin form --- ttadmin/help/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ttadmin/help/admin.py b/ttadmin/help/admin.py index c9697f8..e29cc6b 100644 --- a/ttadmin/help/admin.py +++ b/ttadmin/help/admin.py @@ -3,6 +3,7 @@ from .models import Ticket @admin.register(Ticket) class TicketAdmin(admin.ModelAdmin): + readonly_fields = ('submitted',) list_display = ('submitted', 'issue_status', 'issue_type', 'name', 'email') list_filter = ('issue_status', 'issue_type') - fields = ('name', 'email', 'issue_status', 'issue_type', 'issue_text') + fields = ('submitted', 'name', 'email', 'issue_status', 'issue_type', 'issue_text')