Add 'bot_banner' field to ProductModel and create BotProductDetailView for bot integration
This commit is contained in:
@@ -191,14 +191,14 @@ class ProductModelAdmin(ModelAdmin, ImportExportModelAdmin):
|
||||
inlines = [ProductVariantInLine]
|
||||
readonly_fields = ('slug', 'created_at')
|
||||
search_fields = ['name', 'description', ]
|
||||
list_filter = ['show', 'category']
|
||||
list_filter = ['show', 'category', 'show_in_bot']
|
||||
autocomplete_fields = ['related_products', 'shop']
|
||||
# compressed_fields = True
|
||||
warn_unsaved_form = True
|
||||
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', 'show_in_bot'), "classes": ["tab"],}),
|
||||
('فیلد های اصلی', {'fields': ('name', 'description', 'category', 'related_products', 'show', 'shop', 'show_in_bot', 'bot_banner'), "classes": ["tab"],}),
|
||||
('فیلد های سيو', {'fields': ('meta_description', 'meta_keywords', 'meta_rating', 'slug'), "classes": ["tab"],}),
|
||||
('فیلد های مربوط به کاربر', {'fields': ('rating', 'view',), "classes": ["tab"],}),
|
||||
# ('فیلد های ایتم های پک', {'fields': ('in_pack_items', ), "classes": ["tab"],})
|
||||
|
||||
Reference in New Issue
Block a user