attachment delete route and added the attachment updaloed by fields

This commit is contained in:
Parsa Nazer
2025-02-23 22:06:06 +03:30
parent 21094fa880
commit 72b50e6051
5 changed files with 46 additions and 16 deletions
+5 -1
View File
@@ -58,4 +58,8 @@ class MessageAdmin(ModelAdmin, ImportExportModelAdmin):
}
def content_display(self, obj):
return obj.content[0:35] + '...'
content_display.short_description = 'محتوای پیام'
content_display.short_description = 'محتوای پیام'
@admin.register(Attachment)
class AttachmentAdmin(ModelAdmin, ImportExportModelAdmin):
list_display = ['name', 'uploaded_by']