コード例 #1
0
 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(),
     }
コード例 #2
0
 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(),
     }
コード例 #3
0
 class Meta:
     model = ProductClass
     fields = [
         'name_ru', 'name_uk', 'requires_shipping', 'track_stock',
         'options', 'image'
     ]
     widgets = {
         'image': ImageInput(),
     }
コード例 #4
0
ファイル: forms.py プロジェクト: dimMoonlight/fropshop
 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(),
     }
コード例 #5
0
 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(),
     }