예제 #1
0
 def __init__(self, *args, **kwargs):
     super(ProductDataForm, self).__init__(*args, **kwargs)
     self.fields["template"].widget = SelectImage(choices=PRODUCT_TEMPLATES)
     self.fields["active_base_price"].widget = LFSCheckboxInput(check_test=lambda v: v != 0)
     man_count = Manufacturer.objects.count()
     if man_count > getattr(settings, 'LFS_SELECT_LIMIT', 20):
         self.fields["manufacturer"].widget = HiddenInput()
예제 #2
0
 def __init__(self, *args, **kwargs):
     super(VariantDataForm, self).__init__(*args, **kwargs)
     self.fields["template"].widget = SelectImage(choices=PRODUCT_TEMPLATES)
예제 #3
0
파일: view.py 프로젝트: Rishfact/website-1
 def __init__(self, *args, **kwargs):
     super(ViewForm, self).__init__(*args, **kwargs)
     self.fields["template"].widget = SelectImage(
         choices=CATEGORY_TEMPLATES)