コード例 #1
0
 class Meta:
     model = Product
     fields = (
         "accounting_identifier",
         "barcode",
         "cost_center",
         "depth",
         "gross_weight",
         "gtin",
         "height",
         "manufacturer",
         "net_weight",
         "profit_center",
         "sales_unit",
         "shipping_mode",
         "sku",
         "tax_class",
         "type",
         "width",
         # I18n
         "description",
         "short_description",
         "keywords",
         "name",
         "slug",
         "variation_name",
     )
     widgets = {
         "keywords": forms.TextInput(),
         "sales_unit": QuickAddSalesUnitSelect(editable_model="shuup.SalesUnit"),
         "tax_class": QuickAddTaxClassSelect(editable_model="shuup.TaxClass"),
         "description": TextEditorWidget(),
         "short_description": forms.TextInput(),
     }
コード例 #2
0
ファイル: base_forms.py プロジェクト: leahdonpaul/shuup
 class Meta:
     model = Product
     fields = (
         "accounting_identifier",
         "barcode",
         "cost_center",
         "depth",
         "gross_weight",
         "gtin",
         "height",
         "manufacturer",
         "net_weight",
         "profit_center",
         "sales_unit",
         "shipping_mode",
         "sku",
         "tax_class",
         "type",
         "width",
         # I18n
         "description",
         "short_description",
         "keywords",
         "name",
         "slug",
         "variation_name",
     )
     widgets = {
         "keywords":
         forms.TextInput(),
         "sales_unit":
         QuickAddSalesUnitSelect(editable_model="shuup.SalesUnit"),
         "tax_class":
         QuickAddTaxClassSelect(editable_model="shuup.TaxClass"),
         "description":
         (TextEditorWidget()
          if settings.SHUUP_ADMIN_ALLOW_HTML_IN_PRODUCT_DESCRIPTION else
          forms.Textarea(attrs={"rows": 5})),
         "short_description":
         forms.TextInput(),
     }