... ttributes 必要な属性は、まず model と、それから fields または exclude のいずれかです。その他の Meta 属性の設定は任意です。 localized_fields と formfield_callback を除く設定任意の属性には、モデルフィールド名をキーとしてそれぞれの値に対応づけた辞書型を指定し ... 。 指定されていないフィールドについては、 Django はモデルフィールドの verbose_name 、ついでフィールドの属性名を適用します。 localized_fields ModelFormOptions. localized_fields ローカライズする model のフィールド名のタプルまたはリスト。値を '__all__' にする ... delform_factory ( model , form = ModelForm , fields = None , exclude = None , formfield_callback = None , widgets = None , localized_fields = None , labels = None , help_texts = None , error_messages = None , field_classes = None ) [ソース] 与えられた mod ... ... ルトでは、 ModelForm 内のフィールドはデータをローカライズしません。フィールドのデータをローカライズするには、 Meta クラスの localized_fields 属性が使用できます。 >>> from django.forms import ModelForm >>> from myapp.models import Author >>> class AuthorFor ... m ( ModelForm ): ... class Meta : ... model = Author ... localized_fields = [ 'birth_date' ] localized_fields が特殊な値 '__all__' にセットされた場合、全てのフィールドがローカライズされます ... ... 特定のフィールドのローカライズを有効にすることもできます: >>> Form = modelform_factory ( Author , form = AuthorForm , localized_fields = [ "birth_date" ]) モデルのフォームセット class models. BaseModelFormSet 通常のフォームセット のように、 Django は ... ... om_data() . Fixed a crash in runserver logging during a "Broken pipe" error ( #27271 ). Fixed a regression where unchanged localized date/time fields were listed as changed in the admin's model history messages ( #27302 ). ... ... ge is accessed directly) ( #28229 ). Prevented attribute values in the django/forms/widgets/attrs.html template from being localized so that numeric attributes (e.g. max and min ) of NumberInput work correctly ( #28303 ). Removed casting of the option val ... ... ). Omitted pages_per_range from BrinIndex.deconstruct() if it's None ( #25809 ). Fixed a regression where SelectDateWidget localized the years in the select box ( #28530 ). Fixed a regression in 1.11.4 where runserver crashed with non-Unicode system encod ... ... ble in HTML5 ( type='email' , type='url' , type='number' ). Note that due to erratic support of the number input type with localized numbers in current browsers, Django only uses it when numeric fields are not localized. The number argument for lazy plura ... ルして、 その後 Pillow をインストールする必要があります。 ModelForm accepts several new Meta options. Fields included in the localized_fields list will be localized (by setting localize on the form field). The labels , help_texts and error_messages options ... ... #28091 ). Fixed a regression where CheckboxSelectMultiple , NullBooleanSelect , RadioSelect , SelectMultiple , and Select localized option values ( #28075 ). Corrected the stack level of unordered queryset pagination warnings ( #28109 ). Fixed a regressi ... ... ate template from Django 3.2. The floatformat template filter no longer depends on the USE_L10N setting and always returns localized output. Use the u suffix to disable localization. The default value of the USE_L10N setting is changed to True . See the L ... 10N is deprecated as of this release. Starting with Django 5.0, by default, any date or number displayed by Django will be localized. The {% localize %} tag and the localize / unlocalize filters will still be honored by Django. その他 SERIALIZE test setti ... ... on, and data formats that are not included in Django itself, consider using the django-localflavor package, which provides localized form fields and utilities for many countries and regions ( documentation ). テンプレート内でローカライズをコントロールする ... ... %} ... unescaped template content here ... {% endautoescape %} Less-common changes The following changes are smaller, more localized changes. They should only affect more advanced users, but it's probably worth reading through the list and checking your c ... 2026年10月08日