... は、PostGISバックエンド (この節ではPGRasterと表記) のみでサポートされています。 bbcontains 利用可能なDB : PostGIS , MariaDB, MySQL, SpatiaLite, PGRaster (Native) ジオメトリまたはラスタフィールドのバウンディングボックスが、ルックアップジオメトリのバウンデ ... . objects . filter ( poly__bbcontains = geom ) バックエンド 等価なSQL PostGIS poly ~ geom MariaDB MBRContains(poly, geom) MySQL MBRContains(poly, geom) SpatiaLite MbrContains(poly, geom) bboverlaps 利用可能なDB : PostGIS , MariaDB, MySQL, SpatiaLite, ... . objects . filter ( poly__bboverlaps = geom ) バックエンド 等価なSQL PostGIS poly && geom MariaDB MBROverlaps(poly, geom) MySQL MBROverlaps(poly, geom) SpatiaLite MbrOverlaps(poly, geom) contained 利用可能なDB : PostGIS , MariaDB, MySQL, SpatiaLite, ... ... る開発マシンでのみ使用してください。 MariaDB に関するノート Django supports MariaDB 10.11 and higher. MariaDBを使用するには、MySQLバックエンドを使用してください、これは2つの間で共有されています。詳細は MySQL に関するノート を参照してください。 MySQL に関 ... するノート バージョン サポート Django supports MySQL 8.4 and higher. Django の inspectdb 機能は information_schema データベースを使います。このデータベースには全てのデータベー ... データベースが Unicode (UTF-8 エンコーディング) をサポートすることを期待し、 トランザクションと参照整合性を強制するタスクを MySQL に委譲します。MyISAM ストレージエンジンを使う場合、MySQL が後者 2 つを実際には強制していないという事実に注意することが重要 ... ... と、 NotImplementedError 例外が発生します。 寸法 Area class Area ( expression , ** extra ) [ソース] Availability : MariaDB, MySQL , Oracle, PostGIS , SpatiaLite 単一の地理情報フィールドまたは式を受け取り、そのフィールドの面積を Area 測定値として返します ... 。 LWGEOM/RTTOPOを使用しないMySQLとSpatiaLiteは、地理SRSの面積計算をサポートしていません。 Distance class Distance ( expr1 , expr2 , spheroid = None , ** ext ... ra ) [ソース] 利用可能なDB : MariaDB, MySQL , PostGIS , Oracle, SpatiaLite 2つの地理情報フィールドまたは式を受け取り、それらの間の距離を Distance オブジェクトとして返 ... ... 後方互換性のない変更 The following changes may require you to update your code when you switch from 0.95 to 0.96: 要求される MySQLdb バージョン (Django が MySQL データベースに接続する際、利用する) MySQLdb Python モジュールの古いバージョンに含まれるバグが ... あるため、 Django で MySQL バックエンドを利用する場合は MySQLdb バージョン 1.2.1p2 以上を要求するようになりました。古いバージョンを利用しようとした場 ... 合は例外が発生します。 If you're currently unable to upgrade your copy of MySQLdb to meet this requirement, a separate, backwards-compatible backend, called "mysql_old", has been added to Django. To use ... ... タベースを使用します。 以下に示すのは、2つのデータベース、すなわちデフォルトの PostgreSQL データベースと users という名前の MySQL データベースを定義した settings.py スニペットの例です。 DATABASES = { "default" : { "NAME" : "app_data" , "ENGINE" : "djan ... , "USER" : "postgres_user" , "PASSWORD" : "s3krit" , }, "users" : { "NAME" : "user_data" , "ENGINE" : "django.db.backends.mysql" , "USER" : "mysql_user" , "PASSWORD" : "priv4te" , }, } default データベースという概念がプロジェクトのコンテキストで意味を ... gs.py スニペットの例です。 DATABASES = { "default" : {}, "users" : { "NAME" : "user_data" , "ENGINE" : "django.db.backends.mysql" , "USER" : "mysql_user" , "PASSWORD" : "superS3cret" , }, "customers" : { "NAME" : "customer_data" , "ENGINE" : "django.d ... ... enericIPAddressField on SQLite and MySQL ( #26557 ). ... ... ialization at the class level using transactions and savepoints. Database backends which do not support transactions, like MySQL with the MyISAM storage engine, will still be able to run these tests but won't benefit from the improvements. Tests are n ... go.core.signing.TimestampSigner.unsign() method now also accepts a datetime.timedelta object. データベースバックエンド The MySQL backend no longer strips microseconds from datetime values as MySQL 5.6.4 and up supports fractional seconds depending on ... ld (when DATETIME includes fractional precision greater than 0). New datetime database columns created with Django 1.8 and MySQL 5.6.4 and up will support microseconds. See the MySQL database notes for more details. The MySQL backend no longer creates ... ... cle django.contrib.gis.db.backends.spatialite MySQL の空間データに関する制限 Django は、最近の MySQL バージョンで利用可能な、実際のジオメトリを操作する空間関数をサポートしてい ... ならない場合があります。詳細は SRID の選択 セクションを参照してください。 距離ルックアップ 利用可能なDB : PostGIS、MariaDB、MySQL、Oracle、SpatiaLite、PGRaster (ネイティブ) 以下の距離ルックアップが利用できます: distance_lt distance_lte distance_gt dista ... nce_gte dwithin (MariaDB and MySQL を除く) 注釈 距離をクエリするのではなく、 計測 する場合は Distance 関数を使います。 距離ルックアップは、次のように構成され ... ... ます。 PostgreSQL: 要件はありません( Time Zones を参照)。 Oracle: 要件はありません( Choosing a Time Zone File を参照)。 MySQL: mysql_tzinfo_to_sql でタイムゾーンテーブルをロードすること。 none() none () none() を呼び出すと、オブジェクトを返さないク ... dline='Lennon'" ]) 良い例: Entry . objects . extra ( where = [ "headline= %s " ], params = [ "Lennon" ]) 警告 もしあなたが MySQL でクエリを処理する場合は、複数の型を扱う際に MySQL の暗黙的な型変換が予期しない結果をもたらす場合がある事に注意してください ... 。もし文字列型で定義したカラムに対し、数値型の値で問い合わせた場合、MySQL は比較処理を行う前にテーブル上の全ての値の型を数値型に変換します。例えば 'abc' 、 'def' といった値が含まれているテーブルに ... ... er converts redirects to absolute URIs ( #26428 ). Fixed TimeField microseconds round-tripping on MySQL and SQLite ( #26498 ). Prevented makemigrations from generating infinite migrations for a model field that references a fu ... dash ( #26536 ). Restored conversion of an empty string to null when saving values of GenericIPAddressField on SQLite and MySQL ( #26557 ). Fixed a makemessages regression where temporary .py extensions were leaked in source file paths ( #26341 ). ... 2026年10月08日