Add 'show_in_bot' field to ProductModel and implement BotProductsView for bot integration

This commit is contained in:
Parsa Nazer
2025-08-04 23:18:30 +03:30
parent d0dfa3eaa7
commit d9b6655ee8
6 changed files with 62 additions and 3 deletions
+1 -1
View File
@@ -198,7 +198,7 @@ class ProductModelAdmin(ModelAdmin, ImportExportModelAdmin):
actions_list = ['redirect_to_learn', 'update_products_price']
list_display = ['display_image', 'display_price', 'view', 'show', 'rating', 'category', 'created_at']
fieldsets = (
('فیلد های اصلی', {'fields': ('name', 'description', 'category', 'related_products', 'show', 'shop'), "classes": ["tab"],}),
('فیلد های اصلی', {'fields': ('name', 'description', 'category', 'related_products', 'show', 'shop', 'show_in_bot'), "classes": ["tab"],}),
('فیلد های سيو', {'fields': ('meta_description', 'meta_keywords', 'meta_rating', 'slug'), "classes": ["tab"],}),
('فیلد های مربوط به کاربر', {'fields': ('rating', 'view',), "classes": ["tab"],}),
# ('فیلد های ایتم های پک', {'fields': ('in_pack_items', ), "classes": ["tab"],})