... されました。 QuerySet.aiterator() が以前の prefetch_related() 呼び出しをサポートするようになりました。 MariaDB 10.7 以降で、 UUIDField は CHAR(32) ではなく UUID カラムとして作成されます。詳細は、 MariaDB 10.7+ における既存の UUIDField のマイグレーション のマ ... 前のフィールドを持つモデルは、ルックアップで create_defaults__exact を指定する必要があります。 MariaDB 10.7+ における既存の UUIDField のマイグレーション MariaDB 10.7以降では、 UUIDField は CHAR(32) カラムではなく UUID カラムとして作成されるようになりました ... 。その結果、Django < 5.0で作成された任意の UUIDField は、 CHAR(32) に基づく UUIDField サブクラスに置き換える必要があります: class Char32UUIDField ( models . UUIDField ): def d ... ... has a self-referential foreign key ( #24748 ). Implemented ForeignKey.get_db_prep_value() so that ForeignKey s pointing to UUIDField and inheritance on models with UUIDField primary keys work correctly ( #24698 , #24712 ). Fixed isnull lookup for HStoreFi ... ... widget to add a space after custom classes ( #29221 ). Fixed PasswordResetConfirmView crash when using a user model with a UUIDField primary key and the reset URL contains an encoded primary key value that decodes to an invalid UUID ( #29206 ). Fixed a re ... ... , including when SESSION_SAVE_EVERY_REQUEST is active. バグ修正 Added the ability to serialize values from the newly added UUIDField ( #25019 ). Added a system check warning if the old TEMPLATE_* settings are defined in addition to the new TEMPLATES setti ... ... れ、これがユニーク制約に違反するためです。 そのため、次の手順を踏む必要があります。この例では、デフォルト値を持つ非 Null の UUIDField を追加します。必要に応じて、該当するフィールドを変更してください。 モデルに default=uuid.uuid4 と unique=True 引数を持つフ ... ulate_uuid_values" ), ] operations = [ migrations . AlterField ( model_name = "mymodel" , name = "uuid" , field = models . UUIDField ( default = uuid . uuid4 , unique = True ), ), ] 最初の移行ファイルを編集します。 生成された移行クラスは次のようになります ... _auto_20150129_1705" ), ] operations = [ migrations . AddField ( model_name = "mymodel" , name = "uuid" , field = models . UUIDField ( default = uuid . uuid4 , unique = True ), ), ] unique=True を null=True に変更してください。これは、一時的にNULLフィール ... ... e on Python 3 by fixing the false positive system check ( #25016 ). Fixed inline forms that use a parent object that has a UUIDField primary key and a child object that has an AutoField primary key ( #24958 ). Fixed a regression in the unordered_list temp ... ... スと同じく、 URLField は省略可能な max_length 引数を取ります。 max_length を指定しない場合、デフォルトの 200 が使われます。 UUIDField class UUIDField ( ** options ) [ソース] A field for storing universally unique identifiers. Uses Python's UUID class. When ... ult を使うことが推奨されます: import uuid from django.db import models class MyUUIDModel ( models . Model ): id = models . UUIDField ( primary_key = True , default = uuid . uuid4 , editable = False ) # other fields UUID のインスタンスではなく、呼び出し可能 ... ... ery must specify js=['admin/js/jquery.init.js', ...] when declaring form media assets . その他 To improve readability, the UUIDField form field now displays values with dashes, e.g. 550e8400-e29b-41d4-a716-446655440000 instead of 550e8400e29b41d4a71644665 ... ... 。 SmallIntegerField IntegerField TextField CharField で widget=forms.Textarea です。 TimeField TimeField URLField URLField UUIDField UUIDField お気付きかもしれませんが、 ForeignKey と ManyToManyField の 2 つのモデルフィールドは特殊なケースとなります: Fore ... ... if assume_scheme is "https" and the provided value is "example.com" , the normalized value will be "https://example.com" . UUIDField class UUIDField ( ** kwargs ) [ソース] デフォルトのウィジェット: TextInput 空の値: None 正規化後の値: UUID オブジェクトに正 ... 2026年10月08日