... されていない <select multiple> はHTMLフォームの送信データに現れないため、ユーザーが値を送信したかどうか不明だからです。 use_fieldset レンダリング時にウィジェットが <fieldset> と <legend> でグループ化されるべきかを識別するための属性です。デフォルトは False ... ボタンをループ処理します。ウィジェットとして RadioSelect を使用するフィールド beatles を持つフォーム myform を例にとると: < fieldset > < legend > {{ myform.beatles.label }} </ legend > {% for radio in myform.beatles %} < div class = "myradio" > {{ radio } ... } </ div > {% endfor %} </ fieldset > これにより、以下のHTMLが生成されます: < fieldset > < legend > Radio buttons </ legend > < div class = "myradio" > < labe ... ... ecting the connection on SQLite ( #36818 ). Fixed a visual regression in Django 6.0 for admin form fields grouped under a <fieldset> in Safari ( #36807 ). Fixed a crash in Django 6.0 caused by infinite recursion when calling repr() on an unevaluated djan ... defined using gettext_lazy() failed to resolve correctly ( #36796 ). Fixed a regression in Django 6.0 where the Widget.use_fieldset attribute of ClearableFileInput was flipped from False to True ( #36829 ). Reverted an undocumented optimization in Django ... ... abel > {{ field.legend_tag }} field.label_tag と似ていますが、 <label> の代わりに <legend> タグを使用します。複数の入力を <fieldset> でラップしたウィジェット用です。 {{ field.use_fieldset }} この属性は、フォームフィールドのウィジェットが複数の入力を含み、 ... アクセシビリティを向上させるために <fieldset> と <legend> で意味的にグループ化されるべき場合に True になります。テンプレートでの使用例: {% if field.use_fieldset %} < f ... _tag }}{% endif %} {% else %} {% if field.label %}{{ field.label_tag }}{% endif %} {% endif %} {{ field }} {% if field.use_fieldset %} </ fieldset > {% endif %} {{ field.value }} フィールドの値。例: someone@example.com For a complete list of attributes a ... ... ccessible navigation than the older templates, and are able to correctly group related controls, such as radio-lists, into fieldsets. The new templates are recommended, and will become the default form rendering style when outputting a form, like {{ form ... This new output style is recommended over the existing as_table() , as_p() and as_ul() styles, as the template implements <fieldset> and <legend> to group related inputs and is easier for screen reader users to navigate. The div-based output will become ... objects implement the __html__() method (typically when decorated with the html_safe() decorator). The new BoundField.use_fieldset and Widget.use_fieldset attributes help to identify widgets where its inputs should be grouped in a <fieldset> with a <leg ... ... deprecation warnings are emitted in environments importing Django by namespace ( #36961 ). Fixed a visual regression where fieldset legends were misaligned in the admin ( #36920 ). Prevented the django.tasks.signals.task_finished signal from writing extr ... ... er elements contained long text ( #36850 ). Fixed a visual regression in Django 6.0 for admin form fields grouped under a <fieldset> aligned horizontally ( #36788 ). Fixed a regression in Django 6.0 where auto_now_add field values were not populated duri ... ... 7 ). Fixed a regression in Django 6.0 in admin forms where RelatedFieldWidgetWrapper incorrectly wrapped all widgets in a <fieldset> ( #36949 ). Fixed a bug in Django 6.0 where the fields.E348 system check did not detect name clashes between model manage ... ... ls/templates/polls/detail.html < form action = " {% url 'polls:vote' question.id %} " method = "post" > {% csrf_token %} < fieldset > < legend >< h1 > {{ question.question_text }} </ h1 ></ legend > {% if error_message %} < p >< strong > {{ error_message ... hoice.id }} " > < label for = "choice {{ forloop .counter }} " > {{ choice.choice_text }} </ label >< br > {% endfor %} </ fieldset > < input type = "submit" value = "Vote" > </ form > 簡単に説明: 上のテンプレートは、各質問の選択肢のラジオボタンを表示する ... ... ルのうち、デフォルトの as_div() は as_p() , as_table() , as_ul() バージョンよりも推奨されます。なぜなら、このテンプレートは <fieldset> と <legend> を実装しており、関連する入力をグループ化し、スクリーンリーダーユーザがナビゲートしやすいからです。 各ヘルパー ... が使用されます。ウィジェット定義時にカスタムの aria-describedby を指定すると、デフォルト値が上書きされます。 ウィジェットが <fieldset> 内でレンダリングされる場合は、 aria-describedby はその要素に追加されます。そうでない場合は、 aria-describedby はウィジェッ ... トの名前。 指定されていれば template_name の値を、そうでなければ field_template_name の値を返すプロパティ。 BoundField. use_fieldset [ソース] この BoundField ウィジェットの use_fieldset 属性の値を返します。 BoundField. widget_type [ソース] ラップされたフィ ... ... は ModelAdmin.readonly_fields で定義される値を持つことができ、読み取り専用で表示されます。 より複雑なレイアウトを作るには、 fieldsets オプションを参照してください。 fields オプションは、 list_display と同じタイプの値を受け付けますが、呼び出し可能オブジェク ... ドは次の行に表示されます: class FlatPageAdmin ( admin . ModelAdmin ): fields = [( "url" , "title" ), "content" ] ModelAdmin.fieldsets オプションとの混同の可能性 この fields オプションと、次のセクションで説明する fieldsets における fields ディクショナリキー ... は別物です。 fields オプションも fieldsets オプションも指定されない場合、 Django はデフォルトで次のように表示します。 AutoField ではなく、かつ editable=True が設定さ ... 2026年10月08日