add in readonly field to admin form

feature/enhanced-ticket-view
Mallory Hancock 2019-01-19 11:17:19 -08:00
parent 3879017dd1
commit 9f9fbf949b
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ from .models import Ticket
@admin.register(Ticket) @admin.register(Ticket)
class TicketAdmin(admin.ModelAdmin): class TicketAdmin(admin.ModelAdmin):
readonly_fields = ('submitted',)
list_display = ('submitted', 'issue_status', 'issue_type', 'name', 'email') list_display = ('submitted', 'issue_status', 'issue_type', 'name', 'email')
list_filter = ('issue_status', 'issue_type') 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')