Django {% crispy %} tag vs {{ form|crispy }} filter what's the difference?
我正在设法将背景包裹在脆皮形式中。
当我将标记
当我将标记
我正试图弄清楚如何获得一个漂亮的布局并具有功能性的HTML表单。
我知道了,
您必须将POST按钮添加到模型/表单中的Python帮助程序中,以使
我最初在HTML
1 2 3 4 5 6 7 8 9 10 11 | class ProfileUpdateForm(forms.ModelForm): class Meta: model = Profile def __init__(self, *args, **kwargs): super(ProfileUpdateForm, self).__init__(*args, **kwargs) self.helper = FormHelper(self) self.helper.layout = Layout(AppendedText('foo','bar') self.helper = FormHelper(self) self.helper.add_input(Submit('submit', 'Submit', css_class='btn-primary')) self.helper.form_method = 'POST' |