Darkolius

Untitled

May 18th, 2021
581
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Test(forms.ModelForm):
  2.     pole1 = forms.CharField()
  3.  
  4.     class Meta:
  5.         model = User
  6.         fields = ('pole1',)
  7.  
  8.     # def __init__(self, *args, **kwargs):
  9.     #     super().__init__(*args, **kwargs)
  10.     helper = FormHelper()
  11.     helper.form_class = 'form-horizontal col-md-6  m-auto'
  12.     helper.field_class = ''
  13.     helper.label_class = ''
  14.  
  15.     helper.layout = Layout(
  16.         Row(
  17.             Column(
  18.                 # Field('pole1', style='margin-left:200px'),
  19.                 Field('pole1', css_class='form-group m-auto'),
  20.             )
  21.         )
  22.     )
RAW Paste Data