Beispiel #1
0
    def __init__(self, *args, **kwargs):
        super(CategoryForm, self).__init__(*args, **kwargs)
        self.fields["image"].widget = LFSImageInput()

        try:
            context = kwargs["instance"]
        except KeyError:
            context = None
Beispiel #2
0
    def __init__(self, *args, **kwargs):
        super(CategoryForm, self).__init__(*args, **kwargs)
        self.fields["image"].widget = LFSImageInput()

        # If it is used as add form there is no instance.
        try:
            context = kwargs["instance"]
        except KeyError:
            context = None

        self.fields["parent"].choices = _category_choices(context)
Beispiel #3
0
 def __init__(self, *args, **kwargs):
     super(ShopDataForm, self).__init__(*args, **kwargs)
     self.fields["image"].widget = LFSImageInput()
Beispiel #4
0
 def __init__(self, *args, **kwargs):
     super(PaymentMethodForm, self).__init__(*args, **kwargs)
     self.fields["image"].widget = LFSImageInput()