Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は現在、クリスピーフォームを使用してdjangoでwebappを構築しています.フィールド名の文字列のリストを使用してフォームのレイアウトを作成する方法はありますか? ありがとうございました。
次のようなことができます。
list_of_field_names = ['field1', 'field2'] self.helper = FormHelper() self.helper.layout = Layout( Fieldset( 'first arg is the legend of the fieldset', *list_of_field_names ), ... )