How to remove All from labels in case of hidden or modified form fields
I have this form:
class Invoice_billing_F(forms.ModelForm):
Unites = forms.DecimalField(required =False, label=False)
class Meta:
model= Invoice_billing
fields=('Item_Ctra','Unites','Discu')
how to delete this?
I found the solution to this issue.
The solution
class Invoice_billing_F(forms.ModelForm):
Unites = forms.DecimalField(required =False, label=False)
class Meta:
model= Invoice_billing
fields=('Item_Ctra','Unites','Discu')
def __init__(self, *args, **kwargs):
super(Invoice_billing_F, self).__init__(*args, **kwargs)
self.fields['Discu'].label = ""