... defining the natural_key() method can now opt out of natural key serialization by overriding the method to return an empty tuple: () . This ensures primary keys are serialized when using dumpdata --natural-primary . The XML deserializer now raises Sus ... de this method to simply return the value. The DatabaseIntrospection.get_relations() should now return a dictionary with 3-tuples containing ( field_name_other_table , other_table , db_on_delete ) as values. db_on_delete is one of the database-level d ... ary_placeholder_sql() method now expects a query compiler as an extra positional argument and should return a two-elements tuple composed of an SQL format string and a tuple of associated parameters. The BaseSpatialOperations.get_geom_placeholder() me ... ... it to be merged after the stable branch is cut. The following items should be addressed in this branch: Update the VERSION tuple in django/__init__.py , incrementing to the next expected release ( example commit ). Create a stub release note for the n ... ecurity commit ). Update the version number in django/__init__.py for the release. Please see notes on setting the VERSION tuple below for details on VERSION ( example commit ). If this is a pre-release package also update the "Development Status" tro ... blog post. Post-release You're almost done! All that's left to do now is: If this is not a pre-release, update the VERSION tuple in django/__init__.py again, incrementing to whatever the next expected release will be. For example, after releasing 4.1. ... ... o_field = 'django.db.models.AutoField' to an app's AppConfig , as needed. Custom ORM expressions should return params as a tuple Prior to Django 6.0, custom lookups and custom expressions implementing the as_sql() method (and its supporting methods pr ... ocess_lhs() and process_rhs() ) were allowed to return a sequence of params in either a list or a tuple. To address the interoperability problems that resulted, the second return element of the as_sql() method should now be a ... tuple: def as_sql ( self , compiler , connection ) -> tuple [ str , tuple ]: ... If your custom expressions support multiple versions of Django, you should adjust any pre-processing ... ... QL 14+. The new default_bounds attribute of DateTimeRangeField and DecimalRangeField allows specifying bounds for list and tuple inputs. ExclusionConstraint now allows specifying operator classes with the OpClass() expression. django.contrib.sitemaps ... cify the minimum required version of the database using the DatabaseFeatures.minimum_database_version attribute which is a tuple (e.g. (10, 0) means "10.0"). If a minimum version is specified, backends must also implement DatabaseWrapper.get_database_ ... version() , which returns a tuple of the current database version. The backend's DatabaseWrapper.init_connection_state() method must call super() in order f ... ... と同じルールが適用されます: 呼び出し可能オブジェクトは readonly_fields 内でリスト化される必要があります。 classes A list or tuple containing extra CSS classes to apply to the fieldset. This can include any custom CSS class defined in the project, as we ... elated() メソッドを実装できます。 バージョン 6.1 で非推奨: Using True for list_select_related is deprecated. Use a list or tuple of field names instead. 注釈 ModelAdmin は select_related() がチェンジリストの QuerySet で既に呼び出されていた場合、この属 ... . readonly_fields デフォルトでは、すべてのフィールドが編集可能となっています。このオプションに含まれるフィールド ( list か tuple で指定します) は、データをそのまま表示するだけで編集できなくなります。また、追加と編集に使われる ModelForm からも除外されま ... ... ... れにより、Django はテーブル作成時に複合主キー( PRIMARY KEY (product_id, order_id) )を作成するようになります。 複合主キーは tuple (タプル)で表現されます: >>> product = Product . objects . create ( name = "apple" ) >>> order = Order . objects . create ... OrderLineItem . objects . create ( product = product , order = order , quantity = 1 ) >>> item . pk (1, "A755H") pk 属性に tuple を代入することで、対応するフィールドの値をまとめて設定できます: >>> item = OrderLineItem ( pk = ( 2 , "B142C" )) >>> item ... . pk (2, "B142C") >>> item . product_id 2 >>> item . order_id "B142C" 複合主キーは、 tuple を使ってフィルタリングできます: >>> OrderLineItem . objects . filter ( pk = ( 1 , "A755H" )) . count () 1 リレーションシッ ... ... field_precisions [0, 0, 15, 0] extent このレイヤーの空間範囲を Envelope オブジェクトとして返します。 >>> layer . extent . tuple (-104.609252, 29.763374, -95.23506, 38.971823) srs このレイヤーに関連付けられた SpatialReference を返すプロパティ: >>> pri ... オメトリは GEOSGeometry オブジェクトに変換されます。そうでない場合は、 OGRGeometry オブジェクトとして返されます: >>> [ pt . tuple for pt in layer . get_geoms ()] [(-104.609252, 38.255001), (-95.23506, 38.971823), (-95.363151, 29.763374)] test_capabilit ... をイテレートすることもできます。 geom このフィーチャのジオメトリを OGRGeometry オブジェクトとして返します: >>> city . geom . tuple (-104.609252, 38.255001) get このフィーチャーのフィールド (名前で指定) の値を返すメソッドで、 Field ラッパーオブジェクト で ... ... ected by the validator ( #29952 ). Prevented repetitive calls to geos_version_tuple() in the WKBWriter class in an attempt to fix a random crash involving LooseVersion ( #29959 ). Fixed keep-alive support i ... ... is now quoted to fix the issue for custom templates that use the path. バグ修正 Prevented repetitive calls to geos_version_tuple() in the WKBWriter class in an attempt to fix a random crash involving LooseVersion since Django 2.0.6 ( #29959 ). Fixed a ... 2026年10月08日