1
0

forms.py 365 B

1234567891011121314
  1. from django import forms
  2. from webservice_running.models import OrdersLocal
  3. class OrderRegForm(forms.ModelForm):
  4. class Meta:
  5. model = OrdersLocal
  6. fields = '__all__'
  7. def __init__(self, *args, **kwargs):
  8. super().__init__(*args, **kwargs)
  9. for field in self.fields.values():
  10. field.widget.attrs['class'] = 'form-control'