from django import forms
from . import models
class UserInfoModelForms(forms.ModelForm):
class Meta:
model = models.UserInfo
fields = "__all__"
def __init__(self,*args,**kwargs):
super(UserInfoModelForms, self).__init__(*args,**kwargs)
for name,field in self.fields.items():
field.widget.attrs['class'] = 'form-control'