from django import forms
from .models import Bill


class BillForm(forms.ModelForm):
    def __init__(self, *args, **kwargs):
        super(BillForm, self).__init__(*args, **kwargs)
        for visible in self.visible_fields():
            visible.field.widget.attrs['class'] = 'form-control'
            due = forms.DateField(label='Due Date', widget=forms.DateInput(
                attrs={'class': 'form-control'}))

    class Meta:
        model = Bill
        fields = '__all__'
