Форум сайта python.su
Привет! Как отобразить Crispy - форму в виде таблицы? В доках the built-in methods: as_table, as_ul and as_p. You cannot tune up the output.
Офлайн
class FormAdd(forms.Form): def __init__(self, *args, **kwargs): super(FormAdd, self).__init__(*args, **kwargs) self.helper = FormHelper() self.helper.help_text_inline = True self.helper.html5_required = True self.helper.form_class = 'form-horizontal' self.helper.form_action = reverse('YOUR_URL_HERE') self.helper.form_method = 'post' self.helper.label_class = 'col-sm-2' self.helper.field_class = 'col-sm-4' button = Button('send_button', 'Отправить') button.input_type = 'submit' button.field_classes = 'btn btn-success form-control' self.helper.add_input(button)
Офлайн