ticket model verbose name and admin pannel display list
This commit is contained in:
@@ -25,6 +25,7 @@ class TicketAdmin(ModelAdmin, ImportExportModelAdmin):
|
||||
"widget": ArrayWidget,
|
||||
}
|
||||
}
|
||||
list_display = ['subject', 'customer', 'admin', 'status', 'admin', 'status', 'created_at']
|
||||
inlines = [MessageInline]
|
||||
radio_fields = {'status': admin.VERTICAL}
|
||||
|
||||
@@ -32,7 +33,7 @@ class TicketAdmin(ModelAdmin, ImportExportModelAdmin):
|
||||
class MessageAdmin(ModelAdmin, ImportExportModelAdmin):
|
||||
import_form_class = ImportForm
|
||||
export_form_class = ExportForm
|
||||
|
||||
list_display = ['ticket', 'sender', 'content_display','created_at']
|
||||
|
||||
compressed_fields = True
|
||||
warn_unsaved_form = True
|
||||
@@ -44,4 +45,7 @@ class MessageAdmin(ModelAdmin, ImportExportModelAdmin):
|
||||
ArrayField: {
|
||||
"widget": ArrayWidget,
|
||||
}
|
||||
}
|
||||
}
|
||||
def content_display(self, obj):
|
||||
return obj.content[0:20] + '...'
|
||||
content_display.short_description = 'محتوای پیام'
|
||||
Reference in New Issue
Block a user