... t of objects should be displayed on a filtered admin page. The AdminSite.password_change() method now has an extra_context parameter. You can now control who may login to the admin site by overriding only AdminSite.has_permission() and AdminSite.login_for ... he incr() method of the django.core.cache.backends.locmem.LocMemCache backend is now thread-safe. Cryptography The max_age parameter of the django.core.signing.TimestampSigner.unsign() method now also accepts a datetime.timedelta object. データベースバック ... ication with the EMAIL_SSL_CERTFILE and EMAIL_SSL_KEYFILE settings. The SMTP EmailBackend now supports setting the timeout parameter with the EMAIL_TIMEOUT setting. EmailMessage and EmailMultiAlternatives now support the reply_to parameter. ファイルストレ ... ... _ now calls super() , allowing field mixins to implement __init__() methods that will reliably be called. The validate_max parameter was added to BaseFormSet and formset_factory() , and ModelForm and inline versions of the same. The behavior of validation ... to allow customizing the prefix of the form. Raw queries ( Manager.raw() or cursor.execute() ) can now use the "pyformat" parameter style, where placeholders in the query are given as '%(name)s' and the parameters are passed as a dictionary rather than a ... ackend. Now, across all backends, you only need to double literal percent characters if you are also providing replacement parameters. For example: # No parameters, no percent doubling cursor . execute ( "SELECT foo FROM bar WHERE baz = '30%'" ) # Paramet ... ... nd django.core.paginator.AsyncPaginator will no longer be allowed. The django.core.mail APIs will no longer accept certain parameters as positional arguments. These must be passed as keyword arguments instead. Support for passing Python's legacy email ema ... ist_select_related() method returns True . Support for overriding ModelAdmin.get_actions() without the new action_location parameter will be removed. Support for unpacking or indexing the dictionary values of the ModelAdmin.get_actions() return value will ... ved. Use Action attributes instead. Support for overriding ModelAdmin.get_action_choices() without the new action_location parameter will be removed. The django.db.transaction.savepoint() alias to django.db.transaction.savepoint_create() will be removed. ... ... ipart parser class. HttpResponseRedirect (and its subclasses), as well as the redirect() shortcut, now accept a max_length parameter to override the default maximum URL length limit. セキュリティ Signed cookies now use an unambiguous salt derivation by de ... xtra 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() method is renamed to get_geom_placeholder_sql and is expected to return ... a two-elements tuple composed of an SQL format string and a tuple of associated parameters. Set the new DatabaseFeatures.supports_bit_aggregations attribute to False if the database doesn't support bitwise aggreg ... ... nstead of every request in the session. The django.contrib.auth.views.password_reset() view accepts an extra_email_context parameter. django.contrib.contenttypes order_with_respect_to が GenericForeignKey とともに使用できるようになりました。 django.contri ... created by ForeignKey , GenericForeignKey , and ManyToManyField . The add() method on a reverse foreign key now has a bulk parameter to allow executing one query regardless of the number of objects being added rather than one query per object. Added the k ... eep_parents parameter to Model.delete() to allow deleting only a child's data in a model that uses multi-table inheritance. Model.delete() and Q ... ... ... e easily customize the login policy. django.contrib.auth.views.password_reset() takes an optional html_email_template_name parameter used to send a multipart HTML email for password resets. The AbstractBaseUser.get_session_auth_hash() method was added and ... ns that collected static files and directories receive by setting the file_permissions_mode and directory_permissions_mode parameters. See collectstatic for example usage. The CachedStaticFilesStorage backend gets a sibling class called ManifestStaticFile ... SRF_COOKIE_AGE setting facilitates the use of session-based CSRF cookies. E メール send_mail() now accepts an html_message parameter for sending a multipart text/plain and text/html email. The SMTP EmailBackend now accepts a timeout parameter. ファイルスト ... ... をカスタマイズするには、 django.contrib.admin.SimpleListFilter をサブクラス化して独自のリストフィルタを定義します。 title と parameter_name 属性を指定し、 lookups と queryset メソッドをオーバーライドする必要があります: from datetime import date from django. ... le title which will be displayed in the # right admin sidebar just above the filter options. title = _ ( "decade born" ) # Parameter for the filter that will be used in the URL query. parameter_name = "decade" def lookups ( self , request , model_admin ): ... g a filter using the __in lookup, it is possible to filter for any of a group of values. You need to override the expected_parameters method, and then specify the lookup_kwargs attribute with the appropriate field name. By default, multiple values in the ... ... ... security fixes. A further security fix has been issued recently such that parse_qsl() no longer allows using ; as a query parameter separator by default. Django now includes this fix. See bpo-42967 for further details. ... 2026年10月08日