class Meta: model = ProductImage fields = ['product', 'original', 'caption'] # use ImageInput widget to create HTML displaying the # actual uploaded image and providing the upload dialog # when clicking on the actual image. widgets = { 'original': ImageInput(), }
class Meta: model = ProductImage exclude = ('display_order', ) # use ImageInput widget to create HTML displaying the # actual uploaded image and providing the upload dialog # when clicking on the actual image. widgets = { 'original': ImageInput(), }
class Meta: model = ProductClass fields = [ 'name_ru', 'name_uk', 'requires_shipping', 'track_stock', 'options', 'image' ] widgets = { 'image': ImageInput(), }
class Meta: model = ProductImage fields = ['product', 'original', 'caption'] # use ImageInput widget to create HTML displaying the # actual uploaded image and providing the upload dialog # when clicking on the actual image. # 使用ImageInput小部件创建HTML,显示实际上传的图像,并在单击实际图像时提供上载对话框。 widgets = { 'original': ImageInput(), }
class Meta: model = ExtraImage fields = [ 'product', 'image', ] # use ImageInput widget to create HTML displaying the # actual uploaded image and providing the upload dialog # when clicking on the actual image. widgets = { 'image': ImageInput(), }