... Model ): name = models . CharField ( max_length = 50 ) age = models . PositiveIntegerField ( null = True , blank = True ) alias = models . CharField ( max_length = 50 , null = True , blank = True ) goes_by = models . CharField ( max_length = 50 , nul ... eate ( name = "Margaret Smith" , goes_by = "Maggie" ) >>> author = Author . objects . annotate ( screen_name = Coalesce ( "alias" , "goes_by" , "name" )) . get () >>> print ( author . screen_name ) Maggie >>> # Prevent an aggregate Sum() from returnin ... t F >>> from django.db.models.functions import JSONArray , Lower >>> Author . objects . create ( name = "Margaret Smith" , alias = "msmith" , age = 25 ) >>> author = Author . objects . annotate ( ... json_array = JSONArray ( ... Lower ( "name" ), ... ... ... should take precedence over settings. Accept variable **kwargs and pass them to superclass init. (This will include a new alias argument which must be passed to the superclass.) Ensure that any **kwargs used by the backend are not passed to superclas ... o not accept variable positional *args or pass them to superclass init. The BaseEmailBackend superclass now initializes an alias attribute. This is useful for error messages (e.g., raise InvalidMailer(f"Bad host {host}", alias=self.alias) ), but shoul ... s, or that support older Django versions: A backend can detect it is being initialized without MAILERS by checking if self.alias is None . (Django's built-in backends check this to decide whether deprecated settings should be used.) Libraries supporti ... ... 本設定 mod_wsgiをインストールして有効にしたら、Apacheサーバーの httpd.conf ファイルを編集して、以下を追加します。 WSGIScriptAlias / /path/to/mysite.com/mysite/wsgi.py WSGIPythonHome /path/to/venv WSGIPythonPath /path/to/mysite.com <Directory /path/to/m ... ysite.com/mysite > <Files wsgi.py > Require all granted </Files> </Directory> WSGIScriptAlias の行の最初の部分は、あなたがアプリケーションを提供したいベースとなるURLパスであり( / ルートURLを示している)、二番目の部分は ... example.com サブディレクトリでプロジェクトを提供したい場合は(本例では https://example.com/mysite となります) 、 WSGIScriptAlias を設定の上部に追記します。 WSGIScriptAlias /mysite /path/to/mysite.com/mysite/wsgi.py process-group=example.com 詳細につい ... ... app registry; # if we directly import it, it'll be the wrong version Country = apps . get_model ( "myapp" , "Country" ) db_alias = schema_editor . connection . alias Country . objects . using ( db_alias ) . bulk_create ( [ Country ( name = "USA" , cod ... eates two Country instances, # so reverse_func() should delete them. Country = apps . get_model ( "myapp" , "Country" ) db_alias = schema_editor . connection . alias Country . objects . using ( db_alias ) . filter ( name = "USA" , code = "us" ) . dele ... te () Country . objects . using ( db_alias ) . filter ( name = "France" , code = "fr" ) . delete () class Migration ( migrations . Migration ): dependencies = [] ope ... ... e() , および extra() 利用時の SQL インジェクションの可能性 QuerySet.annotate() , alias() , aggregate() , および extra() メソッドには、列エイリアスにおける SQL インジェクションの脆弱性が存在していました。これら ... ... e() , および extra() 利用時の SQL インジェクションの可能性 QuerySet.annotate() , alias() , aggregate() , および extra() メソッドには、列エイリアスにおける SQL インジェクションの脆弱性が存在していました。これら ... ... にするため、 sqlparse 0.2.2+ との依存関係が必須となりました。 Django とともに自動的にインストールされます。 cached_property aliases In usage like: from django.utils.functional import cached_property class A : @cached_property def base ( self ): return ... ... alias = base alias is not cached. Where the problem can be detected (Python 3.6 and later), such usage now raises TypeError: Can ... not assign the same cached_property to two different names ('base' and 'alias'). Use this instead: import operator class A : ... alias = property ( operator . attrgetter ( "base" )) Permissions for pr ... ... イプを持つ message と text/html コンテンツタイプを持つ html_message を合わせ持つものになります。 using : An optional MAILERS alias to use to send the mail. If unspecified, the default mailer configuration will be used. fail_silently , auth_user , auth_p ... keyword arguments if used, and are not allowed with the using argument. The keyword argument using is an optional MAILERS alias to use to send the mail. If unspecified, the default mailer configuration will be used. Each separate element of datatuple ... xt/html コンテンツタイプを持つ html_message を合わせ持つものになります。 The keyword argument using is an optional MAILERS alias to use to send the mail. If unspecified, the default mailer configuration will be used. バージョン 6.0 で非推奨: Passing f ... ... s issue has severity "moderate" according to the Django security policy . CVE-2026-1287: Potential SQL injection in column aliases via control characters FilteredRelation was subject to SQL injection in column aliases via control characters, using a s ... ctionary expansion, as the **kwargs passed to QuerySet.annotate() , aggregate() , extra() , values() , values_list() , and alias() . This issue has severity "high" according to the Django security policy . CVE-2026-1312: Potential SQL injection via Qu ... erySet.order_by and FilteredRelation QuerySet.order_by() was subject to SQL injection in column aliases containing periods when the same alias was, using a suitably crafted dictionary, with dictionary expansion, used in Filt ... ... s issue has severity "moderate" according to the Django security policy . CVE-2026-1287: Potential SQL injection in column aliases via control characters FilteredRelation was subject to SQL injection in column aliases via control characters, using a s ... ctionary expansion, as the **kwargs passed to QuerySet.annotate() , aggregate() , extra() , values() , values_list() , and alias() . This issue has severity "high" according to the Django security policy . CVE-2026-1312: Potential SQL injection via Qu ... erySet.order_by and FilteredRelation QuerySet.order_by() was subject to SQL injection in column aliases containing periods when the same alias was, using a suitably crafted dictionary, with dictionary expansion, used in Filt ... 2026年10月08日