remove unnesscery redirect and and new admin view size

This commit is contained in:
Parsa Nazer
2025-02-05 01:56:51 +03:30
parent 8700fde8a4
commit 1ca41acf96
4 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -85,5 +85,5 @@ class AddressAdmin(ModelAdmin, ImportExportModelAdmin):
} }
} }
def address_display(self, obj): def address_display(self, obj):
return obj.address[0:20] return obj.address[0:35] + '...'
address_display.short_description = 'ادرس' address_display.short_description = 'ادرس'
-2
View File
@@ -11,8 +11,6 @@ from order.models import OrderModel
from ticket.models import Ticket from ticket.models import Ticket
class HomeView(RedirectView):
pattern_name = "admin:index"
+1 -1
View File
@@ -172,7 +172,7 @@ class CommentAdmin(ModelAdmin, ImportExportModelAdmin):
} }
} }
def display_content(self, obj): def display_content(self, obj):
return obj.content[0:20] + '...' return obj.content[0:35] + '...'
display_content.short_description = 'محتوای کامنت' display_content.short_description = 'محتوای کامنت'
@admin.register(DollorModel) @admin.register(DollorModel)
+1 -1
View File
@@ -49,5 +49,5 @@ class MessageAdmin(ModelAdmin, ImportExportModelAdmin):
} }
} }
def content_display(self, obj): def content_display(self, obj):
return obj.content[0:20] + '...' return obj.content[0:35] + '...'
content_display.short_description = 'محتوای پیام' content_display.short_description = 'محتوای پیام'